Skip to content

A project with the purpose of learning Rust by adapting some of the technologies from 4D Games

License

Notifications You must be signed in to change notification settings

JoeSubbi/Rust-4D-Raymarcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

4D Raymarching in Rust

A 4D Raymarcher written in Rust: A project with the purpose of learning Rust by adapting some of the technologies from 4D Games.

This project does not make use of shaders as this project was created with the intention of learning rust. The raymarcher uses multi-threading, but is of course not an efficient raymarcher without the GPU, reaching up to 30fps on an AMD Ryzen 7.

This project, like 4D Games, uses Rotors of Geometric Algebra to rotate these shapes without gimbal lock.

Command Line Arguments

  • --aa Anti Aliasing. Performance intensive, but less pixilated renders.
  • --d Render a 3D scene instead.

Mathematics Module

The project includes a mathematcis module which contains common Vector types: Float2, Float3, and Float4; and also tools of geometric algebra for rotation: Bivectors and Rotors for 3 and 4 dimensions

There are also unit tests for Rotor3 and Rotor4 and can be run via cargo test

SDL2

To build and run the project you will need libsdl2 with ttf and image features. These can be installed on Linux via:

sudo apt-get install libsdl2-dev
sudo apt-get install libsdl2-ttf-dev
sudo apt-get install libsdl2-image-dev

For more information or how to installation SLD2 for other operating systems take a look at the Rust-SDL2 Github

Learning Resources

As this is a learning project here are the resources I used:

About

A project with the purpose of learning Rust by adapting some of the technologies from 4D Games

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages