**THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED**

*On 01/07/2004 at 05:23, xxxxxxxx wrote:*

User Information:

Cinema 4D Version: 8.500

Platform: Windows ;

Language(s) : C++ ;

---------

Hi forum,

Now I'm stuck with matrices. Maybe somebody can help me out. Mikael?

Again, I want to rebuild the functionality of the sweep nurbs. To find the point positions of the sweep I want to generate a matrix to multiply the base points of the contour with

Here I have a linear rail spline (black) and some linear contour splines (yellow). This is supposed to be the end result

Here is a cutout of the railspline. I want to generate a matrix that allows me to transform the contourspline in a way that it sits on point b and orients its x-axis with the vector W, wich is Q plus P. The problem is, that W flips, if point b is moved to the left.

What I do currently is the following (in pseudocode) :

m.off = b;

m.v1 = W;

m.v3 = m.v1%Vector(0,1,0);

m.v2 = m.v1%m.v2;

this is far from optimal. What I want is to maintain the base orientation of the contour. It only has to be adjusted to mach W.

Any ideas. Help is much appreciated. Thanx in advance, as everytime

cheers mnu