Public Group

# matrix deforming 3d object

This topic is 4440 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

hi guys. i have a matrix for an objects 3d rotation. the math library im using is in fixed point math, so eventually after loads of multiplications of matrices the tiny discontinuities become large enough to scale/stretch my object. normalising each axis ever frame (the 1st 3 columns of the matrix) helps but eventually the object still becomes distorted. ive used different methods i.e. creating the matrix every frame so i start with a "fresh" matrix every frame, but there are some advantages to keeping the same matrix. what would you guys suggest?

##### Share on other sites
Is there a reason for using a fixed point math library?

##### Share on other sites
yep, im programming on the nintendo ds and thats all it can support. its really great at it, but thats all it supports.

##### Share on other sites
Do you use incremental or from-scratch rotations? That is, do you rotate and write the rotated vertices back into the object?

##### Share on other sites
atm im using incremental. im pretty sure its because im not orthogonalizing my matrix before normalizing. to do this do i do two cross products between x,y and z,x axis?

##### Share on other sites
A rotation matrix should not change the length of a vector. You can calculate the matrix norm for the rotation matrix to determine if the matrix becomes distorted. Only then you need to recreate the matrix.

Maybe this helps:
http://en.wikipedia.org/wiki/Matrix_norm
(see section "p-norms and uniform norms")

##### Share on other sites
Incremental rotations allow even minor errors or floating point drifts to accumulate over time, eventually warping the source vertices. You might consider using "from scratch" rotations instead.

##### Share on other sites
If you want to ensure your matrix is orthogonal, use the gram-schmidt method :
Gram-Schmidt

1. 1
Rutin
34
2. 2
3. 3
4. 4
5. 5

• 12
• 14
• 9
• 9
• 9
• ### Forum Statistics

• Total Topics
633332
• Total Posts
3011400
• ### Who's Online (See full list)

There are no registered users currently online

×