packed circles

   14228   8   4
User Avatar
Member
454 posts
Joined: July 2005
Offline
Following up from a thread on the sidefx-houdini-list, I'm attaching a script that stacks circles inside a shape. (The hscript version posted to the list had line wrap problems.)

This approach uses the dual of a delaunay triangulation of a shape, some least-squares adaptation, spline fitting, etc to pack circular shapes inside an object in a quasi-random manner. The result is fairly organic cellular composition.

Attachments:
circle_cells.cmd.gz (1.9 KB)

User Avatar
Member
454 posts
Joined: July 2005
Offline
Here's an extension - or variant - of the above network. (You need to have run the above script before you can run this one.)

It's along the same lines of the above script - using the dual of the delaunay triangulation - which is just a voronoi breakup essentially:

http://www.comp.lancs.ac.uk/~kristof/research/notes/voronoi/ [comp.lancs.ac.uk]

It would be great if SESI could wrap this up into a SOP that had the additional ability to preserve the boundary of the original shape, and beyond that, handle 3d shapes…

Enjoy!

Cheers

Attachments:
voronoi_breakup.cmd.gz (797 bytes)

User Avatar
Member
111 posts
Joined: Dec. 2008
Offline
oh, I love this post.
Thank you very very much for this. 8)
User Avatar
Member
454 posts
Joined: July 2005
Offline
No worries !

Let me know if you design any buildings with this stuff!

I love organic architecture. I'd be curious to see what they look like…

Cheers
User Avatar
Member
454 posts
Joined: July 2005
Offline
Looks like someone found an artistic use for this!



I wonder who the mystery artist was. Anyone know who?

User Avatar
Member
99 posts
Joined: Sept. 2006
Offline
as i am no expert how do i use this cmd inside houdini?
User Avatar
Member
8522 posts
Joined: July 2007
Online
usually by File/Run Script
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
279 posts
Joined: Dec. 2009
Offline
It's far away the approach of post in houdini-list and this link
http://paulbourke.net/texture_colour/randomtile/ [paulbourke.net]

Your approach never give you a big difference between the bigger and the smaller shape.

A VEX or python could do this.
User Avatar
Member
28 posts
Joined: Nov. 2011
Offline
fsimerey
It's far away the approach of post in houdini-list and this link
http://paulbourke.net/texture_colour/randomtile/ [paulbourke.net]

Your approach never give you a big difference between the bigger and the smaller shape.

A VEX or python could do this.


thanks for the link ! very interesting
http://vimeo.com/3dsr [vimeo.com]
  • Quick Links