move old projects
This commit is contained in:
parent
01b7f71735
commit
a42d4cecef
20 changed files with 37 additions and 16 deletions
52
write/old-projects/fractals.md
Normal file
52
write/old-projects/fractals.md
Normal file
|
@ -0,0 +1,52 @@
|
|||
# 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="/old-projects/fractals.js"></script>
|
49
write/old-projects/old-project-list.md
Normal file
49
write/old-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="/old-projects/voxel_media/demo.mp4" controls></video>
|
||||
This one I actually wrote a post about [here](/old-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="/old-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="/old-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](/old-projects/fractals)
|
||||
<img src="/old-projects/fractal_tree.png" alt="">
|
||||
|
||||
|
||||
|
||||
back to [more recent stuff](/)
|
31
write/old-projects/voxels.md
Normal file
31
write/old-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