1 / 15

Bifröst Physics

Bifröst.Physics is a two-dimensional physics simulator designed for long distance physics education through a local network or the internet. Features include trajectory tracing, velocity vector display, automatic entity generation, and more. Developed in Java.

rsmith
Download Presentation

Bifröst Physics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Bifröst Physics Arman J. Frasier Christopher Newport University Department of Physics, Computer Science, and Engineering Mentor: David Heddle April 22nd, 2011 Washington Room, David Student Union

  2. Roadmap • What is Bifröst Physics? • The Physics • The Programming • Future Development • Conclusion & Questions Bifröst Physics Christopher Newport University Arman J. Frasier

  3. 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 Arman J. Frasier

  4. Features Physics Simulator Trajectory tracing Velocity vector display Automatic entity generation Optimized threading Alterable time iteration • Kinematics • Inelastic Collisions • Mutual gravitational and electric effects • Gravitational and Electric fields • Fluidic Resistance Bifröst Physics Christopher Newport University Arman J. Frasier

  5. Features Renderer Networking Integrated chat functions Ability to transfer simulation data Centralized Relay Low bandwidth usage • Accelerated 2D graphics through AWT • Maximum frame rate of 60 frames per second Bifröst Physics Christopher Newport University Arman J. Frasier

  6. 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 Arman J. Frasier

  7. Collisions • The false positive check helps correct errors from large time steps. Pseudo-code algorithm: if(distance > (radius1 + radius2)) { //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; An example of a false positive collision Bifröst Physics Christopher Newport University Arman J. Frasier

  8. Collision Example Detect collision Find collision vector Rotate the frame, making the collision vector x’. Find the x-component of each entity’s velocity Use the x-components in these 1D inelastic collision formulas to calculate new x-components. Update the velocity vectors, and then return the frame to its original rotation. Bifröst Physics Christopher Newport University Arman J. Frasier

  9. Programming • Simulation Programming • Network Programming Bifröst Physics Christopher Newport University Arman J. Frasier

  10. 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 Arman J. Frasier

  11. Play? Simulation Threading No Yes 1 kHz Taskmaster Simulation Control Worker Threads (One per logical processor) Simulation Calculations Legend Aggregate Data Sleep Proceed Interrupt Action Thread Update Entity Data Bifröst Physics Christopher Newport University Arman J. Frasier

  12. 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 Arman J. Frasier

  13. Future Development • Networked simulation calculations • Simulation video capture • Further simulation optimization • Extension into 3D • Abstraction of Physics simulation with API Bifröst Physics Christopher Newport University Arman J. Frasier

  14. 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 Arman J. Frasier

  15. 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 Arman J. Frasier

More Related