Forums > Jitter

jit.gen & quaternions

July 7, 2012 | 1:23 pm

Hi there,
is there a way to use easily quaternions with jit.gen ??

I need to process a 3 planes matrix with x,y,z space coordinates with jit.gen (which is okay) but my calculation involves quaternions.
Each row of coordinates have to be multiplied by quaternions & quaternions conjugates.

anyone already did that with jit.gen ?
if someone could help even outside of gen, I’d be happy :D

July 9, 2012 | 7:47 pm

hi julien. below is a patch that rotates vectors by a quaternion using jit.gen.

— Pasted Max Patch, click to expand. —
July 9, 2012 | 8:12 pm

Hi Robert,
thanks a lot for your patch.
I’ll try it asap in my system.
I’ll grab the quat from jit.anim.node in order to not have problem with gimbal lock coming from euler angles, but I guess the jit.gen calculations remain the same.

posting when I’ll have tested it.

July 14, 2012 | 4:42 pm

I guess I'm VERY near from my solution.

I'm rotating my vectors by the quaternion rotation.
each vector is made by (objectVector – camVector)

I included your codebox into mine and put the azimuth & elevation calculation in another codebox.

I don't know if it is a problem of vector normalization or whatever, but it still doesn't work.
if I move the camera "around" the object, by keeping the object in the center of my view, I should still have az=0 & el=0 … this is basic and I absolutely don't understand why I don't have that :-(


  1. snapshot.PNG


July 19, 2012 | 8:29 am

Robert, can I request some help ?
I’m still stuck.
I don’t understand where my logic fails

July 25, 2012 | 11:18 am

I tried to grab the rotation quaternion of my cam from jit.anim.node, .. it doesnt work better
This is a calculation error (in the part I made for sure) and I cannot debug it :-(

August 9, 2012 | 8:50 am

anyone else would help me ?

Viewing 7 posts - 1 through 7 (of 7 total)

Forums > Jitter