Website: https://www.jzblee.com/argonaut/
Argonaut is adapted from the raytracer I wrote for Dr. Ergun Akleman's Image Synthesis course in spring 2021. My goal is to use my existing scene graph, timestep, and web interaction capabilities to deliver reasonably fast physics simulations.
To help with development I split the program into several files. For reference, they are:
config.js
- contains most of the basic global parameters as well as overall configuration sets for each scenetypes.js
- declares all of the custom object types in JSrandom.js
- includes functions to generate tables of numbers that follow uniform and Gaussian distributions, as well as random vectorsmatops.js
- includes functions that operate on matrices or vectors, such as rotation into a coordinate frame or calculating triangle normalsline.js
- includes code to generate and render lines in the appletparticle.js
- handles the particle system logic and particle-specific scene configurationsmesh.js
- provides functions to generate triangle meshes for cubes, spheres, or triangle fans as neededglsl.js
- contains simple GLSL code (vertex and fragment shader) for rendering to the WebGL canvasrigidbody.js
- contains functions related to the rigid body dynamics solversimulation.js
- runs the physics simulation based on the configuration, handles bouncing ball collision and responsedashboard.js
- includes functions related to the interface dashboard and interactively setting parametersprogram.js
- assembles the GLSL program within JS, properly initializes all of the buffers for each type of object being rendered, and handles animation
Access the simulator by creating a webserver in this directory:
$ python -m SimpleHTTPServer
$ python3 -m http.server
Then visit http://localhost:8000 to view a local copy of Argonaut.
In versions of Safari (macOS and iOS) before 15.0, WebGL 2.0 needs to be enabled under Experimental Features.
On Google Chrome, you may need to enable hardware acceleration in Settings and ignore the GPU blocklist on the Experimental Flags screen for GPU support.
gl-matrix-min.js
- matrix and vector operation librarywebgl-utils.js
- WebGL loading/linking library- Bootstrap - for UI
Created by Jason Lee for an independent study on physically-based modeling at TAMU in fall 2021.
Thanks to Dr. Donald House, Dr. John Keyser, Sarah Beth Eisinger, Bailey Currie, and Katy Callaway for assistance throughout!