We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Space Filling but this time with Custom Shapes
Page Index Toggle Pages: 1
Space Filling but this time with Custom Shapes (Read 1934 times)
Space Filling but this time with Custom Shapes
Jan 31st, 2009, 3:49am
 
I know, the topic about Space filling just came up.
But as i am working on a similiar project i thought i could ask a question. I know how to do all the space filling with circles and boxes cause they just grow until they touch each other and so on... but would it be possible to do it with custom svg shapes? I have no idea how to check for collition or any other way to do it. any advice would be helpful.
Re: Space Filling but this time with Custom Shapes
Reply #1 - Jan 31st, 2009, 1:22pm
 
Probably far from trivial.
I just found the V-clip allowing to check collisions for convex polyhedra. By the same author which made QuickHull3D, the library behind Lee Byron's Mesh library.

Using it for your problem isn't trivial... You can transform your SVG shape in a collection of convex flat polyhedra, I suppose.

Another way, simpler and much slower, probably, would be to draw all the shapes in a PGraphics, with monochrome with transparency color. If you find out a pixel has a different color than background and drawing color, it means there is an intersection between two shapes (ie. one covers the other). Then you should stop at previous step...
Re: Space Filling but this time with Custom Shapes
Reply #2 - Mar 28th, 2009, 1:07am
 
Geomerative has intersection() and contains() for shapes:

http://ricardmarxer.com/geomerative/

F
Re: Space Filling but this time with Custom Shapes
Reply #3 - Dec 31st, 2009, 5:12am
 
Has anybody ever done something like this? use geomerative for space filling with a custom shape?
would love to see an example.
Re: Space Filling but this time with Custom Shapes
Reply #4 - Dec 31st, 2009, 7:55am
 
This sketch doesn't use geomerative but might give you some inspiration :
http://www.openprocessing.org/visuals/?visualID=1811
Page Index Toggle Pages: 1