Orbits MP

In this MP you will

  1. Assemble a scene with several copies of the same geometry
  2. Make a simple scene graph using matrices

This MP is core, with no elective components. It assumes you have already completed the Logo MP.

1 Overview

You will submit a webpage that has

Submit an HTML file and any number of js, css, glsl, and json files. No image files are permitted for this assignment. Do not include spaces in file names as the submission server does not process them well.

You are welcome to use a JavaScript math library, such as the one used in in-class examples or others you might know.

2 Specification

2.1 HTML and coding style

As with the Logo MP, there should be one HTML file with one canvas element, scripts only in the head, requestAnimation animation, wrapWebGL2.js not producing any warnings, motion via matrices, etc.

Make the canvas resize to fill the screen, and correct the aspect ratio of the projection matrix to maintain an undistorted view. See the 3D example code for examples of how to do this (notably in the fillScreen function).

2.2 Graphics

3 Evaluating your results

On both your development machine and when submitted to the submission server and then viewed by clicking the HTML link, the resulting animation should show orbiting bodies. One example motion (this one with the optional axial tilt added) might be the following:

A video of an example result, with axial tilt included.