Rotating a Vector3d changes its length - Why? [Solved]

OK, this is a simple case - I have a vector, 10 mm long in Z direction (pointing straight up). Then I rotate the vector using a Rotate3D component (rotating only around Y axis).

  • At 0 degree all is fine, the vector stays 10mm long.
  • At any other angle the length of the vector changes (!!!).

Fig.1. At Y angle 90 degrees the vector’s length has gone from 10mm to 59.58 mm :

What is happening here? They vectior and the line (see def. below) doesn’t even rotate with the same angle despite identical setup…

Edit: The GH definition: (20.2 KB)

// Rolf

OK, so there’s a special rotate component for rotating vectors. When using VRot the vector starts to behave again. (21.9 KB)

// Rolf

was wondering either, naturally a rotating vector becomes greater in dimension but was thinking how it got to 59.58 maybe i am not that good in maths and thats just purely random

Why would it become greater? I didn’t expect that. :open_mouth:

// Rolf

That’s not what happens. The Transform components can’t really deal with vectors, because vectors aren’t really geometry. They don’t exist anywhere in space. So when you apply a transformation, it actually automatically converts the vector to a point. You can see this when you look at the output of the Rot3D component, it draws points. When you then convert that point back to a vector and measuring the length, you’re basically measuring the distance from (0,0,0) to the point.

So yes, don’t transform Vectors, there’s special components in the Vector panel especially for this reason.

Thank you for this explanation. I should have figured that one out.

Learning something new everyday. :slight_smile:

// Rolf

1 Like