Bouncing Balls in D3

To get a better understanding of how D3 works, my approach is twofold: top-down and bottom-up. Through the first method, I'm aiming to connect with the right libraries, get a basic understanding of how D3 files are structured, and what settings are needed for creating a bouncing ball.


Top-down experiment

With the help of this example by Jarrett Meyer.
This didn't work straight away, because I had to link to the d3 database and include the svg id to the document. After making this work in one HTML file, I created a separate css for formatting, and js file for the bouncing ball code.


Next spiral: duplicate document, rename and relink, add a new bouncing ball.

Bottom-up experiment

Next, some experiments from scratch. D3 is based on JavaScript SVGs. Adding an 100x100px svg with a circle.

Connecting to an external js file to animate.

Return to main page.