All Discussions Tagged 'attractor' - Grasshopper2024-03-29T13:24:13Zhttps://www.grasshopper3d.com/group/kangaroo/forum/topic/listForTag?tag=attractor&feed=yes&xn_auth=noData visualisation with 2D Circle Packingtag:www.grasshopper3d.com,2018-06-29:2985220:Topic:19168062018-06-29T09:38:53.268ZMax Marschallhttps://www.grasshopper3d.com/profile/MaxMarschall
<p>Hi all,</p>
<p>I'm trying to do a 2D data visualisation animation where I have several circles that gradually change their radii over time. I want the circles to touch but not overlap, and to 'gravitate' towards the origin. I.e. it may start like this:</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2655080580?profile=original" target="_self"><img class="align-full" src="http://storage.ning.com/topology/rest/1.0/file/get/2655080580?profile=RESIZE_320x320" width="200"></img></a></p>
<p>Then one gets bigger:…</p>
<p></p>
<p>Hi all,</p>
<p>I'm trying to do a 2D data visualisation animation where I have several circles that gradually change their radii over time. I want the circles to touch but not overlap, and to 'gravitate' towards the origin. I.e. it may start like this:</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2655080580?profile=original" target="_self"><img width="200" src="http://storage.ning.com/topology/rest/1.0/file/get/2655080580?profile=RESIZE_320x320" width="200" class="align-full"/></a></p>
<p>Then one gets bigger:</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2655080870?profile=original" target="_self"><img width="200" src="http://storage.ning.com/topology/rest/1.0/file/get/2655080870?profile=RESIZE_320x320" width="200" class="align-full"/></a></p>
<p>So they rearrange to something like this:</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2655080933?profile=original" target="_self"><img width="200" src="http://storage.ning.com/topology/rest/1.0/file/get/2655080933?profile=RESIZE_320x320" width="200" class="align-full"/></a></p>
<p>It might have to be that the bigger the circles, the 'heavier' they are, thereby gravitating more towards the origin and pushing smaller circles aside.</p>
<p></p>
<p>Pretty sure this is a Kangaroo task but I'm new to the plugin and not sure which key words to search for. I've tried 'circle packing' and 'collision' but haven't found quite what I'm looking for. I've tried editing Daniel's "SphereCollide_MultipleRadii" example (gh attached):</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2655081109?profile=original" target="_self"><img width="750" src="http://storage.ning.com/topology/rest/1.0/file/get/2655081109?profile=RESIZE_1024x1024" width="750" class="align-full"/></a></p>
<p>but it doesn't converge; the circles overlap and flutter out of control, here is a snapshot:</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2655081256?profile=original" target="_self"><img width="350" src="http://storage.ning.com/topology/rest/1.0/file/get/2655081256?profile=RESIZE_480x480" width="350" class="align-full"/></a></p>
<p>Any help to point me in the right direction would be greatly appreciated!</p>
<p></p>
<p></p>