Ask Your Question

Revision history [back]

I looked around too, and I couldn't see a way to convert a 3D graphics object to a plain graphics object. I did, however, notice the translate function, which could provide a workaround: you could translate your objects by different amounts so that .show() results in something like a graphics array. This is even better, in some ways, because it remains a 3D object, which you can render in various different ways. Here's an example:

sage: graphiclist = [dodecahedron(),sphere(color='red'),sphere(color='yellow')]
sage: h = sum(graphiclist[i].translate((2*i,0,0)) for i in range(len(graphiclist)))
sage: h.show()

And the result is:

image description

Of course translating by multiples of (2,0,0) worked out because each of the 3D graphics I started with was in the cube [-1,1]^3, but you could write a function to determine the bounding boxes of your objects and translate them by the maximum box-width.