I'm trying to draw a sphere inside a cone with Python, rotate it to the desired view, and export it as a vector graphics file (svg or pdf for example).
I can easily save a matplotlib figure as an svg/pdf, but unfortunately matplotlib cannot handle occlusions correctly, i.e., either the entire cone occludes the sphere or the other way around (even though the sphere should occlude the back of the cone, while the front of the cone should occlude the sphere) (see question regarding this behavior).
I managed to draw it with Plotly and get the correct occlusions but I couldn't export the view as a real vector graphics file, because, as written in the Plotly documentation:
figures containing WebGL traces (i.e. of type scattergl, heatmapgl, contourgl, scatter3d, surface, mesh3d, scatterpolargl, cone, streamtube, splom, or parcoords) that are exported in a vector format will include encapsulated rasters
Is there a library that handles 3D occlusions correctly and allows exporting the current view of the scene to a vectorized SVG/PDF file? If there is a way to implement thick outlines in addition to the surface color (that change with rotating the view), it would be even better.
Thank you!