Here's the code that runs the above program.
You can change the code, if you like, and then click the following 'Reevaluate code' button. The program will then work as per your changes. Of course, your changes, especially random changes, can introduce errors, miscalculations, and browser crashes. If you need to get things back to their original condition, just reload this page using your browser's reload button.
The intention here is to conveniently show the inner workings of this program so that you understand how the diagram is drawn.
Click the 'Code' button again to close this section.