# generate rotation matrix from line object

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

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

On 03/07/2004 at 08:51, xxxxxxxx wrote:

Look up parallel transport.

darf

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

On 04/07/2004 at 11:00, xxxxxxxx wrote:

Hi darf,

Thanx for the tip. Meanwhile I found this myself. Do you know wether C4D's Sweep Nurbs uses Parallel Transport or Frenet Frames? I think with Banking turned off it's Frenet with Banking on Parallel Transport.

cheers mnu

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

On 04/07/2004 at 12:16, xxxxxxxx wrote:

Nevertheless I would be glad to hear some further input. Is parallel transport the best way to go. How do you guys handle this stuff? Thanx again for your help

cheers mnu

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

On 04/07/2004 at 21:35, xxxxxxxx wrote:

In MSA I just let the user choose the "up" direction, possible dynamically using an align spline. That seems to work fine for most cases. In Helix I use an approach where I try to minimise the banking from the previous coordinate frame along the spline.