| src | ||
| .gitignore | ||
| connections_and_accelerations_0.kra | ||
| connections_and_accelerations_0.kra~ | ||
| connections_and_accelerations_1.kra | ||
| connections_and_accelerations_1.kra~ | ||
| index.html | ||
| notes_0.kra | ||
| notes_0.kra~ | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| units_and_types_0.kra | ||
| units_and_types_0.kra~ | ||
| vite.config.ts | ||
strong nuclear force (quark confinement) the force between particles stays constant no matter what distance
spring universe (hooks law)
- when particles are far apart, it gives a huge attractive force
BAND
- when particles are far apart, it gives attraction, but when particles are too close, it gives repulsion, so you have this "band" in which the force kinda drops off... and is negligable
- molecular dynamics:
- when far apart, you have very small attractive force
- when close, strong repulsive force
Galactic Gravity
- instead of newtons 1/r^2, use 1/r
- orbits around a heavy body will move at constant speed reg
Boids
- don't crowd neighbours
- neighbours that are close have repulsive force
- alignment
What about different types of "masses"? e.g. something like charge, or perhaps something weirder?
====Implementation====
Should I track momentum or velocity? Since I have constant mass particle, I can always compute velocity easily.
Time and Evolution
Decoupling simulation step from dt given by the browser.
Global attributes
-
net force (should be very close to 0)
-
net momentum (should be very close to a constant) What else?
-
average kinetic energy (temperature?)
-
center-of-mass (should be constant)
-
WTF potential energy? How to calculate that? Probably always different for each of the systems? Does it always make sense?
Camera & Culling
- zoom & pan
- render only those particles that are on the screen
- note that this is gonna fuck up the trails, but whatever
Brushes
Spawning
- spray paint - bunch of particles near each other but with non-zero initial velocity
- single heavy click brush spawning particles
- brush that spawns particles orthogonal to the center of mass
Filtering
- delete particles in mass range
- delete particles in region
Mapping
- change mass of all particles based on a function.
Reduce
- Replace particles in a region by one particle that has combined mass
Local Attributes
-
follow a single particle and highlight it, name it, display its attributes
-
Select a square/circle s.t. all particles within it are now tracked... or perhaps those that enter/exit it?
Dimensions/Layers?
What about having quantities such as a phase?
Where basically particles of different phases don't interact... but then we could change phases of particles, and suddenly there is interaction etc...
Symplectic vs Explicit Euler
Suppose we have (pos0, vel0), and we have dt. We compute acc (acceleration).
Then the enxt state is:
- Explicit:
(pos0 + dt*vel0, vel0 + dt*acc) - Symplectic:
I have no idea why symplectic works... Does it work only for some systems or all?let { vel1 = vel0 + dt*acc, pos1 = pos0 + dt*vel1, . (pos1, vel1) }
Energy
- Kinetic Energy is the energy of motion...
- Potential Energy is the energy of position/configuration (relative position? idk...)
Compute? Potential Energy is integral of force over distance...
Hmm. Let's have f : M -> R the "potential".
The force field that's generated by f is d(f) - but actually... the gradient?.
But given a force field, how can we attempt to
compute the potential energy? Atleast on the trajectory of the particle...
There's no unique solution... so let's say we spawn a particle, and give it potential of 0.
Then the acceleartion field tells us in which direction to move. I guess we're computing an integral over some 1-form. How do we get the 1-form?
It is at a point, the inner product of the infinitesimal velocity with the infinitesimal force...
<dv|df>
Angular Momentum?
What if our basic element would be like "rods" of two particles where the constraint is that the distance between them is fixed. Then we could naturally have angular velocity etc...