Re: Rotations with Quaternions

[email protected]
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
 
Hi Bryce,

Making some progress but still testing. I put the code that does the rotations within the program, into a widget. The drawing looks sharp and works well.

https://github.com/cecashon/OrderedSetVelociRaptor/tree/master/Misc/VeloGyro

With the rotation1.c program I added the rings and have cairo do all the rotations. It uses the existing cairo matrix, a little bit of a hack, to transform the points in the drawing. Just need to use a cairo_save() and cairo_restore() pair. Better performance here. Works and looks good. Might end up merging it into the widget.

I got cairo setup to test with. Still testing in user space with GTK+ though. Like the animation stuff. 

This could use a 3x3 matrix but right now it is being reduced to 2x2 which seems to work pretty good for 3d rotations in 2d.

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.