HOME

INTRODUCTION

CONCEPTS

EQUATIONS

TOUR

LIBRARY

MATH

VARIABLES

SITE MAP

WHAT'S NEW


JAVASCRIPT SERIES


Can a student with computer programming knowledge model some of the theories discussed in Polymer Physical Chemistry or Polymer Physics?

    The ideas here began back in 1993 when working on a weekly homework assignment. One of the questions inspired some curiosity, and the end result was a computer program that ray-traced an ideal chain.
Polymer Science Interest
  • Random Walk Line- The random walk is carried out on a number line, starting at zero, and with two choices for each step, +1 and -1. After fifty steps, the position on the number line is recorded. The number of occurences for each final position (after a walk of 50 steps) is recorded, and a Gaussian Distribution is observed.


  • Ideal Chain- the Ideal Chain or Freely Jointed Chain model is used to construct polymers all with the same molecular weight, so that the distribution of displacement distances can be observed. A Maxwell Boltzmann distribution is observed.


  • Z=6 Polymer Chain- A polymer can polymerize in six directions: up, down, left, right, forward, back.

Math Interest
  • Cross Product- The math that takes two vectors and produces a new vector orthogonal to the first two vectors.


  • Dot Product- The math that takes two vectors and calculates the dot product, and the angle between the two vectors.


  • Coordinate Transformations- Spherical coordinates are transformed to Cartesian coordinates or Cartesian coordinates are transformed to spherical coordinates. This is done using radians for spherical coordinates, but an additional feature allows the input of spherical coordinates in degrees.

Beginning Javascript Interest

Simple programs here are kept for reference use when writing the code to more complex programs.

  • Counting- example includes an iteration loop.


  • Random Numbers- Random numbers are chosen between 0 and 2. The average is taken (which should be 1) as one means of testing the random number generator.


  • Dice- Test of getting random numbers 1,2,3,4,5,6 loop.