Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/qxresearch/simple-harmonic-motion

Plotting Simple Harmonic Motion Graphs and animations using Python (Matplotlib | Numpy | Scipy) ๐ŸŒŒ
https://github.com/qxresearch/simple-harmonic-motion

matplotlib physics pyton qxresearch

Last synced: 2 months ago
JSON representation

Plotting Simple Harmonic Motion Graphs and animations using Python (Matplotlib | Numpy | Scipy) ๐ŸŒŒ

Awesome Lists containing this project

README

        



Logo

Simple Harmonic Motion



Plotting SHM Graph using Python (Matplotlib | Numpy)




[![GitHub](https://img.shields.io/static/v1.svg?label=Collaborators&message=1&color=success&logo=github&style=social)](https://github.com/qxresearch/Simple-Harmonic-Motion/graphs/contributors)
[![YouTube](https://img.shields.io/static/v1.svg?label=YouTube&message=@qxresearch&color=grey&logo=youtube&style=flat&logoColor=white&colorA=critical)](https://www.youtube.com/channel/UCX7oe66V8zyFpAJyMfPL9VA)
[![LinkedIn](https://img.shields.io/static/v1.svg?label=LinkedIn&message=xiaowuc2&color=success&logo=linkedin&style=flat&logoColor=white&colorA=blue)](https://www.linkedin.com/in/xiaowuc2)
[![Quora](https://img.shields.io/static/v1.svg?label=Quora&message=85.5k+views&color=white&logo=quora&style=social)](https://www.quora.com/profile/Rohit-Prasan-Mandal)

### Abstract
Programming is influencing all disciplines and helping scientiests discover in the field of Science and Mathematics with the help of technology. The concept of Simple Harmonic Motion is uded to create graph of waves using Python(Numpy | Matplotlib | Scipy) where the user can make changes to the amplitutde, initial phase and frequency of the wave. User can also add a decay or damping constant. User can also plot any SHM graphs using this program. As a demonstration spring simulation has been given in .py format.



### What is SHM?
In mechanics and physics, simple harmonic motion is a special type of periodic motion where the restoring force on the moving object is directly proportional to the object's displacement magnitude and acts towards the object's equilibrium position.

### Math behind SHM
- SHM can be modeled as sin or cosine wave moving forward with time t
- Equation of SHM is: y = A sin(๐Žt+ ๐œฝ), we plot time t on X axis and correponding position on Y axis
A = amplitude, ๐Ž = angular frequency, ๐œฝ = initial phase



SHM Diagram


Fig. Simple Harmonic Motion

### Algorithm
- Set size of each step and number of total steps
- Define a function (data_gen) will compute the value of the wave at each point in time t from 0 second in steps of 0.5s for a 1000 times
- Creating a set of arrays to store these values as required for plotting, one for X axis and different array for values of Y axis

### How the program works?

- Program SHM-1.py is console based user defined program where user can change: frequency, apmlitude and intial phase
- Program SHM-2.py will plot a spring simulation
- Download the code and run(double click) the .py file to plot the graph


### Demo:



Logo
Logo



### README
```
๐Ÿ“‘ If you think this project has helped you learn something new you can give a star
๐Ÿ“‘ If you think it's a bad project do point out 'why' and spam the issue section ๐Ÿšฉ
```


### Contributing

Any kind of contributions to `qxreseach/Simple-Harmonic-Motion` are welcome. While creating an issue(for this project) use `Request-Feature` Label.

1. [Fork](https://github.com/qxresearch/Simple-Harmonic-Motion/fork) the Project
2. Commit your Changes
3. Open a [Pull Request](https://github.com/qxresearch/Simple-Harmonic-Motion/pulls)

### Become Official Member @qxresearch

* Join Mozilla Group [@qxresearch](https://community.mozilla.org/en/groups/qx-research/)
* Join Telegram Group [@qxresearch](https://t.me/qxresearch)
* email me your GitHub id (**subject**: GitHub id @qxresearch)






Request Demo
ยท
Report Bug
ยท
Request Feature