Scratchpole's picture
Shared by on 2019.01.14 13:39

Rotations have perplexed me for ages but I think I'm getting closer to understanding the rudimentaries. Why are there no 4d/quaternion examples included anywhere?

In the long run I want to be able to have a 'snake' which follows a 3d point and always keeps facing in the right direction. Can anyone help with that?

Currently if I add a z position into the rotation it all goes awry.

+0
Interesting
+1
Helpful
+0
Unique

Download composition

Tested with

Vuo version:
OS version:

Comments

Here are some discussions

jstrecker's picture
Submitted by

Here are some discussions with examples: Calulating a circular movement of a light-source and How to rotate an object towards another object?.

The data going into the Rotation port of Make Quaternion Transform should come from a Make Quaternion from Vectors or Make Quaternion from Angle node.

Does the attached composition do what you want? I'm not sure which direction is the "right direction".

Thanks Jaymie, that helps a

Scratchpole's picture
Submitted by

Thanks Jaymie, that helps a bit. Guess I should have said correct direction, to follow the point. I made it work in the same manner with the Kinect/NImate (which outputs a quaternion anyway).

I don't understand why the first vector in Make Quaternion from Vectors is 1,0,0.

I also don't know how to use a 4d point to begin building a structure of vertex as in the shaft of the Rotating Arrow comp I shared, so that I can replace the cubes with a 'snake'.

So I think I'm just about

Scratchpole's picture
Submitted by

So I think I'm just about understanding quaternions now and have created my first snake using 'correct' rotations. See attached, it uses Right_hand from the kinect in NImate or click the mouse and it uses waves and noise to drive the transforms. Uses stv.generate circle to make the initial points.

Very happy to have finally achieved this as it's something I was trying to get my head around years ago with Qtz.

Add comment

Log in or register to post comments