Computer Simulations in Physics. Numerical modelling of natural phenomena. All written by me in C/C++/HTML5. Most of them are with the code available from me,
Wednesday, October 30, 2019
Wednesday, October 23, 2019
My remake of Soda Constructor got "Load XML"
Are you old fanboy of Soda Constructor? This is experimental, not fully working and highly risky option but you may now try to load your old Soda Constructor XML models into my JS version. I tried a few and they more or less work. Enjoy!
ps. I've added sound too ;)
ps. I've added sound too ;)
play it here
Wednesday, April 24, 2019
Diffusion Limited Aggregation
Particles suspended in fluids may diffuse and exhibit random-like motion.
If we stop their motion as they get close to other stopped particles they will create fractal-shaped figures known as Diffusion Limited Aggregates. So the algorithm of the simulation is simply:
1. assign the first "stopped" particle (i. e. in the origin of the system)
2. choose random positions of N particles (the best would be far from the origin)
3. for each particle:
- randomly choose direction of motion
- move the particle
- if any of its neighbours is "stopped" -> stop it.
4. continue the loop 3.
This physical mechanism is simple yet brings beautiful results. Also, it is really simple to code and used i.e. during our classes to teach programming as well as simple modelling. Examples of such figures are below. They are all done with a simple full-screen HTML app I wrote to visualize DLA for purpose of my lectures. Enjoy, it's free.
Subscribe to:
Posts (Atom)
-
Soda Constructor (Revisited) (2024 version - here ) (2020 - here ) (2019 - here ) (2018 - here ) I remember...
-
Introduction This tutorial is the first part of the mini compute shader serie. See part 2 on continuation with more specific fluid flow 3D ...
-
2D Ripple Algorithm by Maciej Matyka , Wrocław, 2018-03-13 (play here) Once upon a time... I saw this on the famous Hugo Elias website...