Javascript Geometry

Should work as expected. Also finished the bonus, though I haven't thoroughly tested the triangle portion. It seems to work, though I figure the path function only really works with right triangles.