Code Monkey home page Code Monkey logo

golf-ball-flight's Introduction

Physics Research Project

This is a simulation for the flight traced out by a golf ball from when it is struck to when it reaches the ground. The simulation is implemented in python3 using the vpython module . There are two important scripts the animation.py script and the numerics.py script . The visuals and 3D objects are implemented in the animation script and the numerical methods used are in the numerics script. Currently the simulation consist of a golf ball and the playing field . The ball can be struck by clicking the shoot button in the top left part of the window it can also be paused by the same button. Differenct launch parameters such as the angle of attack, launch speed, backspin and sidespin can be changed through the interactive sliders in the window. Currently the numerics script solves a system of differential equations governing the flight of the ball using the euler method , the system of differential equations arises from applying Newton's second law to the ball ( incorporates air resistance and magnus force). A detailed write up can be found in the Golf Ball Flight pdf.

Requirements

  • python3
  • numpy
  • vpython

To install vpython if not present on linux run the following

  • pip3 install vpython

Running the animation

After installation just run the animation script and a tab should open in your browser

golf-ball-flight's People

Contributors

phantom820 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.