Circle Fractal

Size
2,482 Kb
Views
36,432

How do I make an circle fractal?

What is a circle fractal? How do you make a circle fractal? This script and codes were developed by Johan Karlsson on 26 July 2022, Tuesday.

Circle Fractal Previews

Circle Fractal - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Circle Fractal</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script src='https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.6/p5.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Circle Fractal - Script Codes CSS Codes

html, body { margin: 0;
}
canvas { display: block;
}

Circle Fractal - Script Codes JS Codes

"use strict";
var colors;
function setup() { // Colors from this scheme generator: // http://codepen.io/_emattiazzi/pen/egPpdy colors = ["#D1AF3E", "#164461", "#611834", "#6A588B", "#92F5CC"]; createCanvas(windowWidth, windowHeight);
}
function draw() { background(0); var x = windowWidth / 2; var y = windowHeight / 2; drawCircle(x, y, 7);
}
function drawCircle(x, y, level) { if (level === 0) return; push(); translate(x, y); rotate(PI / 4 + frameCount / 100); var index = level % colors.length; var color = colors[index]; fill(color); var factor = 20; var size = level * factor; ellipse(0, 0, size, size); drawCircle(-level * factor * 0.85, 0, level - 1); drawCircle(level * factor * 0.85, 0, level - 1); pop();
}
function windowResized() { resizeCanvas(windowWidth, windowHeight);
}
Circle Fractal - Script Codes
Circle Fractal - Script Codes
Home Page Home
Developer Johan Karlsson
Username DonKarlssonSan
Uploaded July 26, 2022
Rating 4.5
Size 2,482 Kb
Views 36,432
Do you need developer help for Circle Fractal?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Johan Karlsson (DonKarlssonSan) Script Codes
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!