2
$\begingroup$

I know that in Mathematica doesn't seem to support vector graphics for 3D ploting, e.g. exporting-2d-projection-of-3d-graph-in-svg-form. But as far as I know, some paid software can achieve this. For example, vectormagic.

What is the principle behind this, and Can Mathematica emulate their algorithms to achieve this? One feasible approach seems to be path-tracing.

  Show[Graphics3D[{Opacity[0.3], FaceForm[Blue], 
           PolyhedronData["SmallRhombicuboctahedron", "Faces"]}], 
         Boxed -> False]

enter image description here

For example, I want to convert the polyhedron above into a vector graphic. Taking a step back, are there any free software options to achieve this?

Edit: Thanks to Stephen Luttrell for reminding me of the function ImageGraphics.

enter image description here

Although I gave it a try, there are some minor details that are not quite satisfactory, such as jagged edges. Maybe I missed some options.

$\endgroup$
5
  • $\begingroup$ $ExportFormat shows SVG $\endgroup$
    – eldo
    Commented Oct 11, 2023 at 9:25
  • $\begingroup$ @eldo Thanks. I know this; but when we import it in SVG-format, the image still appears blurry when enlarged, indicating it's not a true vector graphic. $\endgroup$
    – licheng
    Commented Oct 11, 2023 at 9:27
  • 1
    $\begingroup$ This is a response to your title "Can Mathematica convert bitmaps to vectors?". Maybe ImageGraphics[<image>] will do what you want. $\endgroup$ Commented Oct 11, 2023 at 9:35
  • $\begingroup$ Well. While there are some minor details that are not entirely satisfactory (see the changes later), overall it's okay. $\endgroup$
    – licheng
    Commented Oct 11, 2023 at 12:06
  • $\begingroup$ While this is specifically for text, it does convert well into SVG: Converting an Unicode's image into polygon data for an SVG. I also had to ask someone because I had the same problem getting a nice, real SVG. $\endgroup$
    – Teg Louis
    Commented Oct 11, 2023 at 21:24

0

Your Answer

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