2
$\begingroup$

I am a attempting to render and export a model lorenz attractor to .stl using Mathematica, so that I may 3D print it! I was able to come across a notebook (from a deeper end of Mathematica than I swim in), which offers a very clean render of the attractor. The necessary portion appears below:

b := 8/3
σ := 10
r := 28
x0 := 1
y0 := 5
z0 := 10
soln = Quiet@
NDSolve[SetPrecision[{x'[t] == σ (-x[t] + y[t]), 
   y'[t] == r x[t] - y[t] - x[t] z[t], z'[t] == x[t] y[t] - b z[t],
   x[0] == x0, y[0] == y0, z[0] == z0}, Infinity], {x[t], y[t], 
   z[t]}, {t, 0, 23.23}, PrecisionGoal -> ControlActive[4, 8], 
WorkingPrecision -> ControlActive[MachinePrecision, 20]];
ParametricPlot3D[Evaluate[{x[t], y[t], z[t]} /. soln], {t, 0, 23.23}, 
PlotRange -> All]

The Export command lets me create an .stl file from any 3D graphic object (in this case ParamatricPlot3D), but this particular Graphics 3D object I cannot currently export to .stl, which I assume is because the object is an infinitely thin space curve? When I bring the ParametricPlot3D command into

Export["Lorenz.stl", *]

I receive the following error message:

Export::nodta: Graphics3D contains no data that can be exported to the STL format.

I've attempted searches on the Wolfram Documentation Center and this forum looking for graphics options relating to ParaMetricPlot3D, which would allow me to plot the curve with volume. I haven't been able to find anything of use (maybe I'm bad at looking), but I imagine two solutions which may be feasible: Either a "thickening" of the space curve into a circular cross-section/cord/space-noodle, or else an arrangement of spherical "beads" overlapping on t-intervals, similar the cover of the below DiffEq textbook:

http://ecx.images-amazon.com/images/I/51GwV1%2BFpoL.SS500.jpg

Thank you for any help anyone might offer. Apologies for my lack of personal direction in this matter, but this particular aspect of Mathematica graphics isn't something I've had call to consider until just now.

$\endgroup$
  • $\begingroup$ You could just put a /. Line -> Tube on the end of your plot. $\endgroup$ – wxffles Nov 25 '14 at 1:21
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Dr. belisarius Nov 25 '14 at 1:34
2
$\begingroup$

First Tubify all lines

Lor=ParametricPlot3D[Evaluate[{x[t], y[t], z[t]} /. soln], {t, 0, 23.23}, 
PlotRange -> All, PlotStyle -> Tube[.5]]

For 3D printing

next,

Export["Lorenz.stl", %] 

etc.

Then in paraview

Mathematica graphics

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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