a penny for your thoughts,
i’ve tried everything i can imagine. this is the latest incarnation of my code.
void extrudedNgon(int n, Point3 pathStart, Point3 pathEnd, float length, float radius, float radius2, float rotAngle)
{
if(n<3) return;
Vector3 path;
path.set(pathStart.x - pathEnd.x, pathStart.y -pathEnd.y, pathStart.z - pathEnd.z);
path.normalize();
Vector3 u;
Vector3 v;
Vector3 up; up.set(path.x,-path.z,path.y);
float m[16];
u.set(up.cross(path)); v.set(path.cross(u));
m[0] = u.x; m[4] = u.y; m[8] = u.z; m[12] = pathStart.x;
m[1] = v.x; m[5] = v.y; m[9] = v.z; m[13] = pathStart.y;
m[2] = path.x; m[6] = path.y; m[10] = path.z; m[14] = pathStart.z;
m[3] = 0; m[7] = 0; m[11] = 0; m[15] = 1.0;
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glMultMatrixf(m);....
anyhow like i says first who can give me an answer that works for me is welcome to my money. i got so many projects on the backburner cause i can’t figure this one out. really all i wan’t to be able to do is create a local coord system given either 2 points or a vector and point, and be able to extrude along the z axis. this code gets real close but no cigar. sorry to be so blunt about this. but staring at it is not fixing the problem. and my sincerest apologies to anyone who finds this aproach unkewth or if this is somehow illegal.
much apreciated
Michael
[This message has been edited by wildeyedboyfromfreecloud (edited 03-03-2002).]