That wasn't very explanatory for me unfortunatly..
I need x,y,z variables ..
i have this function, which does the job, but not rotated correctly:
Code:
void drawArc(P a, P b, int step, int maxstep)
{
float x, y, z;
P C = a.CenterPoint(b); // the centerpoint of a and b
C.draw(2); // draws the current centerpoint size 2
float div = PI/maxstep; // number of steps
for(int i = 0; i < maxstep; i++)
{
pushMatrix();
translate(C.x,C.y,C.z); // so it rotates around C
stroke(0,255,0);
x = (cos(div*i)*(C.Distance(b)));
y = (sin(div*i)*(C.Distance(b)));
z = 0;
point(x,y,z);
popMatrix();
}
}
Basicly, all i need to get this to work is:
total Centerpoint (0,0,0)
Point 1
Point 2
CenterPoint
Then to get the direction of the arc i take
CenterPoint+CenterPoint/10 // since it's away from (0,0,0)
That's about where it stops for me..
I did some rotating with rotateX,Y,Z but couldn't really see what angles to calculate to get the correct rotation.
again, any pointers would be greatly appreciated
-seltar