by savvy » Thu Jul 05, 2012 5:03 pm
You need to have an array represented as so...
vertices[numberofpoints][2][10];
coordinates
[1][[0] being x value
[1][1] being y value
[1][2] being z value
connections
[2][number] being what a line is drawn to, example:
vertices[0][1][0,1,2] = 1;
vertices[1][1][0,1,2] = 5;
then
vertices[0][2][0] = 0; <- Makes it connected to the point in vertices[0]
Then for drawing it you need to use projection, sin, cos, tan etc, to place the points prospectively on the canvas.
!!EDIT!!: You need to plot the poitns first, THEN use lineto to draw the lines in using the vertices connection in the array.
savvy
PS: I will eventually work on such a projection algorithm, but right now I'm working on something else. XD
--> For my help, i ask for a simple +1 if it helps! ^-^
--> I dont code, I type art which you dont understand.
--> I keep winning the 3D model challenge at college, teacher says: "you keep winning im not giving you prizes".