Ziks is a web app i built with 21 physics simulations which covers many fields of physics from mechanics to optics and even modern physics i picked the topics from my university entrance exam (JEE) books (yup thats literally my physics syllabus :sob) i created everything from scratch using Canvas 2D in JavaScript and vanilla CSS for the design because I find it more controllable (eh? i hope you understand that lol) Ziks is hosted on PythonAnywhere at LINK try it and share your feedback! I made this project for Axiom YSWS a Hack Club YSWS
The Demo video where I go through all 21 simulations running locally and some other features too
Ziks is hosted on pythonanywhere and you can visit it at LINK
Here are all the 21 simulations organized by physics domain:
- Projectile Motion: Change the angles speed and gravity to see your object launch like angry birds (literally)
- Force Engine: Push pull add more forces add more blocks and experiment with forces
- Pendulum: Adjust length and gravity drag it to 360 degrees to watch oscillations
- Inclined Plane: Watch blocks slide down adjustable inclines with friction and mass
- Circular Motion: Spin objects and observe centripetal force, velocity, and angular motion
- Spring System: Simulate oscillations with mass, spring constant, and damping controls
- Collision Simulation: Elastic and inelastic collisions visualize momentum and energy conservation
- Torque & Equilibrium: Balance beams with weights at different distances and watch rotational physics
- Rolling Motion: Simulate shapes rolling down ramps and see how moment of inertia affects speed
- Wave Interference: Create interference patterns with multiple wave sources and visualize superposition
- Standing Waves: Visualize harmonics, nodes, and antinodes on vibrating strings with adjustable tension
- Doppler Effect: Hear frequency shifts as sound sources move you can drag the source to create custom paths too
- Electric Field: Place charges and visualize electric fields with field lines, vectors, and equipotentials
- RC Circuits: Simulate capacitors charge and discharge through resistors and see exponential curves in real-time
- Magnetic Induction: Visualize Faraday's Laws with interactive magnets and graphs
- Snell's Law: Visualize refraction and reflection with real-time light bending and total internal reflection
- Lenses & Image Formation: Explore convex and concave lenses with ray diagrams showing real and virtual image formation
- Diffraction & Interference: Visualize double slit experiment with intensity patterns control wavelength and slit spacing
- Thermal Expansion: Heat up solids and liquids to visualize dimension changes with different materials and coefficients
- Gas Laws: See Gas particles bounce around adjust PVNRT variables and switch between ideal and real gas models
- Photoelectric Effect: Shine light on metal surfaces visualize electron emission and measure stopping potential with quantization
Ziks/
├── devlogs/ # Screenshots of all simulations and the landing page
├── static/
│ ├── assets/ # Logo files and favicon
│ ├── css/ # Individual CSS for each simulation + global styles
│ └── js/ # Canvas based simulation scripts and universal script.js for theme toggle
├── templates/ # HTML templates for all pages
├── .gitignore # Git ignore file
├── app.py # Main Flask application with all routes
├── LICENSE # MIT License
├── README.md # You are reading this lol
└── requirements.txt # Python dependencies (only Flask)
- Python 3.13+ (I used 3.13.5 but anything 3.13+ should work fine)
- pip for installing packages
- Any modern browser (Chrome, Firefox, Edge the simulations use Canvas API)
Performance Note: I tested all the simulations on an i5-12450HX with RTX 4050 (6GB) and 16GB DDR5 RAM If you experience lag on lower-end hardware you can adjust the FPS by modifying the dt value in the individual simulation's JavaScript file The default is 0.016 (60 FPS) you can increase it to 0.033 (30 FPS) or higher to reduce CPU usage.
-
Clone the repo:
git clone https://github.com/Rexaintreal/Ziks.git cd Ziks -
Create a virtual environment (recommended):
This keeps things clean and doesn't mess with your other Python projects (i dont usually do it T_T)
Windows:
python -m venv venv .\venv\Scripts\activate
macOS / Linux:
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
It's just Flask
-
Run the app:
python app.py
-
Open it up:
Go to
http://127.0.0.1:5000in your browser
pretty straightforward:
- Landing page shows all 21 simulations organized by category
- Click on any simulation you want to try
- Use the control panel on the right to adjust parameters (sliders, dropdowns, checkboxes)
- Hit Start/Play to run the simulation
- Most simulations have:
- Real-time graphs showing values over time
- Zoom and pan controls (scroll to zoom, drag to pan using mouse and keyboard both)
- Play/Pause and Reset buttons
- Dark/Light mode toggle (saved in localStorage)
- Equations and formulas displayed on canvas
Each simulation is built using:
- HTML5 Canvas for all the rendering and animations
- Vanilla JavaScript for physics calculations and animation loops using
requestAnimationFrame - CSS3 for styling with custom dark/light themes
- Flask as the backend (basically just routing no heavy backend logic like auth or databases)
The simulations run entirely client-side after the page loads, so they're pretty smooth. I tried to keep the physics equations as accurate as possible while still making them visually interesting.
Ziks works best on desktop browsers Not optimized for mobile yet (the control panels take up too much space on small screens and the navbar too)
MIT LICENSE.
THE INTERNET - physics tutorials and Canvas API docs
Some other projects I've built:
- Eureka - A website where you can find local spots near you which don't show up on Google Maps or any other apps
- DawnDuck - USB HID Automation Tool for Morning Routines
- Lynx - OpenCV Image Manipulation WebApp
- Libro Voice - PDF to Audio Converter
- Snippet Vision - YouTube Video Summarizer
- Weather App - Python Weather Forecast App
- Python Screenrecorder - Python Screen Recorder
- Typing Speed Tester - Python Typing Speed Tester
- Movie Recommender - Python Movie Recommender
- Password Generator - Python Password Generator
- Object Tales - Python Image to Story Generator
- Finance Manager - Flask WebApp to Monitor Savings
- Codegram - Social Media for Coders
- Simple Flask Notes - Flask Notes App
- Key5 - Python Keylogger
- Codegram2024 - Modern Codegram Update
- Cupid - Dating Web App for Teenagers
- Gym Vogue - Ecommerce for Gym Freaks
- Confessions - Anonymous Confession Platform
- Syna - Social Music App with Spotify
- Apollo - Minimal Music Player with Dancing Cat
- Eros - Face Symmetry Analyzer
- Notez - Clean Android Notes App
Built by Saurabh Tiwari
- Portfolio: saurabhcodesawfully.pythonanywhere.com
- Email: saurabhtiwari7986@gmail.com
- Twitter: @Saurabhcodes01
- Instagram: @saurabhcodesawfully
