Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fractra ⚙️

Fractal building machine with recursive algorithms, and implemented transformations. Only supports well-known and popular fractrals as of now. Final project for Pre-AP Computer Science course.


Key Features

  1. Canvas
    • Draws polyline, rectangle, triangle shapes
    • Incorporates line snapping in certain thresholds
    • Allows deletion and editing of previous shapes
  2. Fractal Generator
    • Supports Koch Curve, Levy C Curve, T-square, Spiral, Sierpinski, etc
    • Automatically recalculated and displayed in real-time
  3. Attributes Editor
    • Edit attributes including scale, depth, angle, offset
    • Utilitized AffineTransform to geometrically transform shapes based on inputs
  4. Visual Outputs
    • Lightweight UI toolkit Swing to output generated shape
    • Built GUI details with NetBeans GUI Builder

Tech Stack

  • Java
  • Java Swing
  • NetBeans GUI Builder

Running the Project

The project is already configured with the correct main class, hence simply compiling and running the program will work.


Project Structure

Fractra/
|-- LICENSE                     # Project license
|-- README.md                   # Project overview
|-- pom.xml                     # Maven config (Java 22 + NetBeans dependency)
|-- nbactions.xml               # NetBeans run/build actions
`-- src/main/java/org/fractra/
    |-- Main.java
    |-- canvas/
    |   |-- Canvas.java         # Drawing surface for editable shapes
    |   |-- Canvas.form
    |   `-- ShapeIO.java        # Saves and loads shape data
    |-- fractals/
    |   |-- Fractal.java        # Fractal rendering panel
    |   `-- Fractal.form
    |-- shapes/
    |   |-- Shape.java          # Base shape class
    |   |-- Point.java
    |   |-- Line.java
    |   |-- Polyline.java
    |   |-- Rectangle.java
    |   `-- Triangle.java
    |-- util/
    |   |-- GeometryUtil.java   # Geometry helper methods
    |   `-- KeyboardActionUtil.java
    `-- views/
        |-- ShapeView.java      # Main shape editor window
        |-- ShapeView.form
        |-- FractalGeneratorView.java  # Fractal generator window and controls
        `-- FractalGeneratorView.form

Lessons Learned

  • First time designing a project with Object-Oriented Programming principles
  • Working with Maven and learning its benefits
  • Dealing with bugs and pinpointing what caused my fractal to not generate on screen
  • Learning recursion and algorithms of popular fractal shapes
  • Rendering and working with shapes (math)

License

MIT

About

fractal building machine

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages