1. ## Transformation matrix problem!

hi... i need help about transformation, i mean rotation object.
i want to rotate object without glRotatef, so i multiple the points and matrix
ex.
rotate x
1 0 0 | | x | | x
0 cos -sin |X | y |=| cos * y + (-sin)*z
0 sin cos | | z | | sin * y + cos * z

my line program

for (unsigned int i=1;i<=o->nPoints;i++){
o->points[i].x=o->points[i].x;

}

the problem is, the result is not corect. my object not rotate corectly. please help me... what i must do?
i have change degree to radian (angle*3,14.../180).

2. ## Re: Transformation matrix problem!

You fall prey for a very basic algorithmic mistake mathematicians usually make: you change the y coordinate but then use it again to compute the z coordinate, where you should have used the old value. You should use a temporary variable that will store the old y value, like

Code :
```old_y = y
// compute new y
// compute new z, with old_y```

3. ## Re: Transformation matrix problem!

oh... i see...
my point y is change!
wow thank you!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•