Skip to content

TaroAndMulan/voxel-based-L-system-react-three-fiber-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lsystem simulator in Voxel format

In computer science, An L-system or Lindenmayer system are used as a formalism for generating complex structures through a set of rewriting rules. Initially introduced for modeling plant growth, L-systems have found applications in computer graphics, fractal generation, and procedural content generation. They provide a flexible and recursive approach to describing patterns, making them valuable in various computational and artistic domains.

In this project, I created a voxel-based L-system simulator designed for teachers who want to introduce the concept of L-systems to students through 3D graphics. Students can input a list of rules and see the result in real-time and navigate in a 3D space like in a video game.

(Frontend-React/Graphic-ReactThreeFiber)

DEMO

https://voxel-based-l-system-react-three-fiber.vercel.app/

left click - Rotate , middle mouse - Zoom, right click - pan

If the link above doesn't work (i.e. can load but white screen), then it mean that my cache file on vercel server has gone inactive. It will work again only when someone notify me and I redeployed it. Check local installation section below to see how to build it locally yourself.

demo demo 3dworld

local installation

git clone https://github.com/taroandmulan/voxel-based-L-system-react-three-fiber-

cd voxel-based-L-system-react-three-fiber-

npm install

npm start

SUPPORT OPERATION

F , G = forward

O = sphere

/ = stair up

U,D = up, down

L,R,+,- = left, right, rotate_left, rotate_right

B = back

[,] = save,resume

EXAMPLE

custom rules

axiom F

rule1 F- > FF[UUULR]

This will generate a wall