MAMBO logo MAMBO & the MAMBO Toolbox MAMBO logo

Sample project - Tetrahedron

To illustrate the use of rotations to represent orientations.

This Mambo project contains a stationary tetrahedral arrangement of blocks.

l: lengths of the edges of the tetrahedron.

Modify the Mambo project to generate three-dimensional representations of complex organic molecules where blocks are used to represent chemical bonds and different-colored spheres are used to represent different atomic species (cf. the Pyramid Mambo project).

tetra.zip (zip file, 4 kb, February 14, 2013)
This zip archive contains MAMBO and the MAMBO toolbox source files to visualize the MAMBO project and regenerate visualization files using maple 16, mupad 5.6.0 (matlab R2011a), and mathematica 8.0 versions of the code found below.


Click here to expand/contract!
>Restart():

Click here to expand/contract!
>DeclareObservers(W):
>DeclarePoints(W,seq(cat(E,k),k=1..6)):
>DeclareTriads(w,seq(cat(e,k),k=1..6)):
>DefineObservers([W,W,w]):
>assume(l>0):
>rWC1:=MakeTranslations(w,-l/2,-l*sqrt(3)/6,-l*sqrt(6)/12):
>rWC2:=MakeTranslations(w,l/2,-l*sqrt(3)/6,-l*sqrt(6)/12):
>rWC3:=MakeTranslations(w,0,l*sqrt(3)/3,-l*sqrt(6)/12):
>rWC4:=MakeTranslations(w,0,0,l*sqrt(6)/4):
>DefinePoints([W,E1,(1/2) &** (rWC1 &++ rWC2)],[W,E2,(1/2) &** (rWC2 &++ rWC3)],[W,E3,(1/2) &** (rWC3 &++ rWC1)],[W,E4,(1/2) &** (rWC1 &++ rWC4)],[W,E5,(1/2) &** (rWC2 &++ rWC4)],[W,E6,(1/2) &** (rWC3 &++ rWC4)]):
>edges:=[rWC2 &-- rWC1,rWC3 &-- rWC2,rWC1 &-- rWC3,rWC4 &-- rWC1,rWC4 &-- rWC2,rWC4 &-- rWC3]:
>k:=1:
>for each in edges do
   b1:=(1/VectorLength(each)) &** each:
   b2:=(1/VectorLength(b1 &xx MakeTranslations(w,3))) &** (b1 &xx MakeTranslations(w,3)):
   b3:=b1 &xx b2:
   DefineTriads(w,cat(e,k),simplify(Matrix(3,3,(i,j)->MakeTranslations(w,i) &oo cat(b,j)))):
   k:=k+1:
od:

Click here to expand/contract!
>DefineObjects(seq([W,'Block',point=cat(E,k),orient=cat(e,k),xlength=l,ylength=l/10,zlength=l/10,color=yellow],k=1..6)):

Click here to expand/contract!
>GeometryOutput(main=W,parameters=[l=1],checktree,checkargs,filename="tetra.geo");
>MotionOutput(ode={},parameters=[l=1],filename="tetra.dyn");

Sample projects