Created
October 1, 2022 07:14
-
-
Save NuarkNoir/39861fe763b7ccb1448408952880ed8a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let count = 5; | |
let magn = 200; | |
let levels = 8; | |
function setup() { | |
createCanvas(600, 600); | |
strokeWeight(1); | |
stroke(255, 204, 0); | |
noFill(); | |
} | |
function draw() { | |
background(0); | |
translate(width/2, height/2); | |
drawWeb(); | |
drawPoints(); | |
} | |
function drawWeb() { | |
for (let i = 0; i < count; i++) { | |
let step = 2*PI / count * i; | |
let posX = magn * cos(step); | |
let posY = magn * sin(step); | |
line(0, 0, posX, posY); | |
} | |
for (let i = 0; i < levels+1; i++) { | |
let rad = magn / levels * i * 2; | |
ellipse(0, 0, rad, rad); | |
} | |
} | |
function drawPoints() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment