caesar5

02-29-2004, 11:09 PM

what formula can i use to calculate normal for vertex??

i use this parametric formula for my object:

x=1.6f*(cos(0.5*angle1)*cos(0.5*angle1)*cos(0.5*an gle1));

y=1.6f*(cos(angle2)*sin(0.5*angle1)*cos(angle2)*si n(0.5*angle1)*cos(angle2)*sin(0.5*angle1));

z=1.6f*sin(angle2)*sin(0.5*angle1);

can anyone pls give me example how to use parametric function in opengl??i put it under double loop and i failed to get good shape. i just started studying com graphics this week.

[This message has been edited by caesar5 (edited 03-01-2004).]

[This message has been edited by caesar5 (edited 03-01-2004).]

i use this parametric formula for my object:

x=1.6f*(cos(0.5*angle1)*cos(0.5*angle1)*cos(0.5*an gle1));

y=1.6f*(cos(angle2)*sin(0.5*angle1)*cos(angle2)*si n(0.5*angle1)*cos(angle2)*sin(0.5*angle1));

z=1.6f*sin(angle2)*sin(0.5*angle1);

can anyone pls give me example how to use parametric function in opengl??i put it under double loop and i failed to get good shape. i just started studying com graphics this week.

[This message has been edited by caesar5 (edited 03-01-2004).]

[This message has been edited by caesar5 (edited 03-01-2004).]