Base done!

Algorithms are functional, and the Javascript works.  The trigonometric ratios display as proper angles now.  Also fixed a problem with variable names and two mathematical errors dividing left and right sides.