[cairo] Morphing Sphere

cecashon at aol.com cecashon at aol.com
Sun Sep 13 20:51:39 UTC 2020

Hi everyone,

I put together a morphing 3d sphere using cairo. It works but the pieces need to be drawn from back to front. A bit of a problem for z depth curve sorting and drawing. The pieces can be made smaller for better rendering but there is no depth testing on the pixel level. Can still get some nice anti-aliased 3d drawings though.

If the OpenGL backend is used and depth testing enabled then I would think that this would solve the problem(Haven't tried it) but would cause another problem by not outputting to pdf or svg correctly or the same as what is seen on the screen.

The use of vector graphics is very useful. For example putting together pdf's into a layout and being able to print good looking poster sized graphics in a print shop.

Does anyone have experience with pdf 3d and sending output to a printer? Does the print driver allow depth testing on the transformed 3d content of the pdf file? Is that part of the pdf 3d spec(Haven't been able to look at the newer spec or get a copy)? Is that something cairo could do if it supported a newer version of pdf?


Morphing sphere in cairo3d.c, cairo3d.h and cairo3d_UI.c. Points in the sphere can be changed in the options2 tab.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20200913/df4cec9a/attachment.htm>

More information about the cairo mailing list