Hi guy! I’m not really understanding how the rotation transformation works
this is my problem: I have some shape, and I wanna rotate them in the direction of the line center_shape/center_screen
I have all the centres, and all the angles of the vectors (0,0)–>(shape)
I guess I must combine two transformation in order to have my rotation, but I cannot sort it out…
ps the patch here is just an example, the real stuff is way more complicated, a.e. I cannot rotate one shape and then duplicate it around the center
rotation.v4p (15.3 kB)
i think apply transform aren’t working that way
yes, was just one of the tentative
I made an example of how you can rotate the shapes, in general I would recommend you to use individual transformations instead of using the transform node, it is my experience that it helps most people understanding what is going on in what order.
see attached patch with comments
Rotations.v4p (14.5 kB)
I mean I would not construct the vertices with the final positions needed, but translate the shape made around 0,0,0 to the desired position
Brilliant! But, unluckily, I cannot do what you say… It is a good idea, but I need to really transform the coordinates of each points. The real situation is way more complicates, the patch here is only a simplification.
Let’s say I have something like this:
and the point called “center” is moving every time
Rotation2.v4p (10.6 kB)
yes the center moving but the shapes not
ah, I am getting closer to understanding, that is of course more complex… I will give it a shot
Here is another version that might do it… you might need to rotate the shape as the very first transform to head it the right way.
is this correct?
Rotations4.v4p (18.6 kB)
with an added rotation to make the shapes point to the center
Rotations4-1.v4p (19.3 kB)
with fancy moving center
Rotations4-2.v4p (21.9 kB)
Quite impressive… But actually I’m unable to let this works inside the Rotation2.v4p (see the 6th post, the one starting with “Brilliant! But…”)
Every time I try I got really strange behaviour
Perhaps I just need to work on it with fresh mind
Rotations2-1.v4p (22.9 kB)
wow! Lots of lots of lots of thanks!
almost there, last thing missing. Really really hard to explain by words…
Actually the shape follow the moving point, in orientation. What I’m trying to do is in the image… Rotating, time by time, only around the green axis, not around the others
do you need fixed axes (green lines) or will they change?
mmmm the things is like this:
randomly fixed a centre, the objects make a full rotation (360 degrees) around the green axis (centre-ojbect). Then after a while, a new centre is choose, and again there is a new green axes and a new rotation. But during the rotation the centre not move, an so don’t does the axes
have you tried AxisAngle (Quaternion Set) node or quaternions all-together? they can solve a lot of stuffs what would be a headache with euler rotations.
Perhaps quaternions are the answer… I don’t know anything of them. I got it to a point currently, where we need to have some sort of memory of the rotation… so thinking about something with a framedelay, but that will change the structure quite a bit I think.
the attached patch has it as far as I could get without framedelay… perhaps some thinking tomorrow will bring it a bit further.
Rotations2-2.v4p (24.4 kB)
Hi microdee. Sure I tried with quaternions. I’m able to obtain what I want when dealing with quad, like in this example (I just put a red quad with the same position of the center of the shape)
and it works! but I cannot do the same for the mesh. When I try I can only reach improvable result
Quaternion.v4p (15.0 kB)