Drawing a cricle on the plane

Started by
0 comments, last by Tom Sloper 9 years, 6 months ago

SOLVED SOLVED SOLVED SOLVED

So i have a plane that has a normal n and distance d (normal normalzied)

i want to draw a circle on it (set some vertices there on the surface)

my code looks like this:

determine what direction face (plane) is facing (x or y or z)

go through a loop




if (ShockSurfH.algined == 2) { //Y algin so XZ calculus
t1.y = 0;
t1.x = cos(angle*imopi)*(radius-1.0f);
t1.z = sin(angle*imopi)*(radius-1.0f);

t2.y = 0;
t2.x = cos(angle*imopi)*radius;
t2.z = sin(angle*imopi)*radius;

t3.y = 0;
t3.x = cos(angle2*imopi)*radius;
t3.z = sin(angle2*imopi)*radius;

t4.y = 0;
t4.x = cos(angle2*imopi)*(radius-1.0f);
t4.z = sin(angle2*imopi)*(radius-1.0f);

							 }



shockwaveH[i*4+0] = pos+ ( nH * (t1*nH));
shockwaveH[i*4+1] = pos+ ( nH * (t2*nH));
shockwaveH[i*4+2] = pos+ ( nH * (t3*nH));
shockwaveH[i*4+3] = pos+ ( nH * (t4*nH));

i set circle verts on the 'axis' and then project it onto the plane (the 2nd code) however the bigger slope of the plane circle starts to look like an ellipse.

How to draw a normal circle?

Advertisement
Closing, since it's solved.

-- Tom Sloper -- sloperama.com

This topic is closed to new replies.

Advertisement