|
Author |
Topic: vector shape drawing to code (Read 1000 times) |
|
Ethan
|
vector shape drawing to code
« on: Dec 10th, 2003, 9:41pm » |
|
I searched around the forums, but I didn't find an answer to this. I'm imagining a program that would allow me to draw a vector shape with illustrator type tools, and output the corresponding code so that I could copy and paste it into a p5 project. Does that make sense? I want to be able to draw a shape, and then get the code to reproduce it. Does something like that exist already that you've seen? If not, could you forsee any major obstacles in writing it? Should work, right? It would probably take me months, but I'll give it a shot if it doesn't exist aleady...
|
|
|
|
Martin
|
Re: vector shape drawing to code
« Reply #1 on: Dec 11th, 2003, 1:50pm » |
|
I haven't seen any yet for Processing, though there are some already that are done using Java. I've implemented something like this before. Will have to dig into my archives for it.
|
|
|
|
Martin
|
Re: vector shape drawing to code
« Reply #2 on: Dec 11th, 2003, 2:08pm » |
|
OK. Found it. Kick me via e-mail if you want a copy.
|
|
|
|
fry
|
Re: vector shape drawing to code
« Reply #4 on: Dec 12th, 2003, 4:44pm » |
|
re: the original post, this is the sort of thing i would like to encourage and would like to see people build them. we need more bridges to p5 from what people are used to (i.e. having an authoring environment) so anything that helps that, i'm strongly in favor of. build! build!
|
|
|
|
pwang
|
Re: vector shape drawing to code
« Reply #5 on: Dec 17th, 2003, 12:54pm » |
|
Hi there, Around May this year,I was trying to draw a chinese character in Processing. Here's my procedure of doing that: 1. draw some vector shapes in illustrator 2. save it as a .svg file 3. parse the .svg file, and generate a txt (say,result.txt) file that contains a long list of "line(xxxx,xxxx,xxxx,xxxx)" according to the information inside the .svg (I wrote a SVG parser in JAVA, however it's incompleted) 4. copy/paste the code inside result.txt to processing, run it ,and it looks like this: http://pratt.edu/~pwang/proce55ing/svg/applet/ this is the original svg file http://pratt.edu/~pwang/proce55ing/svg/wind.zip (unzip this file and drag/drop wind.svg into your browser, or open it in a text editor) Unfortunately, I discontinued this development coz i have to do my thesis... anyway it's a direction, maybe some of you will be interested in doing this. a useful link: SVG 1.1 Specification http://www.w3.org/TR/SVG/
|
« Last Edit: Dec 17th, 2003, 6:27pm by pwang » |
|
|
|
|
|