This JavaScript project provides a versatile canvas art generator capable of creating mesmerizing fractal patterns and intricate shapes. With three distinct scripts - fractal.js
, fractal_branch.js
, and star_shape.js
- users can effortlessly generate stunning visual effects on the canvas.
-
HTML Setup: Ensure your HTML file includes a canvas element:
<canvas id="canvas1"></canvas> <button id="randomizeButton">Randomize</button>
-
Script Inclusion: Include the JavaScript files in your HTML file:
<script src="fractal.js"></script> <script src="fractal_branch.js"></script> <script src="star_shape.js"></script>
-
Run: Open the HTML file in a compatible web browser.
-
Interact: Click the "Randomize" button to generate diverse fractal patterns.
- Description: Generates fractal patterns with branches.
- Features:
- Control depth, number of branches, scale, spread, color, and line width.
- Provides a button to randomize pattern.
- Description: Renders fractal patterns with branches.
- Features:
- Customize size, number of sides, maximum level, scale, spread, and branches.
- Renders pattern directly on window load.
- Description: Draws intricate star-shaped patterns.
- Features:
- Customize size, number of sides, and rotation.
- Renders shape directly on window load.
- Parameter Adjustments: Modify parameters like size, sides, level, scale, spread, color, and line width within each script.
- HTML Modifications: Adjust canvas dimensions or add controls as needed.
- Ensure compatibility with modern web browsers supporting HTML5 canvas and JavaScript.
- Responsive design adapts canvas to different screen sizes.
- Utilizes HTML5 canvas API for dynamic shape rendering.
- "Randomize" button allows users to explore various fractal patterns.
Feel free to explore and modify the scripts to unleash your creativity and craft captivating canvas art!