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.
- Canvas
- Draws polyline, rectangle, triangle shapes
- Incorporates line snapping in certain thresholds
- Allows deletion and editing of previous shapes
- Fractal Generator
- Supports Koch Curve, Levy C Curve, T-square, Spiral, Sierpinski, etc
- Automatically recalculated and displayed in real-time
- Attributes Editor
- Edit attributes including scale, depth, angle, offset
- Utilitized AffineTransform to geometrically transform shapes based on inputs
- Visual Outputs
- Lightweight UI toolkit Swing to output generated shape
- Built GUI details with NetBeans GUI Builder
- Java
- Java Swing
- NetBeans GUI Builder
The project is already configured with the correct main class, hence simply compiling and running the program will work.
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
- 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)
MIT