GithubHelp home page GithubHelp logo

suranwarnakulasooriya / least_time_to_the_rescue Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 28 KB

A paper and Python simulation applying the law of refraction and principle of least time to find the most time-efficient position for a lifeguard to jump into the water to save a drowning person using realistic values.

License: MIT License

Python 100.00%
python refraction simulation

least_time_to_the_rescue's Introduction

Least Time to the Rescue

A paper and Python simulation applying the law of refraction and principle of least time to find the most time-efficient position for a lifeguard to jump into the water to save a drowning person using realistic values.

Dependencies

Every Python file uses sympy

simulation.py uses pygame

heatmap.py uses seaborn

Use

The Python files in this repository are the files used to generate the graphs used in the paper and are not of much use on their own. simulation.py is a simulation that visualises the straight path and lifeguard's path to the target with user-specified conditions. Click anywhere in the water region to set the target location and use w and s to move the lifeguard farther or closer to the waterfront, respectively. There is a bug in sympy that makes it fail to find any valid solutions when the target is close to the left edge of the screen.

least_time_to_the_rescue's People

Contributors

suranwarnakulasooriya avatar

Watchers

 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.