7
$\begingroup$

I noticed that exporting a Graphics3D object into a vector graphics format, like SVG or PDF, produces a rasterized version of the graphics, while 2D objects are correctly exported to vector format.

So my question is: is there built-in function, or does someone have a ready-made Mathematica routine to convert a Graphics3D object into a corresponding and similar-looking Graphics object, so that it could be exported as a high quality vector format?

$\endgroup$
3
  • $\begingroup$ There were several discussions about this, search e.g. for "AllowRasterization". But my advice is to just stick to raster output for 3D. Think about what final resolution you need (600 dpi should be enough) and prepare figures to size. My opinion is (and yes, this is just an opinion) that in recent Mathematica versions it is not worth bothering with exporting 3D graphics to vector formats. There are too many limitations anyway. $\endgroup$
    – Szabolcs
    Commented Mar 2, 2017 at 17:38
  • $\begingroup$ See previous questions (13893), (87733) and links therein $\endgroup$
    – Felix
    Commented Mar 2, 2017 at 17:39
  • 1
    $\begingroup$ (+1) I wish to have such possibility for a long time! Even a function which can handle Graphics3D with only simplest primitives (Point, Line, Polygon and Text) would be a huge step forward (I mean without resorting to ImportString[ExportString[#, "PDF"], "PDF"]& of course)! $\endgroup$ Commented Mar 18, 2017 at 16:47

1 Answer 1

2
$\begingroup$

Yes, PostScipt. Mathematica 11.0 has less support than say 4.0: however it does still have support. Compressed PostScript is know as "PDF".

A different route to go would be AutoCAD (see Export documentation) - AutoCAD has a vector editor.

PostScript is a programming language that et alia has excellent 2D vector graphics that Mathematica uses (it runs on network printers).

Infact older Mathematica could not show Arrow[] in the front end without PostScript.

The caveate is 3D vector graphics are notoriously not easily imported / exported: they get the scene right, but when you export/import you loose the ability to EDIT the scene, and this is true of other formats too (ie, xfig - if you export from that then import into a difference vector editor you'll may have lost all your groupings and have a document that's nearly impossible to edit).

Finally, there's 3DStudio and even raytracing (again, see Export). Just because it's in 3D doesn't mean you can't use vectors on 2 axis and import/export them: and using 3D there are more options?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.