This is a continuation to the posts listed at: https://community.wolfram.com/web/ggoff/
Abstract
Abstract
Example 1 prepared the pieces for an animated visualization of a tree-ship and a special tree species described in the Hyperion Cantos by Dan Simmons. In Example 2 a lanthanide complex and one the possible coordination polyhedra and the transition to another object was visualized.
Experiments
Experiments
Example 1: Tree
Example 1: Tree
Initialization
Initialization
In[]:=
path0=SetDirectory[NotebookDirectory[]<>"/data/"]
Out[]=
D:\DDocs\0-published\woco\ams11pub\data
Buckminster fullerene
Buckminster fullerene
As the source for the 3D-structure for the enclosure a Buckminster fullerene was chosen:
In[]:=
bmf=
Out[]=
The 3D-structure was exported as ply-file:
In[]:=
Export["c60a.ply",bmf]
Out[]=
c60a.ply
The coordinates for the C-atoms were extracted and a polyhedral mesh constructed via ConvexHullMesh[]:
In[]:=
coords=bmf[[1,5,1]];
In[]:=
chm=ConvexHullMesh[coords]
Out[]=
The 3D-structure, later used as transparent hull, was exported as ply-file:
In[]:=
Export["c60b.ply",chm]
Out[]=
c60b.ply
Both structures were shown together:
In[]:=
Show[bmf,chm]
Out[]=
Fractal tree
Fractal tree
User chyanog entered a fast code for a fractal tree in Mathematica Beta forum:
Clear["`*"];s=1./GoldenRatio;thickness=0.15;next=Table[{a,b}//TranslationTransform[b-a]//RotationTransform[Pi/4,{Cos[2kPi/3],Sin[2kPi/3],0},b]//ScalingTransform[{1,1,1}s,b],{k,3}]/.Thread[{a,b}->Table[Indexed[A,{x,y}],{x,2},{y,3}]]/.expr_:>Compile[{{A,_Real,2}},expr,RuntimeAttributes->{Listable}];pts=Table[MapIndexed[Flatten[#,#2[[1]]-1]&,NestList[next,N@{{{0,0,0},{0,0,1}}},n]],{n,0,6}];colTree=Table[Graphics3D[MapIndexed[With[{id=#2[[1]]},{ColorData["Rainbow",1-id/10],MapIndexed[Sphere[#,t=#2[[1]]/10;k=thicknesss^id;k(1-t)+tks]&,Subdivide[#[[1]],#[[2]],9]]}]&,pts[[i]],{2}],Boxed->False],{i,1,6}];
The sizes of the trees were normalized:
In[]:=
rb=RegionBounds[DiscretizeGraphics[colTree[[6]]]]
Out[]=
{{-1.13322,1.13322},{-1.26427,0.91296},{-0.0891641,2.14766}}
The tree stages were plotted again and half of them exported as ply-files:
In[]:=
colTree2=Show[#,PlotRange->rb]&/@colTree
Out[]=
In[]:=
Do[Export["tree"<>ToString[i]<>".ply",colTree2[[i]]],{i,2,6,2}]
Blender
Blender
Part 1:
The imported buckyball with reduced geometry was given a wood-like material. Then the convex hull was imported. It got a glass-like transparent material.
Part 2:
Three different phases from the tree development were placed within the spherical hull with a slant and distributed symmetrically. In the first animation they were combined. They were given a material with a color gradient.
Part 3:
Then the tree was shown growing followed by a complete rotation around the z-axis via empty object and parenting.
Part 4:
The camera was moved to show a view within the enclosure again a rotation followed. Then a zoom-out was implemented. The material transparency of the enclosure was changed from 1 to 0 and vice versa.
Part 5:
A color-changing, growing tree was animated together with a shrinking and finally vanishing enclosure.
The imported buckyball with reduced geometry was given a wood-like material. Then the convex hull was imported. It got a glass-like transparent material.
Part 2:
Three different phases from the tree development were placed within the spherical hull with a slant and distributed symmetrically. In the first animation they were combined. They were given a material with a color gradient.
Part 3:
Then the tree was shown growing followed by a complete rotation around the z-axis via empty object and parenting.
Part 4:
The camera was moved to show a view within the enclosure again a rotation followed. Then a zoom-out was implemented. The material transparency of the enclosure was changed from 1 to 0 and vice versa.
Part 5:
A color-changing, growing tree was animated together with a shrinking and finally vanishing enclosure.
Example 2: Core
Example 2: Core
Initialization
Initialization
In[]:=
path0=SetDirectory[NotebookDirectory[]<>"/data/"]
Out[]=
D:\DDocs\0-published\woco\ams11pub\data
Ball & Stick
Ball & Stick
The complex was created with Complex Builder then optimized with xtb.
The molecule was imported as pdb-file and exported as ply-file.
The molecule was imported as pdb-file and exported as ply-file.
As preparation for embedding the coordination polyhedron, the bounds for the complex imported as ply-file were calculated:
Parts of the molecule were imported to extract the oxygen atoms and their position:
The first 10 positions were needed to build the chosen polyhedron:
Hint:
For Lanthanide complexes quite a few coordination polyhedra are possible. A slight distortion can result in a flip to another configuration (with the same coordination number).
For Lanthanide complexes quite a few coordination polyhedra are possible. A slight distortion can result in a flip to another configuration (with the same coordination number).
In tan earlier animation about a MRI-contrast agent the polyhedron was built from scratch. Here a shortcut via the convex hull was used:
The polyhedron was exported incl. bounds, in order to fit together with the molecule.
Stick
Stick
A second version was created (sticks only) and exported.
Blender
Blender
Part 1:
The Europium complex and the polyhedron were imported as ply-files. The molecule was given a metallic material. For the polyhedron an amber colored glassy material was used. The movement was implemented as a combination of object-rotation and camera-zooming.
The Europium complex and the polyhedron were imported as ply-files. The molecule was given a metallic material. For the polyhedron an amber colored glassy material was used. The movement was implemented as a combination of object-rotation and camera-zooming.
Part 2:
Both materials were changed to transparent. The second version of the complex was imported and given a weathered textured material. Parallel to the vanishing of the first two objects the transparency for the new material was increased from 0 to 1.
Both materials were changed to transparent. The second version of the complex was imported and given a weathered textured material. Parallel to the vanishing of the first two objects the transparency for the new material was increased from 0 to 1.
Part 3:
The combined object was given a reverse movement to Part 1.
The combined object was given a reverse movement to Part 1.
References
References
Collection of animations
Collection of animations
References
References
Tree
Scene: Modified Buckminsterfullerene, Convex Hull & Fractal Tree
PenguinRandomhouse.com. “The Hyperion Cantos 4-Book Bundle by Dan Simmons: 9780804180580 | PenguinRandomHouse.Com: Books.” Accessed March 31, 2022. https://penguinrandomhouse.com/books/240175/the-hyperion-cantos-4-book-bundle-by-dan-simmons/.
“Buckminsterfullerene - Wolfram|Alpha.” Accessed March 31, 2022. wolframalpha.com.
User: chyanog. “Programming - 3D Tree in Mathematica?” Mathematica Stack Exchange. Accessed March 31, 2022. https://mathematica.stackexchange.com/questions/154213/3d-tree-in-mathematica.
“Wolfram Language & System Documentation Center,” March 31, 2022. https://reference.wolfram.com/language/.
Audio:
Stock Music & Sound Effects - Royalty Free Audio - Storyblocks
https://storyblocks.com/audio (accessed 2022-03-31)
Media-Music Group. Motivational And Inspirational Success For Corporate. Accessed March 31, 2022. Asset ID: SBA-346533820.
Scene: Modified Buckminsterfullerene, Convex Hull & Fractal Tree
PenguinRandomhouse.com. “The Hyperion Cantos 4-Book Bundle by Dan Simmons: 9780804180580 | PenguinRandomHouse.Com: Books.” Accessed March 31, 2022. https://penguinrandomhouse.com/books/240175/the-hyperion-cantos-4-book-bundle-by-dan-simmons/.
“Buckminsterfullerene - Wolfram|Alpha.” Accessed March 31, 2022. wolframalpha.com.
User: chyanog. “Programming - 3D Tree in Mathematica?” Mathematica Stack Exchange. Accessed March 31, 2022. https://mathematica.stackexchange.com/questions/154213/3d-tree-in-mathematica.
“Wolfram Language & System Documentation Center,” March 31, 2022. https://reference.wolfram.com/language/.
Audio:
Stock Music & Sound Effects - Royalty Free Audio - Storyblocks
https://storyblocks.com/audio (accessed 2022-03-31)
Media-Music Group. Motivational And Inspirational Success For Corporate. Accessed March 31, 2022. Asset ID: SBA-346533820.
Core
Scene: Modified Convex Hull & Europium Complex
Munguba, Gabriel H. L., Gabriel A. Urquiza-Carvalho, Frederico T. Silva, and Alfredo M. Simas. “The Complex Build Algorithm to Set up Starting Structures of Lanthanoid Complexes with Stereochemical Control for Molecular Modeling.” Scientific Reports 11, no. 1 (November 2, 2021): 21493. https://doi.org/10.1038/s41598-021-99525-0.
Bannwarth, Christoph, Eike Caldeweyher, Sebastian Ehlert, Andreas Hansen, Philipp Pracht, Jakob Seibert, Sebastian Spicher, and Stefan Grimme. “Extended Tight-Binding Quantum Chemistry Methods.” WIREs Computational Molecular Science 11, no. 2 (2021): e1493.
https://doi.org/10.1002/wcms.1493.
“Wolfram Language & System Documentation Center,” March 23, 2022. https://reference.wolfram.com/language/.
Audio:
Stock Music & Sound Effects - Royalty Free Audio - Storyblocks
https://www.storyblocks.com/audio (accessed 2022-03-23)
Piddubnyk, Volodymyr. Inspiring Epic Orchestral Trailer [ Version 6 | Short ]. Accessed March 23, 2022. Asset ID: SBA-300538680.
Scene: Modified Convex Hull & Europium Complex
Munguba, Gabriel H. L., Gabriel A. Urquiza-Carvalho, Frederico T. Silva, and Alfredo M. Simas. “The Complex Build Algorithm to Set up Starting Structures of Lanthanoid Complexes with Stereochemical Control for Molecular Modeling.” Scientific Reports 11, no. 1 (November 2, 2021): 21493. https://doi.org/10.1038/s41598-021-99525-0.
Bannwarth, Christoph, Eike Caldeweyher, Sebastian Ehlert, Andreas Hansen, Philipp Pracht, Jakob Seibert, Sebastian Spicher, and Stefan Grimme. “Extended Tight-Binding Quantum Chemistry Methods.” WIREs Computational Molecular Science 11, no. 2 (2021): e1493.
https://doi.org/10.1002/wcms.1493.
“Wolfram Language & System Documentation Center,” March 23, 2022. https://reference.wolfram.com/language/.
Audio:
Stock Music & Sound Effects - Royalty Free Audio - Storyblocks
https://www.storyblocks.com/audio (accessed 2022-03-23)
Piddubnyk, Volodymyr. Inspiring Epic Orchestral Trailer [ Version 6 | Short ]. Accessed March 23, 2022. Asset ID: SBA-300538680.