FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Topics & Contributions
   Tools
(Moderator: REAS)
   vector shape drawing to code
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: vector shape drawing to code  (Read 1000 times)
Ethan

thanton3 WWW
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

122417302122417302martingomez_listsmg1ph WWW Email
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

122417302122417302martingomez_listsmg1ph WWW Email
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.
 
mflux

fluxhavoc WWW
Re: vector shape drawing to code
« Reply #3 on: Dec 12th, 2003, 1:28pm »

My classmate Dan Riley had this thing where you can draw bezier curves the way you do in illustrator. An example:
 
http://classes.design.ucla.edu/Fall03/157A/cursos/00/index_visor.php?id= 8&ejercicio_id=8&persona_id=17
 
I'm not so sure if he wants people to use his code, but it's up online for your viewing pleasure.
 
fry

WWW
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

WWW Email
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 »  
Pages: 1 

« Previous topic | Next topic »