View Full Version : small help needed

10-18-2008, 01:04 PM
Hi,i am brett ,I need small help please.I created a hierarchial character, using cylinders.

I have a few questions about it,The character should only be created using cylinders.I used GL_QUADS and GL_TRIANGLE_FAN to create it.

1)I created normals from centre to point.Does these normals change when translated or rotated??If changes it gives wrong results right!!How to solve it??

2)The next question is when i rotate the joints of the robot there are visible gaps between joints.How to do without any gaps??I should use only cylinders.

3)Do u suggest any changes to the character???

I am a newbie please try to help me.

Thank you in advance.

10-18-2008, 03:45 PM
1) provided you use glTranslate/glRotate, it will operate on both the vertices and the normals. So nothing else to do. Beware of scaling thouhg : try glEnable(GL_NORMALIZE) to avoid problems with scale.

2) for 1D joints, use one small cylinder at the "gap".
for 2D joints, use 2 cylinders at the same place or not (ideally a sphere). this can help :

3) maybe, if there was a proper link to a image ?

10-18-2008, 03:59 PM
I dont understand what 1D joints and what are 2D joints???

10-18-2008, 05:23 PM
The number of axes of rotation that are possible at a given joint.
Human elbow has only 1 for example. Shoulder have (at least) 2.

10-18-2008, 07:50 PM
I also have another doubt.How to save the positions??For example when head is rotated,and then when i rotate hand the head should remain in the rotated position??How to do it??

10-19-2008, 10:40 AM
You can manage transformations, storing transformation matrices of each object and setting the modelview matrix with one matrix before drawing the corresponding object.

10-19-2008, 04:43 PM
I also want to know how to define normals manually for a cylinder created using GL_QUAD_STRIP(cos and sins).please.

Now i got it.