Skip to content

LordOfFrogs/WPI-Frontiers-Physics

Repository files navigation

Physics simulations I made during the WPI Frontiers program. My favorites are the 2D-wave, buoyancy, and boids.

View atL: https://www.glowscript.org/#/user/ToriD/folder/MyPrograms/

All programs have a run button and variables at the bottom to tweak before running. Ctrl+drag (cmd+drag on mac) in the program window orbits the camera, alt+drag or scroll zooms, and shift+drag pans.

1DWave and 2DWave

These scripts implement simple wave propogation algorithms in 1D and 2D respectively. They simulate raindrops for display purposes, with variable raindrop force, amount, and size. They both also include a damping parameter to control how quickly waves decay.

image image

Balls

A simple collision simulation with spheres of randomized size, density, and position.

image

Boids

This program simulates the "boids" algorithm, meant to mimic the flocking behavior of birds, fish, etc. The algorithm combines 3 "forces" to produce this effect:

  1. Cohesion - how much boids will stick in a pack vs as individuals
  2. Separation - how much boids will avoid getting too close to each other
  3. Alignment - how much boids try to match the velocities of surrounding boids
image

Buoyancy

An extension of Balls, where the balls experience buoyancy in a liquid while colliding with each other.

image

OrbitalDynamics

A simulation of Earth and Mars orbiting the sun using Newtonian gravitational attraction. Will launch a satellite (also using Newton's formula for gravitational force) from Earth such that it will theoretically intercept Mars (through a pre-calculated angle to launch at). Because of imprecision in simulation it doesn't always hit the mark.

Run at at least 100,000x speed, because 1x speed is equivalent to how fast the planets actually move about the sun in realtime. Getting the zoom and camera orientation right on this one can be tricky.

image

ProjectileMotion

The first project I did - simple projectile motion, with the addition of bouncing when it hits a table.

image

About

Various physics simulations made for WPI Frontiers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages