Age | Commit message (Collapse) | Author |
|
|
|
I split the grid into 4 quadrants which are managed by their own
thread. Improves speed and uses more resources correctly.
|
|
Writes output to "data.png"
|
|
Stopped adding a grain of sand per step.
Collapsing should work properly for any amount of sand grains,
regardless of whether it's 4 or 4000. Previous code fixed it at 4
always, and how it distributed was so as well. Now we distribute as
much sand as we can.
This comes from the idea that, instead of incrementing while
rendering, let's just set some n pixels in the centre and see how the
model distributes them.
|
|
Big bug with file handler: I can write data well, but reading it
causes some trace error which I cannot be bothered to fix. So I'll
just work on making the step function way more efficient.
|
|
First line is the data width, then the sand particles of each cell per
row.
|
|
In particular I've implemented a standardised complete FILE * reader
without relying on fseek (which may not work for pipes).
|
|
+some file handlers for writing and reading (may help with very large
renders by doing them piecemeal when I can)
|
|
Doing this experiment with threads shows a strong improvement in
render speed by separating "steps" from the direct render.
|
|
Stopped presenting the simulation after a while.
|
|
|
|
This will be useful for zooming in.
|
|
Based on Wikipedia page colouring.
|
|
Per iteration, increment the centre of the grid, and perform any
collapsing necessary (if >= 4 then sand pile "collapses" onto its
cardinal directions).
|
|
Simple hello world in raylib, with a Makefile to do the compilation
for me!
|