Bifrst Physics Arman J Frasier Christopher Newport University
Bifröst Physics Arman J. Frasier Christopher Newport University Department of Physics, Computer Science, and Engineering Mentor: David Heddle April 22 nd, 2011 Washington Room, David
Roadmap § § § What is Bifröst Physics? The Physics The Programming Future Development Conclusion & Questions Bifröst Physics Christopher Newport University
What is Bifröst Physics? § A two dimensional physics simulator designed to facilitate long distance physics education through a local network or the internet. § Developed in Java Bifröst Physics Christopher Newport University
Features Physics Simulator § Kinematics § Inelastic Collisions § Mutual gravitational and electric effects § Gravitational and Electric fields § Fluidic Resistance Bifröst Physics § § § Trajectory tracing Velocity vector display Automatic entity generation Optimized threading Alterable time iteration Christopher Newport University
Features Renderer § Accelerated 2 D graphics through AWT § Maximum frame rate of 60 frames per second Bifröst Physics Networking § Integrated chat functions § Ability to transfer simulation data § Centralized Relay § Low bandwidth usage Christopher Newport University
Physics § Steps through each entity, calculating the net acceleration affecting that entity. § Uses these accelerations in basic kinematic equations, along with a specified time step, to determine the new velocity and position vectors of each entity. Bifröst Physics Christopher Newport University
Collisions Pseudo-code algorithm: if(distance > (radius 1 + radius 2)) { //no collision (too far away) return; } else { rotate frame so that the collision vector becomes the new x axis } if (not false positive) { //collision do collision calculations } return frame to normal rotation return; Bifröst Physics § The false positive check helps correct errors from large time steps. An example of a false positive collision Christopher Newport University
Collision Example Detect collision Find collision vector Rotate the frame, making the collision vector x’. Use the x-components in these 1 D inelastic collision formulas to calculate new xcomponents. Bifröst Physics Find the x-component of each entity’s velocity Update the velocity vectors, and then return the frame to its original rotation. Christopher Newport University
Programming § Simulation Programming § Network Programming Bifröst Physics Christopher Newport University
Simulation Programming § Upon initialization, the simulation control thread creates as many worker threads as there are logical processors on the host machine. § These threads are synchronized using a sleep/interrupt schema. Bifröst Physics Christopher Newport University
Simulation Threading Play? No Yes Taskmaster Legend Sleep 1 k. Hz Simulation Control Worker Threads Proceed Interrupt Action Thread Bifröst Physics Simulation Calculations (One per logical processor) Update Entity Data Christopher Newport University Aggregate Data
Network Programming § § Central host accepts connections from clients Host sends physics data to clients Host acts as a chat relay for clients Low bandwidth usage Bifröst Physics Christopher Newport University
Future Development § § § Networked simulation calculations Simulation video capture Further simulation optimization Extension into 3 D Abstraction of Physics simulation with API Bifröst Physics Christopher Newport University
Conclusion § Bifröst Physics can help students understand complex physical concepts through instructor designed experiments, as well as through instructor led networked class sessions. Bifröst Physics Christopher Newport University
Questions? Resources § Project Webpage (Includes jar files, user’s guide, change log, and this presentation) http: //www. pcs. cnu. edu/~afrasier/bifrost § Contact: arman. frasier. 06@cnu. edu Bifröst Physics Christopher Newport University
- Slides: 15