How to transform a rotation to a normal vector?

Hello there,
This is probably an easy solution that I can’t seem to find help or come across with.

I have an array of surface normal vectors that I would like to rotate individually with a standard XYZ matrix, with the matrix being relative to each normal vector (Think a cube that, while rotated in different ways, will still rotate relatively in X / Y / Z etc).

I’ve tried rotating the surface normal vector / transforming etc but still haven’t quite got it, any help would be greatly appreciated!

Hopefully this diagram is understandable

1 Like

You can rotate a vector with just

image

I’ve attempted that but it doesn’t seem to function the way I need? Maybe I’m using it wrong though

Tell me a bit about what you’re trying to do…

I am tracing against against this sphere, getting the surface normal from it (an array), at the moment I am applying a rotation from X vector to my meshes (gnomon handles), I would like to be able to rotate these in their own relative rotations.


I’m working from ‘inside’ the planet here

and later

final placement

Hope that makes sense…

1 Like

Aha! You beautiful person, that seems to have done the job!
More or less I followed the same logic you had but only with the combine rotator alongside the surface normal of the sphere. Here’s the result and little graph snippet if anyone else comes across this.

Thank you once again!

1 Like

That’s right, because the random unit vector is always a sphere surface normal :slight_smile:

For future reference, the critical thing is the order of the pins in the ‘combine rotator’.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.