Skip to content

This Java project is an interactive L-System visualizer with animation, zoom, and panning. Users configure iterations, rules, and angles to generate fractals like trees or ferns. The program animates growth step by step using turtle graphics, supporting branching, scaling, and custom rendering

Notifications You must be signed in to change notification settings

isavic01/L-System-visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

🌿 L-System Visualizer

Java
License

An interactive Java Swing–based L-System generator and visualizer for exploring fractals. Define production rules, iterations, and angles to generate structures like binary trees or ferns. The app supports real-time animation, zoom & pan, and customizable drawing options such as stroke width, segment length, and an optional turtle cursor.


✨ Features

  • Custom Rules → Define up to two rules and an axiom; set iterations and angle.
  • Drawing Options → Adjustable segment length, stroke width, and “Draw Turtle” option.
  • Animation → Speed slider with step-by-step growth via timer.
  • Interactive Controls → Zoom with mouse wheel, pan by dragging.
  • Turtle Graphics Commands:
    • + / - → increase/decrease stroke width
    • [ / ] → save/restore state (branching)
    • < / > → rotate left/right
    • * → draw a red circle marker
    • Default → draw green line forward

🖥️ How to Run Locally

Prerequisites

  • Java JDK 17+ (OpenJDK recommended)
  • No external libraries required

Clone and Compile

git clone https://github.com/isavic01/L-System-visualizer.git
cd L-System-visualizer
javac Project3_Functions.java Project3_Codebase.java
java Project3_Codebase

About

This Java project is an interactive L-System visualizer with animation, zoom, and panning. Users configure iterations, rules, and angles to generate fractals like trees or ferns. The program animates growth step by step using turtle graphics, supporting branching, scaling, and custom rendering

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages