Antenna Generator
How do I make an antenna generator?
Click to generate a new pattern!I was googling fractal trees and random walks and stumbled upon this image that inspired me to make this Pen.. What is a antenna generator? How do you make a antenna generator? This script and codes were developed by Johan Karlsson on 10 September 2022, Saturday.
Antenna Generator - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Antenna Generator</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>
Antenna Generator - Script Codes CSS Codes
html, body { margin: 0;
}
canvas { display: block;
}
Antenna Generator - Script Codes JS Codes
"use strict";
var steps;
function setup() { createCanvas(windowWidth, windowHeight); cursor(HAND); reset();
}
function draw() { background("white"); noLoop(); var l = min(windowWidth, windowHeight); drawLines(windowWidth / 2 - l / 2, windowHeight / 2, l, 0, steps);
}
function windowResized() { resizeCanvas(windowWidth, windowHeight);
}
function mouseClicked() { reset(); draw();
}
function reset() { steps = round(random(3, 6));
}
function drawLines(x, y, length, angle, level) { if (level === 0) { return; } push(); translate(x, y); rotate(angle); line(0, 0, length, 0); var nrOfParams = round(random(4, 7)); for (var i = 0; i < nrOfParams; i++) { var angle = random([-PI / 2, PI / 2]); var position = random(); var sizeFactor = random(0.2, 0.6); drawLines(length * position, 0, length * sizeFactor, angle, level - 1); } pop();
}
Developer | Johan Karlsson |
Username | DonKarlssonSan |
Uploaded | September 10, 2022 |
Rating | 3.5 |
Size | 2,624 Kb |
Views | 40,480 |
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!
Name | Size |
Brownian Motion | 2,549 Kb |
Diffusion-Limited Aggregation - Line | 2,550 Kb |
Circuit Board Warper | 4,057 Kb |
The Rainbow Spirograph | 4,016 Kb |
Particle Text | 5,685 Kb |
Fireflies | 2,572 Kb |
IFS Fractal Christmas Tree | 6,537 Kb |
Sine Perlin | 5,654 Kb |
Phone Case Pattern Animation | 2,774 Kb |
Random Fractal | 2,751 Kb |
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!
Name | Username | Size |
Blank Starter | Mhartington | 2,171 Kb |
Wavy Road with Dashes | Jonobr1 | 2,679 Kb |
A Pen by tugce | Ecgutcnkr | 4,197 Kb |
ASCII triangle image overlay | Mitchdot | 2,200 Kb |
Shopping cart | Andiio | 6,581 Kb |
Angular Route | Arun_v606 | 1,837 Kb |
Form Labels | Bartuc | 2,717 Kb |
Box Shadow Effects | Retrofuturistic | 2,143 Kb |
Simple content swap | Snografx | 1,859 Kb |
CSS3 Snow Animation | NickyCDK | 1,695 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!