Animating Wolfram surfaces with Blender: Extrude & Transform​
​by Guenther Gsaller
This is a continuation to the posts listed at:
​https://community.wolfram.com/web/ggoff/
Supplementary files for this post are available here: https://www.dropbox.com/s/ql9fcs5u4wefp4n/data.zip?dl=0​
and consisting of dxf-files for import in Blender, blend-files with various states of solution, and mp4-file with animation.

Abstract

In Example 1 utilizes the Wolfram Language to give flat curves volume with two methods and quite different results. Example 2 uses transformed multiples of an object to form several interesting arrangements of itself.

Experiment

Example 1: Structures

Part 1: Curves from 2D to 3D

In[]:=
path0=SetDirectory[NotebookDirectory[]<>"/data/"]
Out[]=
D:\DDocs\0-published\woco\ams14pub\data
A set of closed curves was plotted in 2D:
In[]:=
Clear[t];​​pairs=2+Cos[4t],t+
1
16
πSin[8t],3+
5
2
Cos[4t],t+
1
16
πSin[16t],5+4Cos[4t],t+
5
32
πSin[8t],3+
5
2
Cos[5t],t+
1
16
πSin[20t],{Cos[4t]+2,3Pi/16Cos[8t]+t};​​pp=(ParametricPlot[#[[1]]{Cos[#[[2]]],Sin[#[[2]]]},{t,0,2Pi}])&/@pairs
Out[]=

-3
-2
-1
1
2
3
-3
-2
-1
1
2
3
,
-6
-4
-2
2
4
6
-6
-4
-2
2
4
6
,
-5
5
-5
5
,
-4
-2
2
4
6
-6
-4
-2
2
4
6
,
-3
-2
-1
1
2
3
-3
-2
-1
1
2
3

First and last curve were exported as dxf-file:
In[]:=
Export["c1.dxf",pp[[1]]]
Out[]=
c1.dxf
In[]:=
Export["c2.dxf",pp[[5]]]
Out[]=
c2.dxf
Structure was implemented as Block to
1) extrude a curve from above vertically upwards,
2) to set a 3D-version of this curve on top of the extruded object.
In[]:=
Structure[r_,phi_,h_]:=Block[{pp1,pp2,pp3,h2},​​pp1=ParametricPlot3D[{rCos[phi],rSin[phi],h2},{t,0,2Pi},{h2,0,h},Boxed->False,Axes->False,PlotRange->All];​​pp2=ParametricPlot3D[{rCos[phi],rSin[phi],13-Norm[{rCos[phi],rSin[phi]}]},{t,0,2Pi},Boxed->False,Axes->False];​​pp3=Show[pp1,pp2,PlotRange->All,Boxed->False,Axes->False];​​{pp1,pp2,pp3}​​]​​​​r=Cos[4t]+2;​​phi=t+1/16PiSin[8t];​​d1=Structure[r,phi,10]
Out[]=

,
,

In[]:=
Export["d1.dxf",d1[[2]]]
Out[]=
d1.dxf
In[]:=
r=Cos[4t]+2;​​phi=3Pi/16Cos[8t]+t;​​d2=Structure[r,phi,10]
Out[]=

,
,

In[]:=
Export["d2.dxf",d2[[2]]]
Out[]=
d2.dxf
The “top” curves were exported, again in dxf - format.

Part 2: Animation

Structure implementation was adapted for an animation:
Structure2[r_,phi_,h_]:=Block[{pp1,pp2,pp3,h2},​​pp1=Table[ParametricPlot3D[{rCos[phi],rSin[phi],h2},{t,0,2Pi},{h2,0,h1},Boxed->False,Axes->False,PlotRange->{{-3,3},{-3,3},{-1,12}}],{h1,1,h,1}];​​pp2=ParametricPlot3D[{rCos[phi],rSin[phi],13-Norm[{rCos[phi],rSin[phi]}]},{t,0,2Pi},Boxed->False,Axes->False];​​pp3=Show[Last[pp1],pp2,PlotRange->{{-3,3},{-3,3},{-1,12}},Boxed->False,Axes->False];​​ListAnimate[Flatten[{pp1,pp3}]]​​]
r=Cos[4t]+2;​​phi=t+1/16PiSin[8t];​​Structure2[r,phi,10]
Out[]=

Example 2: Flexibility

Recreation - Spiral Plot of Primes - Wolfram Language

The first 1000 prime number transformed and visualized in a polar plot:
The arm leading to the right upper corner was to be extracted via displayed position in rphiList or by hovering over the needed points and again revealing the necessary info. The plot below zoomed in to get the inner points.
The plot below was superimposed with the chosen inner points.
The chosen points were plotted, then exported as pdf-file:

Preparation & Animation - External Apps & Wolfram Language

In Affinity Designer it was imported as pdf as background, then a vector curve was drawn going through above points. The curve was exported as svg-file. It was imported in Blender and scaled, beveled, modified further and finally exported as stl-file.
The stl-file was imported below:
The next steps were to scale down the imported object, rotating it stepwise around the z-axis and animating the list of objects in two variations:

References

Collection of animations

https://vimeopro.com/orbs78/animations

References

Depth
​​
Scene: Sets of 2D Curves modified to 3D
​
Arthur, Christopher. “Geometric Design, An Artful Portfolio of Mathematical Graphics.” Accessed May 23, 2022. https://wolfram.com/books/profile.cgi?id=9169.
​
“Wolfram Language & System Documentation Center,” May 23, 2022. https://reference.wolfram.com/language/.
​
Audio:
Stock Music & Sound Effects - Royalty Free Audio - Storyblocks
​https://storyblocks.com/audio (accessed 2022-05-23)
MEDIA MUSIC GROUP. Evening In The Distance - Atmospheric Emotional Acoustic. Accessed May 23, 2022. SBA-346804151.
Flexibility​
​
Scene: Spiral (from prime numbers) modified to several 3D-objects
​
Sriraman, Bharath. Handbook of the Mathematics of the Arts and Sciences.
Accessed June 9, 2022. https://link.springer.com/book/10.1007/978-3-319-57072-3.
​
“Wolfram Language & System Documentation Center,” June 9, 2022. https://reference.wolfram.com/language/.
​
Audio:
Stock Music & Sound Effects - Royalty Free Audio - Storyblocks
​https://storyblocks.com/audio (accessed 2022-06-09)
Nelson, Zak. Summer - 30 Seconds. Accessed June 9, 2022 SBA-300360195.