Hi,
I'm new to processing and programming.
I want to make a program that works like a simple version of sketchup: u draw lines by setting the start and endpoint of a line with your mouse and draw continuous lines by adding more and more points.
polygonal shapes get filled (become a plane) when the shape is closed (e.g. the endpoint of the last line connects with the startpoint of the first line).
in a next step u can extract a volume out of this plane by setting it's height (u "pull" the shape in z axis and creata a volume).
how do i program this? i know i can use arrays somehow to store the points of the lines. but i'm clueless how to do the rest. is there a function that draws polygonal shapes with given x and y coordinates? and is there somehow a function to convert a 2d shape to a 3d volume? maybe just by working in 3D in the first place and adding the z axis values later?
help and input is much appriciated.
I'm new to processing and programming.
I want to make a program that works like a simple version of sketchup: u draw lines by setting the start and endpoint of a line with your mouse and draw continuous lines by adding more and more points.
polygonal shapes get filled (become a plane) when the shape is closed (e.g. the endpoint of the last line connects with the startpoint of the first line).
in a next step u can extract a volume out of this plane by setting it's height (u "pull" the shape in z axis and creata a volume).
how do i program this? i know i can use arrays somehow to store the points of the lines. but i'm clueless how to do the rest. is there a function that draws polygonal shapes with given x and y coordinates? and is there somehow a function to convert a 2d shape to a 3d volume? maybe just by working in 3D in the first place and adding the z axis values later?
help and input is much appriciated.
1