Jump to content


filling grid with circle shapes?


  • Please log in to reply
12 replies to this topic

#1 cloudfx

cloudfx

    Illusionist

  • Members
  • PipPipPip
  • 310 posts
  • Joined: 07-December 07
  • Location:Midgar
  • Name:cloudfx strife

Posted 30 July 2012 - 08:58 AM

Hi, I am trying to fill up a grid with circles with random radius like below rough drawing but the actual circle counts has to be about 300,000.

What would be ideal way to do this in houdini?


I've tried to use bullet to throw bunch of sphere primitives and let me fille a box and flat it to get the shape but if there is more procedural way to do this, please let me know!

#2 cloudfx

cloudfx

    Illusionist

  • Members
  • PipPipPip
  • 310 posts
  • Joined: 07-December 07
  • Location:Midgar
  • Name:cloudfx strife

Posted 30 July 2012 - 08:58 AM

View Postcloudfx, on 30 July 2012 - 08:58 AM, said:

Hi, I am trying to fill up a grid with circles with random radius like below rough drawing but the actual circle counts has to be about 300,000.

What would be ideal way to do this in houdini?


I've tried to use bullet to throw bunch of sphere primitives and let me fille a box and flat it to get the shape but if there is more procedural way to do this, please let me know!

Attached Thumbnails

  • catch.png


#3 eetu

eetu

    Illusionist

  • Members
  • PipPipPip
  • 479 posts
  • Joined: 30-May 07
  • Location:Helsinki, Finland
  • Name:eetu m

Posted 30 July 2012 - 09:18 AM

forums.odforce.net/index.php?/topic/12892-square-packing/
forums.odforce.net/index.php?/topic/6494-poor-mans-circle-packing/

might be of help?
A shitty theory is better than no theory at all

#4 cloudfx

cloudfx

    Illusionist

  • Members
  • PipPipPip
  • 310 posts
  • Joined: 07-December 07
  • Location:Midgar
  • Name:cloudfx strife

Posted 30 July 2012 - 10:34 AM

View Posteetu, on 30 July 2012 - 09:18 AM, said:

forums.odforce.net/index.php?/topic/12892-square-packing/
forums.odforce.net/index.php?/topic/6494-poor-mans-circle-packing/

might be of help?


Super helpful.

Thank you eetu.

#5 jkunz07

jkunz07

    Initiate

  • Members
  • PipPip
  • 119 posts
  • Joined: 22-June 11
  • Location:Los Angeles, CA
  • Name:John Kunz

Posted 30 July 2012 - 09:13 PM

View Postcloudfx, on 30 July 2012 - 10:34 AM, said:

Super helpful.

Thank you eetu.

I wrote a python circle packing otl a while ago, my computers at the genius bar right now but I'll try to post it tomorrow
MrKunz.com
Blog | Demo Reel | Resume

#6 jkunz07

jkunz07

    Initiate

  • Members
  • PipPip
  • 119 posts
  • Joined: 22-June 11
  • Location:Los Angeles, CA
  • Name:John Kunz

Posted 01 August 2012 - 03:06 PM

Attached File  CirclePackOTL.zip   54.49K   74 downloads
MrKunz.com
Blog | Demo Reel | Resume

#7 eetu

eetu

    Illusionist

  • Members
  • PipPipPip
  • 479 posts
  • Joined: 30-May 07
  • Location:Helsinki, Finland
  • Name:eetu m

Posted 03 August 2012 - 02:31 AM

Pretty shape-packing art; http://www.zeitguise...olean-taxidermy
A shitty theory is better than no theory at all

#8 jkunz07

jkunz07

    Initiate

  • Members
  • PipPip
  • 119 posts
  • Joined: 22-June 11
  • Location:Los Angeles, CA
  • Name:John Kunz

Posted 13 August 2012 - 06:51 PM

http://mrkunz.com/ci...acking-theorem/

If your still looking for a solution, I just posted some experiments I've been doing.  Using the pcfarthest vop might be the easiest way to go if you want to place a really large # of points.
MrKunz.com
Blog | Demo Reel | Resume

#9 edward

edward

    Grand Master

  • Members
  • PipPipPipPipPip
  • 3,326 posts
  • Joined: 10-September 02
  • Name:e.d.w.a.r.d. .

Posted 13 August 2012 - 09:19 PM

I was thinking that you might get a "better" looking distribution of points if you ran an iteration or two of Lloyd's relaxation on it before calculating the circle radii.

Attached Files


don't panic!

#10 jkunz07

jkunz07

    Initiate

  • Members
  • PipPip
  • 119 posts
  • Joined: 22-June 11
  • Location:Los Angeles, CA
  • Name:John Kunz

Posted 14 August 2012 - 02:07 AM

View Postedward, on 13 August 2012 - 09:19 PM, said:

I was thinking that you might get a "better" looking distribution of points if you ran an iteration or two of Lloyd's relaxation on it before calculating the circle radii.
Cool!  That's a very interesting technique - thanks for sharing it!

I was also considering using noise to color the geo before scattering points or applying a particle system with basic magnetic properties to get some intersting arrangements.

What do you think would be the best way to get all the circles to be mutually tangent?  I was thinking of using a solver sop with a foreach loop and slowly growing each circle, but I'm not sure if there's a less "brute force" method?

Edited by jkunz07, 14 August 2012 - 02:10 AM.

MrKunz.com
Blog | Demo Reel | Resume

#11 edward

edward

    Grand Master

  • Members
  • PipPipPipPipPip
  • 3,326 posts
  • Joined: 10-September 02
  • Name:e.d.w.a.r.d. .

Posted 14 August 2012 - 04:21 PM

You can try using closest the neighbour point after the Triangulate2D as your radius.
don't panic!

#12 edward

edward

    Grand Master

  • Members
  • PipPipPipPipPip
  • 3,326 posts
  • Joined: 10-September 02
  • Name:e.d.w.a.r.d. .

Posted 14 August 2012 - 07:30 PM

View Postedward, on 14 August 2012 - 04:21 PM, said:

You can try using closest the neighbour point after the Triangulate2D as your radius.

Er, scratch that, it doesn't work that well. Although you could try using it as your initial guess before incrementally expanding your radii.
don't panic!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users