Advertisement

Affine Rotation by norm Vector

Started by February 10, 2003 09:39 AM
1 comment, last by oneqnzerop 22 years ago
I've got a little of a problem, i'm looking into matrix tranformations for a while but I can't get or think of a suitable solution for my problem. I've got a norm vector that points into an direction from the middle of a circle. The diameter of this circle is known. Now i want to calculate a number of points on that circle so i can connect them with a Line (just for now). How can i calculate the XYZ-origin of these points preferrable on a way that doesn't asks much time of my CPU? The problem is i can't use functions like the ones in OpenGL because the rendering engine already exists so i must deliver it XYZ-points, for flexability of the rendering engine [edited by - oneqnzerop on February 10, 2003 10:41:31 AM]
So you want to write a function that creates a sphere model?
Advertisement
No more like a tunnel effect, it is for simulating a bloodvessel. I get a point of the vessel and the diameter that is straight on it. Rendering happens in a seperated module, so i only have te give that module coordinates of points. The module makes splines of this points. there are some restrictions like i have to give them points in the correct order. So using glRotatef and alike funtions are not permitted.

For speedup purposes i'am thinking og using a matrix, for series of points i can use the same matrix.

There is no rotation along the z axis. My question is can i adjust a for rotating by inserting some way ore another a normal vextor. Because a normal vextor is just some trigenometry values.

I calculate a point on the circle by using the sin and cos of the angle i want it to be, and then rotate is by multiplieng the matrix with the coords of the point.

Is this possible? And if it is then is the biggest question How.

Rotation around one ax isn't too difficult but multiple axes interfere with another in the matrix.



[edited by - oneqnzerop on February 11, 2003 6:23:28 AM]

This topic is closed to new replies.

Advertisement