• Stars
    star
    214
  • Rank 178,501 (Top 4 %)
  • Language
    C#
  • License
    MIT License
  • Created almost 2 years ago
  • Updated 6 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,775
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,111
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#
311
star
4

Unity-Boat-physics-Tutorial

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

Unity-Ballistics-Tutorial

Learn how to make realistic bullets with bullet drop in Unity
C#
59
star
6

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#
57
star
7

Unity-Advanced-Shaders-Tutorial

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

Unity-Custom-Tools-Tutorial

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

Unity-Select-Units-Within-Rectangle-Tutorial

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

Unity-Tornado-Simulator

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

Unity-Control-systems-Tutorial

Learn about an engineering area called Control systems by building quadcopters, etc
C#
17
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#
10
star
15

Copypasta

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

Bitcoin-price-visualization

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

Kaggle-competitions

Code from Kaggle competitions
Python
2
star
18

programming-collective-intelligence-php

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

Advent-Of-Code-2021

Advent of code 2021
C#
2
star
20

Habrador

1
star