Re: Rotations with Quaternions

[email protected]
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
 
Thinking about this a little more, you can get 3d quaternion rotations using a cairo matrix with the restriction that you only get one rotation. This is assuming z=0 for the rotation. After one rotation z wouldn't be 0 anymore. That would mean you would have to put your 3d rotation and drawing in a cairo_save(), cairo_restore() pair to use it for several consecutive drawings. It wouldn't be directly compatible with Cairo's other 2d tranforms either. Not too bad though considering you get 3d rotation of a plane without changing anything internally in Cairo.

https://github.com/cecashon/OrderedSetVelociRaptor/blob/master/Misc/cairo_drawings/rotation1.c

Eric

-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.