TransWikia.com

Specifying different thickness for each graded contours of Mandelbrot Set so that I can export it as .STL file.

Mathematica Asked by GibbsJ on December 29, 2020

I am using Mandelbrot Set function in Mathematica to get the Mandelbrot plot. I want to 3d print this model, so want to specify thickness for each contour and then convert into .STL file. Is this possible?

One Answer

enter image description here

pts = ImageData[ColorNegate@Binarize@bild];
g = RegionPlot3D[
    pts[[Sequence @@ Round@{i, j}]] == 1, {i, 1, #1}, {j, 1, #2}, {z, 
     0, 1}, PlotPoints -> 100, Mesh -> False, Axes -> False, 
    Boxed -> False] & @@ Dimensions[pts]
pts = Cases[g, x_GraphicsComplex :> First@x, Infinity]

extruded Mandelbrot plot

This can be exported to STL via the built-in.

Modern alternatives are:

With[{h = 50},(*height*)
 RegionProduct[ImageMesh[bild], MeshRegion[{{0}, {h}}, Line[{1, 2}]]]]

and

ImageMesh[Image3D[ConstantArray[bild, 50]]]

h is here pixel.

Export["Test.stl", pts, {"STL", "BinaryFormat" -> False}]

This example might not be complete on Import.

Answered by Steffen Jaeschke on December 29, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP