port over the project list from previous site
This commit is contained in:
parent
d99f1c3870
commit
5bee4a16b2
21 changed files with 704 additions and 17 deletions
|
@ -25,7 +25,7 @@ A rule can have *blank* cells. On the input side, this means it will match anyth
|
|||
Let's say I make a rule for a little worm that moves to the right, this works fine. Its head disappears out of the world because the cell in front of the head in the *input* pattern is blank, which matches anything, including out of bounds. To make it stop just before the edge, you could set that rule cell to air.
|
||||
<video src="snad/worm_right.mp4" controls></video>
|
||||
Now if I want it to do the same thing in but to the left, I can simply draw the rule and worm in the other direction, right?
|
||||
<video src="snad/worm_left.mp4" controls></video>
|
||||
<video src="snad/worm_left.mp4" controls></video><br>
|
||||
Almost. It no longer moves past the edge.
|
||||
|
||||
When a rule and position is chosen, the top-left of the rule is aligned with that position. In the example above, the rule would have to start from outside the world to make the worm continue one more step.
|
||||
|
@ -58,9 +58,11 @@ I was stuck on this problem for quite a while, and it only happened with the new
|
|||
|
||||
The movement rule has these variants:
|
||||
<img src="snad/bee_rules_rotated.png" alt="">
|
||||
|
||||
Each rule has its origin point in the top-left cell.
|
||||
In the diagram below, the bee would move left when the left (purple) cell is picked by the engine, and up when the top (green) cell is picked.
|
||||
<img src="snad/bee_movement_pattern.png" alt="">
|
||||
|
||||
But to move right or down, it needs the bees own position to be picked by the engine, since the rules always extend right-down. That means when the engine picks the bee's position, there are *two* possible rules to execute. Therefore, moving right and down both have half the probability overall compared to moving up or left.
|
||||
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ this means it is
|
|||
- [snad (cell thing)](/cellthing)
|
||||
- [keyboar](/keyboards-are-fun)
|
||||
- [distracting](/humans/distracting)
|
||||
- [old projects](/projects/old-project-list)
|
||||
- todo: put more words in the computer
|
||||
|
||||
[other sites](/internets)
|
||||
|
|
53
write/projects/fractals.md
Normal file
53
write/projects/fractals.md
Normal file
|
@ -0,0 +1,53 @@
|
|||
# Fractals
|
||||
`2021-05-26`
|
||||
This page is a collection of fractal renderers I made in JS for a school assignment back in 2020.
|
||||
This is the *only* JS on this website.
|
||||
|
||||
## Tree fractal
|
||||
The splitting angle is defined by the mouses x position. The number of iterations is set in the first input field (default is 12). Each branch is slightly smaller than its parent, the factor is the second input field. Click the canvas to pause/resume the image.
|
||||
<div class="demo-render" id="fractal-tree">
|
||||
<canvas></canvas>
|
||||
<div class="controlbar">
|
||||
<input type="number" min=6 max=15 value=12 onchange="fractalTree.setIter(value)">
|
||||
<input type="number" min=0.65 max=1 step=0.025 value=0.75 onchange="fractalTree.setMod(value)">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
## Mandelbrot set
|
||||
[Wikipedia page](https://en.wikipedia.org/wiki/Mandelbrot_set)
|
||||
You can click to zoom and set the iteration count in the input field.
|
||||
<div class="demo-render" id="mandelbrot">
|
||||
<canvas></canvas>
|
||||
<div class="controlbar">
|
||||
<button type="button" onclick="mandelbrot.reset()">Reset</button>
|
||||
<input type="number" min=1 max=256 value=48 onchange="mandelbrot.setIter(value)">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
## Multibrot set
|
||||
[Wikipedia page](https://en.wikipedia.org/wiki/Multibrot_set)
|
||||
You can click to zoom and set the iteration count in the input field. The second input controls the exponent.
|
||||
|
||||
This is quite slow to render.
|
||||
<div class="demo-render" id="multibrot">
|
||||
<canvas></canvas>
|
||||
<div class="controlbar">
|
||||
<button type="button" onclick="multibrot.reset()">Render</button>
|
||||
<input type="number" min=1 max=256 value=48 onchange="multibrot.setIter(value)">
|
||||
<input type="number" min=0 max=32 step=0.1 value=4 onchange="multibrot.setPower(value)">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
## Interactive Julia set
|
||||
[Wikipedia page](https://en.wikipedia.org/wiki/Julia_set)
|
||||
You can set the iteration count in the input field.
|
||||
<div class="demo-render" id="julia-set">
|
||||
<canvas></canvas>
|
||||
<div class="controlbar">
|
||||
<button type="button" onclick="juliaSet.reset()">Reset</button>
|
||||
<input type="number" min=8 max=1000 value=80 step=8 onchange="juliaSet.setIter(value)">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/projects/fractals.js"></script>
|
||||
<link rel="stylesheet" href="/projects/fractal.css">
|
49
write/projects/old-project-list.md
Normal file
49
write/projects/old-project-list.md
Normal file
|
@ -0,0 +1,49 @@
|
|||
# projects
|
||||
`2024-07-06`
|
||||
Some older projects that were created before this blog
|
||||
|
||||
### Voxel engine in Godot 3 + Rust
|
||||
start: `2022-04-19`
|
||||
last update: `2022-05-05`
|
||||
source: [github.com/CrispyPin/gd-voxel-rs](https://github.com/CrispyPin/gd-voxel-rs)
|
||||
|
||||
I made a voxel engine in rust to learn rust and godot-rust as well as explore voxel systems. It has (practically) infinite terrain generation, lets you place and remove voxels and supports transparent voxel types. The main point was to develop an optimised meshing algorithm.
|
||||
<video src="/projects/voxel_media/demo.mp4" controls></video>
|
||||
This one I actually wrote a post about [here](/projects/voxels)
|
||||
|
||||
### OVR Utils
|
||||
start: `2021-05-14`
|
||||
last update: `2022-05-08`
|
||||
source: [github.com/CrispyPin/ovr-utils](https://github.com/CrispyPin/ovr-utils)
|
||||
|
||||
OVR Utils is a VR overlay application that has some useful tools for SteamVR.
|
||||
I wanted an overlay that could tell me the time without having to open the steam dashboard, and to see the battery levels of my controllers easily, but couldn't find one for free that also had Linux support. So I decided to create my own, and also wrote down a long list of other useful tools. So far only a few of these have been implemented, such as the image overlay and the keyboard.
|
||||
|
||||
### Raymarched voxel rendering
|
||||
start: `2021-04-18`
|
||||
last update: `2021-04-29`
|
||||
source: [github.com/CrispyPin/voxel-raymarcher](https://github.com/CrispyPin/voxel-raymarcher)
|
||||
|
||||
A raymarched voxel renderer made with a Godot shader.
|
||||
<img src="/projects/raymarched-voxels.png" alt="">
|
||||
|
||||
### Game of Life wallpaper
|
||||
start: `2021-03-21`
|
||||
last update: `2022-02-22`
|
||||
source: [github.com/CrispyPin/gol-wallpaper](https://github.com/CrispyPin/gol-wallpaper/)
|
||||
|
||||
This is hosted on github pages at [gol.crispypin.cc](https://gol.crispypin.cc/?cellsize=5&time=2&margin=0&populate=true)
|
||||
<img src="/projects/gol.png" alt="screenshot of conways game of life">
|
||||
|
||||
### Fractals
|
||||
start: `2020-03-04`
|
||||
last update: `2020-05-19`
|
||||
source: [github.com/CrispyPin/Webb-1-Projekt/](https://github.com/CrispyPin/Webb-1-Projekt/)
|
||||
|
||||
While I was learning web development and JavaScript I made a page with fractals.
|
||||
It has now been moved [here](/projects/fractals)
|
||||
<img src="/projects/fractal_tree.png" alt="">
|
||||
|
||||
|
||||
|
||||
back to [more recent stuff](/)
|
31
write/projects/voxels.md
Normal file
31
write/projects/voxels.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Voxel engine in Godot 3 with Rust
|
||||
`2022-05-05`
|
||||
I made a voxel engine in rust to learn rust and godot-rust as well as explore voxel systems. It has (practically) infinite terrain generation, lets you place and remove voxels and supports transparent voxel types. The main point was to develop an optimised meshing algorithm.
|
||||
|
||||
<video src="./voxel_media/demo.mp4" controls></video>
|
||||
Demo of fast terrain generation
|
||||
<video src="./voxel_media/demo2.mp4" controls></video>
|
||||
Optimised mesh visualisation
|
||||
|
||||
## Optimised/greedy mesh algorithm
|
||||
editor's note: This writeup was never finished :D
|
||||
|
||||
The algorithm I'm using is one I made myself, inspired by a few others. I could not find an easy to understand explanation of how to do it but [this artice](https://vercidium.com/blog/voxel-world-optimisations/) and [this article](https://0fps.net/2012/06/30/meshing-in-a-minecraft-game/) gave me somewhere to start.
|
||||
|
||||
In this explanation I will assume basic knowledge of how meshes work and how to do the simplest form of culling for voxel meshes.
|
||||
<img src="./voxel_media/fig1.png" alt=""><br>
|
||||
fig. 1: example set of voxels, with the simplest form of mesh generation applied.
|
||||
|
||||
To start off, we can break down the problem to 2 dimensions by recognising that each direction along the axis as well as each layer along those directions is independent. We then only have to process a single 2D slice of the voxel domain at once.
|
||||
|
||||
<img src="./voxel_media/fig2.png" alt=""><br>
|
||||
fig. 2: The algorithm only needs to consider one layer and direction at a time, highlighted in green
|
||||
|
||||
The first step is to generate "strips", essentially create long quads that cover connected voxels. We can loop through the plane and keep track of at most one active strip. The active strip is the last one started and we grow it as more voxels under it are traversed. In the inner loop we check the voxel at that position as well as the one above. With this we can determine if we need to stop the current strip, start a new one or do nothing. If there is not currently an active strip, a new one should be created when the voxel below is filled and the one above is empty (an exposed surface).
|
||||
|
||||
<img src="./voxel_media/fig3.png" alt=""><br>
|
||||
fig.3: Long strips of adjacent voxels can be merged into fewer, long quads.
|
||||
|
||||
.
|
||||
|
||||
this was incomprehensible, take me [home](/)
|
Loading…
Add table
Add a link
Reference in a new issue