Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how to enhance this 3d implicit plot ?

I have tried to reproduce a simple object (namely the intersection of 3 cylinders), which is a useful example for 3D printing, as follows:

sage: x, y, z = var('x,y,z')
sage: cm = colormaps.Blues
sage: cf = (x + y + z + 8) / 16
sage: f = max_symbolic(x*x + y*y, x*x + z*z, y*y + z*z) - 1
sage: N = 60
sage: implicit_plot3d(f,(x,-1.1,1.1),(y,-1.1,1.1),(z,-1.1,1.1),color=(cf,cm),plot_points=N)

This works, and is not too bad, but there is a strange effect along the crests where the cylinders intersects. Probably due to our marching cube algorithm.

This may be hard, but does anybody have an idea how to do something better ?

how to enhance this 3d implicit plot ?

I have tried to reproduce a simple object (namely the intersection of 3 cylinders), which is a useful example for 3D printing, as follows:

sage: x, y, z = var('x,y,z')
sage: cm = colormaps.Blues
sage: cf = (x + y + z + 8) / 16
sage: f = max_symbolic(x*x + y*y, x*x + z*z, y*y + z*z) - 1
sage: N = 60
sage: implicit_plot3d(f,(x,-1.1,1.1),(y,-1.1,1.1),(z,-1.1,1.1),color=(cf,cm),plot_points=N)

This works, and is not too bad, but there is a strange effect along the crests where the cylinders intersects. Probably due to our marching cube algorithm.

This may be hard, but does anybody have an idea how to do something better ?

REFERENCE: page 15 of http://www.math.harvard.edu/~knill/3dprinter/documents/trieste.pdf