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 & HelpSyntax Questions › Working with SVG files (or following paths/curves)
Page Index Toggle Pages: 1
Working with SVG files (or following paths/curves) (Read 1386 times)
Working with SVG files (or following paths/curves)
Oct 22nd, 2009, 10:28am
 
I'm interested in bringing in shapes, mostly lines and curves from Illustrator files. I know I can export these as SVG files and import them to display in Proc, but can I do more with them?

For example, how could I get another object (like an ellipse) to follow along the path made by the SVG (assuming the SVG is just a simple line / curve)?

Is there another approach I could use to translate the Illustrator vectors into useful data?
Re: Working with SVG files (or following paths/curves)
Reply #1 - Oct 22nd, 2009, 11:41am
 
Actually, I might be able to translate them into bezier functions. If that's the case - I still don't know how I could get something to follow those curves like a path. Any ideas?
Re: Working with SVG files (or following paths/curves)
Reply #2 - Oct 22nd, 2009, 12:34pm
 
you should try geomerative Library http://www.ricardmarxer.com/processing/geomerative/documentation/ it offers you the possibilitie, to work with the path of svgs and fonts for example...
Re: Working with SVG files (or following paths/curves)
Reply #3 - Oct 22nd, 2009, 1:29pm
 
Thanks!  I'm having some trouble getting the library to work (I'm getting an error saying that the library is incompatible with my version of Processing (1.0.8)), but if I can get it running it will help a lot.

The only other option I have is hard coding it in - I found a great site for animation examples that includes following bezier quadratic paths with code examples:

http://www.reflektions.com/miniml/template_permalink.asp?id=210
Re: Working with SVG files (or following paths/curves)
Reply #4 - Oct 22nd, 2009, 1:56pm
 
I have some troubles with the library too but if you just wanna follow a bezier curve. You can do this by using http://processing.org/reference/bezierPoint_.html
Re: Working with SVG files (or following paths/curves)
Reply #5 - Oct 22nd, 2009, 2:25pm
 
Brilliant. Thanks for that!
Re: Working with SVG files (or following paths/curves)
Reply #6 - Oct 24th, 2009, 10:27am
 
Update for future browsing users:

Here is the most recent version of geomerative: http://www.ricardmarxer.com/geomerative/

The other link is a quite old version. This one is working in post 1.0 Processing. Also, here is a helpful page: http://github.com/rikrd/geomerative

It looks like I'll be able to pull coordinate points for the SVG files using this library.  Great tip!
Re: Working with SVG files (or following paths/curves)
Reply #7 - Oct 24th, 2009, 4:18pm
 
oh thx, i didnt realize there was a newer version. maybe i should update to see if i still get the erros
Re: Working with SVG files (or following paths/curves)
Reply #8 - Oct 25th, 2009, 1:33am
 
Mmm, the link given by lord_funk is the one listed in the Libraries page.
I suppose Ricard maintains the old pages to avoid 404 to users, but perhaps he should update these pages with a clear warning and a link to the latest version.
Page Index Toggle Pages: 1