Appendix B:
The Mathematica Code

The Triangle

Initialize various packages, settings, and functions
[Graphics:Images/appendixb_gr_1.gif]
Define the force function
[Graphics:Images/appendixb_gr_2.gif]
Define the fourth-order RK4 algorithm
[Graphics:Images/appendixb_gr_3.gif]
Define constants
[Graphics:Images/appendixb_gr_4.gif]
Define equilibrium configuration
[Graphics:Images/appendixb_gr_5.gif]

The analytic solution

Define the potential energy function

[Graphics:Images/appendixb_gr_6.gif]
[Graphics:Images/appendixb_gr_7.gif]

check that the potential energy in this configuration is really zero:

[Graphics:Images/appendixb_gr_8.gif]
[Graphics:Images/appendixb_gr_9.gif]

Generate the Hessian (H)

[Graphics:Images/appendixb_gr_10.gif]
[Graphics:Images/appendixb_gr_11.gif]
[Graphics:Images/appendixb_gr_12.gif]

Find the eigenvalues and eigenvectors

[Graphics:Images/appendixb_gr_13.gif]
[Graphics:Images/appendixb_gr_14.gif]
[Graphics:Images/appendixb_gr_15.gif]
[Graphics:Images/appendixb_gr_16.gif]
[Graphics:Images/appendixb_gr_17.gif]
[Graphics:Images/appendixb_gr_18.gif]

The general solution

select the component of each normal mode to appear in the solution:

[Graphics:Images/appendixb_gr_19.gif]
[Graphics:Images/appendixb_gr_20.gif]

Visualize the analytic motion

[Graphics:Images/appendixb_gr_21.gif]

[Graphics:Images/appendixb_gr_22.gif]

The numerical solution

Define initial conditions

We set the inital position of the vertices to be the same as that chosen by α in the analytic solution (this is just to help the comparison, any points could be used):

[Graphics:Images/appendixb_gr_23.gif]
[Graphics:Images/appendixb_gr_24.gif]
[Graphics:Images/appendixb_gr_25.gif]

Visualize the motion

[Graphics:Images/appendixb_gr_26.gif]

[Graphics:Images/appendixb_gr_27.gif]

Comparing the solutions

First we sample the analytic solution at the same intervals as the numeric solution:

[Graphics:Images/appendixb_gr_28.gif]

The frequency spectrum of both solutions:

First we window the data:

[Graphics:Images/appendixb_gr_29.gif]
[Graphics:Images/appendixb_gr_30.gif]

Then we reincorporate the angular frequency:

[Graphics:Images/appendixb_gr_31.gif]

plot the results:

[Graphics:Images/appendixb_gr_32.gif]

[Graphics:Images/appendixb_gr_33.gif]

[Graphics:Images/appendixb_gr_34.gif]

[Graphics:Images/appendixb_gr_35.gif]

[Graphics:Images/appendixb_gr_36.gif]

[Graphics:Images/appendixb_gr_37.gif]

[Graphics:Images/appendixb_gr_38.gif]

The Tetrahedron

Initialize various packages, settings, and functions
[Graphics:Images/appendixb_gr_39.gif]
Define the force function
[Graphics:Images/appendixb_gr_40.gif]
Define the fourth-order RK4 algorithm
[Graphics:Images/appendixb_gr_41.gif]
Define constants
[Graphics:Images/appendixb_gr_42.gif]
Define equilibrium configuration
[Graphics:Images/appendixb_gr_43.gif]

The analytic solution

Define the potential energy function

[Graphics:Images/appendixb_gr_44.gif]
[Graphics:Images/appendixb_gr_45.gif]

check that the potential energy in this configuration is really zero:

[Graphics:Images/appendixb_gr_46.gif]
[Graphics:Images/appendixb_gr_47.gif]

Generate the Hessian (H)

[Graphics:Images/appendixb_gr_48.gif]
[Graphics:Images/appendixb_gr_49.gif]
[Graphics:Images/appendixb_gr_50.gif]
[Graphics:Images/appendixb_gr_51.gif]
[Graphics:Images/appendixb_gr_52.gif]

Find the eigenvalues and eigenvectors

[Graphics:Images/appendixb_gr_53.gif]
[Graphics:Images/appendixb_gr_54.gif]
[Graphics:Images/appendixb_gr_55.gif]
[Graphics:Images/appendixb_gr_56.gif]
[Graphics:Images/appendixb_gr_57.gif]
[Graphics:Images/appendixb_gr_58.gif]

The general solution

Select the component of each normal mode to appear in the solution:

[Graphics:Images/appendixb_gr_59.gif]
[Graphics:Images/appendixb_gr_60.gif]

Visualize the analytic motion

This turns the general solution into a set graphics primitives:

[Graphics:Images/appendixb_gr_61.gif]
[Graphics:Images/appendixb_gr_62.gif]

[Graphics:Images/appendixb_gr_63.gif]

The numerical solution

Define initial conditions

We set the inital position of the vertices to be the same as that chosen by α in the analytic solution (this is just to help the comparison, any points could be used):

[Graphics:Images/appendixb_gr_64.gif]

Execute the fourth-order Runge-Kutta algorithm

[Graphics:Images/appendixb_gr_65.gif]

Visualize the motion

This turns the computational results into a set graphics primitives:

[Graphics:Images/appendixb_gr_66.gif]
[Graphics:Images/appendixb_gr_67.gif]

[Graphics:Images/appendixb_gr_68.gif]

Comparing the solutions

First we sample the analytic solution at the same intervals as the numeric solution:

[Graphics:Images/appendixb_gr_69.gif]

The frequency spectrum of both solutions:

First we window the data:

[Graphics:Images/appendixb_gr_70.gif]
[Graphics:Images/appendixb_gr_71.gif]

Reincorporate the angular frequency:

[Graphics:Images/appendixb_gr_72.gif]

plot the results:

[Graphics:Images/appendixb_gr_73.gif]

[Graphics:Images/appendixb_gr_74.gif]

[Graphics:Images/appendixb_gr_75.gif]

[Graphics:Images/appendixb_gr_76.gif]

[Graphics:Images/appendixb_gr_77.gif]

[Graphics:Images/appendixb_gr_78.gif]

[Graphics:Images/appendixb_gr_79.gif]

The Cube

Initialize various packages, settings, and functions
[Graphics:Images/appendixb_gr_80.gif]
Define the force function
[Graphics:Images/appendixb_gr_81.gif]
Define the fourth-order RK4 algorithm
[Graphics:Images/appendixb_gr_82.gif]
Define constants
[Graphics:Images/appendixb_gr_83.gif]
Define equilibrium configuration
[Graphics:Images/appendixb_gr_84.gif]

The analytic solution

Define the potential energy function

Not all the springs are the same length:

[Graphics:Images/appendixb_gr_85.gif]
[Graphics:Images/appendixb_gr_86.gif]

check that the potential energy in this configuration is really zero:

[Graphics:Images/appendixb_gr_87.gif]
[Graphics:Images/appendixb_gr_88.gif]

Generate the Hessian

[Graphics:Images/appendixb_gr_89.gif]

Find the eigenvalues and eigenvectors

[Graphics:Images/appendixb_gr_90.gif]
[Graphics:Images/appendixb_gr_91.gif]
[Graphics:Images/appendixb_gr_92.gif]
[Graphics:Images/appendixb_gr_93.gif]

The general solution

Select the component of each normal mode to appear in the solution:

[Graphics:Images/appendixb_gr_94.gif]
[Graphics:Images/appendixb_gr_95.gif]

Visualize the analytic motion

This turns the general solution into a set graphics primitives:

[Graphics:Images/appendixb_gr_96.gif]
[Graphics:Images/appendixb_gr_97.gif]

[Graphics:Images/appendixb_gr_98.gif]

The numerical solution

Define initial conditions

We set the inital position of the vertices to be the same as that chosen by α in the analytic solution (this is just to help the comparison, any points could be used):

[Graphics:Images/appendixb_gr_99.gif]

Execute the fourth-order Runge-Kutta algorithm

[Graphics:Images/appendixb_gr_100.gif]

Visualize the motion

This turns the computational results into a set graphics primitives:

[Graphics:Images/appendixb_gr_101.gif]
[Graphics:Images/appendixb_gr_102.gif]

[Graphics:Images/appendixb_gr_103.gif]

Comparing the solutions

First we sample the analytic solution at the same intervals as the numeric solution:

[Graphics:Images/appendixb_gr_104.gif]

The frequency spectrum of both solutions:

First we window the data:

[Graphics:Images/appendixb_gr_105.gif]
[Graphics:Images/appendixb_gr_106.gif]

Reincorporate the angular frequency:

[Graphics:Images/appendixb_gr_107.gif]

plot the results:

[Graphics:Images/appendixb_gr_108.gif]

[Graphics:Images/appendixb_gr_109.gif]

[Graphics:Images/appendixb_gr_110.gif]

[Graphics:Images/appendixb_gr_111.gif]

[Graphics:Images/appendixb_gr_112.gif]

[Graphics:Images/appendixb_gr_113.gif]

[Graphics:Images/appendixb_gr_114.gif]

The Clathrin Cage

Initialize packages
[Graphics:Images/appendixb_gr_115.gif]
Define the force function
[Graphics:Images/appendixb_gr_116.gif]
[Graphics:Images/appendixb_gr_117.gif]
Define the fourth-order RK4 algorithm
[Graphics:Images/appendixb_gr_118.gif]
Define constants
[Graphics:Images/appendixb_gr_119.gif]
Define equilibrium configuration
[Graphics:Images/appendixb_gr_120.gif]
[Graphics:Images/appendixb_gr_121.gif]

The analytic solution

Define the potential energy function

[Graphics:Images/appendixb_gr_122.gif]

there are 54 edges in the cage, so we expect 54 terms to appear in the potential energy

[Graphics:Images/appendixb_gr_123.gif]

check that the potential energy in this configuration is really zero:

[Graphics:Images/appendixb_gr_124.gif]
[Graphics:Images/appendixb_gr_125.gif]

Generate the Hessian

[Graphics:Images/appendixb_gr_126.gif]

Find the eigenvalues and eigenvectors:

[Graphics:Images/appendixb_gr_127.gif]
[Graphics:Images/appendixb_gr_128.gif]
[Graphics:Images/appendixb_gr_129.gif]
[Graphics:Images/appendixb_gr_130.gif]
[Graphics:Images/appendixb_gr_131.gif]
[Graphics:Images/appendixb_gr_132.gif]

Visualize the analytic solution

The general solution:

[Graphics:Images/appendixb_gr_133.gif]
[Graphics:Images/appendixb_gr_134.gif]

sampling the analytic solution:

We sample the analytic solution at the same intervals as the numeric solution.  The results are put in a nested list of {x,y,z} coordinates.

[Graphics:Images/appendixb_gr_135.gif]

The geometery

[Graphics:Images/appendixb_gr_136.gif]
[Graphics:Images/appendixb_gr_137.gif]
[Graphics:Images/appendixb_gr_138.gif]

[Graphics:Images/appendixb_gr_139.gif]

The numerical solution

Define initial conditions

[Graphics:Images/appendixb_gr_140.gif]

Integration algorithm:

[Graphics:Images/appendixb_gr_141.gif]

Visualizing the motion:

[Graphics:Images/appendixb_gr_142.gif]
[Graphics:Images/appendixb_gr_143.gif]

[Graphics:Images/appendixb_gr_144.gif]

Comparing the solutions

The frequency spectrum of both solutions:

First we window the data:

[Graphics:Images/appendixb_gr_145.gif]
[Graphics:Images/appendixb_gr_146.gif]

Reincorporate the angular frequency:

[Graphics:Images/appendixb_gr_147.gif]

plot the results:

[Graphics:Images/appendixb_gr_148.gif]

[Graphics:Images/appendixb_gr_149.gif]

[Graphics:Images/appendixb_gr_150.gif]

[Graphics:Images/appendixb_gr_151.gif]

[Graphics:Images/appendixb_gr_152.gif]

[Graphics:Images/appendixb_gr_153.gif]

[Graphics:Images/appendixb_gr_154.gif]


Converted by Mathematica      June 13, 2002