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 › svg collision
Page Index Toggle Pages: 1
svg collision (Read 1642 times)
svg collision
Mar 27th, 2009, 5:28pm
 
Hi everyone,

This is a question that comes along a lot, but i can't seem to find a workable answer...

I'm needing to implement shape collision detection (shapes are imported svg's) as part of a space filling algorithm. I've done something similar in the past in flash, but it was always too slow and cumbersome which is why i'm now here enjoying processing!

Most of the collision detection guidance i have found deals with circles/rectangles, but i need to find a fast and simple way to do it with complex shapes.

Any help either practical or conceptual would be much appreciated,

cheers,

emile
Re: svg collision
Reply #1 - Mar 28th, 2009, 12:17am
 
I had the same question some time ago

http://processing.org/discourse/yabb2/?num=1233370178
Re: svg collision
Reply #2 - Mar 28th, 2009, 1:07am
 
Geomerative has intersection() and contains() for shapes:

http://ricardmarxer.com/geomerative/

F
Re: svg collision
Reply #3 - Mar 28th, 2009, 10:35am
 
I found the following recently. I thought it helpful or at least along the same lines.

Java General Poly Clipper

It has union, intersect, and xor csg operations.
Re: svg collision
Reply #4 - Mar 29th, 2009, 12:23am
 
Rick, if my memory serves me right, Geomerative is precisely using this library, wrapping it for easier use.
Re: svg collision
Reply #5 - Mar 30th, 2009, 8:36am
 
You are correct, thanks for pointing that out. Geomerative credits GPC on its site. I had downloaded Geomerative before (never really used it much yet) and never realized GPC was being used.
Re: svg collision
Reply #6 - Mar 30th, 2009, 9:51am
 
@emilebennettt if you got a working version. would be great to show it to us...
Re: svg collision
Reply #7 - Mar 30th, 2009, 12:58pm
 
I just found this thread that I think may be helpful, though I haven't looked it over thoroughly yet.
Page Index Toggle Pages: 1