• Stars
    star
    243
  • Rank 166,489 (Top 4 %)
  • Language
    C#
  • License
    MIT License
  • Created over 2 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Implementations in Unity of the Ten Minute Physics YouTube channel. Instead of using Unity's built-in physics engine, you will learn how to make your own. This is useful if you want to simulate ropes, cloth, tires, etc. You will also learn how to make fluid simulations and soft body physics.

Ten Minute Physics in Unity

Implementations in Unity of the YouTube channel Ten Minute Physics.

1-2. Cannon ball

Simulate a bouncy cannon ball.

3. Billiard

Simulate billiard balls with different size and mass. Watch these YouTube videos for examples:

Link to youtube video 1000 billiard balls

4. Pinball

Simulate a pinball game.

5. Beads on wire

Simulate beads attached to a circular wire.

6. Pendulums

Simulate the chaotic behavior of pendulums with as many arms as you want and where each arm can have different mass. With many arms you get a rope or hair! Watch these YouTube videos for examples:

Link to youtube video butterfly effect

Link to youtube video double pendulum

8. Interaction

Catch and throw a ball with your mouse.

10. Soft body physics

Simple unbreakable soft body bunny physics. You can flatten it and throw it around with your mouse.

11. Find overlaps among objects

Find overlaps among thousands of objects blazing fast. Implements a version of the Spatial Partitioning design pattern called "Spatial Hashing" which is really useful if you have an unbounded grid.

12. Optimized soft body physics (TODO)

Is not optimizing the code from #11, but is showing how you can use a more detailed mesh and make that faster. You use two meshes: one with fewer triangles that is tetrahedralized, and one with more triangles, and then they interract during the simulation.

13. Tetrahedralizer (TODO)

Implemetation of an algorithm that splits a mesh into tetrahedrons.

14. Cloth simulation

Basic cloth simulation.

17. Write an Eulerian Fluid Simulator with 200 lines of code

Spoiler: It's just the simulation part that's 200 lines of code. You need a few more lines of code to set it up, display it on screen, etc.

Link to youtube video fluid simulation

Bonus

Bonus implementations related to the code above.

3-Body Problem

Simulation of planetary orbits based on this famous unsolved problem (https://en.wikipedia.org/wiki/Three-body_problem).

Link to youtube video 3-body problem

More Repositories

1

Unity-Programming-Patterns

Implementations of programming design patterns in Unity with examples in C# when to use them.
C#
1,885
star
2

Computational-geometry

Computational Geometry Unity library with implementations of intersection algorithms, triangulations like delaunay, voronoi diagrams, polygon clipping, bezier curves, ear clipping, convex hulls, mesh simplification, etc
C#
1,221
star
3

Self-driving-vehicle

Simulation of path planning for self-driving vehicles in Unity. This is also an implementation of the Hybrid A* pathfinding algorithm which is useful if you are interested in pathfinding for vehicles.
C#
394
star
4

Unity-Boat-physics-Tutorial

Learn how to implement boat physics in Unity
C#
98
star
5

Unity-Rope-Tutorial

Learn how to make a rope in Unity by using several methods such as springs. You will also find a procedural spring mesh.
C#
63
star
6

Unity-Ballistics-Tutorial

Learn how to make realistic bullets with bullet drop in Unity
C#
61
star
7

Unity-Advanced-Shaders-Tutorial

Implementation of advanced shaders in Unity like raytracing, interior mapping, parallax mapping
ShaderLab
52
star
8

Unity-Custom-Tools-Tutorial

Source code for my custom tools tutorials in Unity
C#
33
star
9

Unity-Tornado-Simulator

Implementation of a tornado (twister) in Unity that can interact with the environment (including the clouds)
C#
26
star
10

Unity-Select-Units-Within-Rectangle-Tutorial

Unity tutorial on how to select units within rectangle
C#
25
star
11

Unity-Control-systems-Tutorial

Learn about an engineering area called Control systems by building quadcopters, etc
C#
18
star
12

Random-Terrain

Generate random terrain with Python
Python
13
star
13

Unity-Stuff-on-grid-Tutorial

Place stuff on a grid Unity tutorial
C#
12
star
14

Earthquake-Simulator

Simulation of how buildings behave during an earthquake
C#
11
star
15

Copypasta

Standardized code I copy paste into all my Unity projects
C#
10
star
16

Bitcoin-price-visualization

Visualizing the ups and downs of bitcoin from the beginning with ALL price data available which you can download
5
star
17

Kaggle-competitions

Code from Kaggle competitions
Python
2
star
18

Habrador

2
star
19

programming-collective-intelligence-php

Examples from the book Programming Collective Intelligence translated from Python to PHP
PHP
2
star
20

Advent-Of-Code-2021

Advent of code 2021
C#
2
star