Issue link: https://trevordayschool.uberflip.com/i/1315612
Bridge Journal Week 1: Note: These journals are going to include a lot of technical language. This week, I made solid progress on my physics engine. I spent Tuesday determining the most useful format for the structure of the hit boxes (the structures the engine uses to detect collisions between objects) and decided on a system that splits the hit boxes into two categories: polygonal and round. Polygonal hit boxes are convex shapes defined by their vertices, while round hit boxes are circular and defined by their centerpoint. Both types of hitboxes also store a center-of-mass point—which is the point around which the hit boxes will rotate. I implemented this rotation using formulas from linear algebra, found here: hps:// academo.org/demos/rotation- about-point/. The first significant portion of the project was building the collision detection/resolution system, which detects collisions between objects using their hit boxes, and then adjusts the objects' velocities to simulate how a collision would occur in real life. The current system looks for pairs of hit boxes that could potentially collide, and divides the pairs into three categories: poly-poly, round-poly, and round-round. Depending on the type of potential collision, the program uses either simple geometric rules (for round-round pairs) or one of two modified versions of a mathematical theorem known as the Separating Axis Theorem to figure out if the two objects are colliding. By my next journal entry, I hope to completely implement the physics for collision resolution and create a simple system for creating objects and hit boxes together. Bridge Journal Week 4: This week, I finally completed the collision simulation aspect of my program. This means that objects can now bounce off each other, according to the conservation of momentum, elasticity, and other physical laws. The math behind this is detailed in this paper by Chris Hecker: hp:// chrishecker.com/images/e/e7/ Gdmphys3.pdf. However, in order to actually move objects, I had to also build a method that would update their The user interface of Jason's simulator, powered by his 2-D physics engine at the back end. Project Components: n Building a 2-D physics simulator n Trevor Seminar: Photoshop 2-D Physics Simulator by Jason Daniels '19 Project Statement: For my Bridge project, I built a Java program from scratch that replicates real-life physics. The program allows users to experiment with different objects of various masses, shapes, sizes, etc. In turn, these objects will interact with each other and respond to physical forces/effects such as magnetism and gravity—all the while adhering to the physical laws and mechanics that govern the real world. positions and velocities based on tiny changes (basically a more complex, digital version of integration from calculus). However, the tiny changes in position and velocity that this system relies on in turn depend on the program's frame rate—meaning that lag spikes will result in noticeable inaccuracies. Next week, I need to start work on a system that alleviates these inaccuracies, the mathematical basis of which can be found here: hps://gafferongames.com/ post/fix_your_timestep/. n Jason Daniels is a freshman at Massachuses Institute of Technology. Jason and Class of 2019 classmates in the Photoshop Bridge seminar taught by visiting faculty member and alumna parent Orit Mardkha-Tenzer P'17. 4 0 T R E V O R D AY S C H O O L n W I N T E R 2 0 1 9 – 2 0 2 0