Simulation of a Double Pendulum

This is a little exercise in JavaScript-programming. It is a realistic simulation of a double pendulum.

parameter value
mass pendulum 1
mass pendulum 2
length pendulum 1
length pendulum 2
gravity acceleration
simulation type
show energy Display Energy
show angles Display Angles
show trail Display Trail
show time Display Simulation Time
length of trail