Created
October 6, 2016 17:04
-
-
Save reginavetka/ecae3ad42241aa5d0957de4ad284644a 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
var r; | |
var offset; | |
var angle; | |
var k; | |
function setup() { | |
createCanvas(window.innerWidth, window.innerHeight); | |
background(0); | |
r = 100; | |
//offset = height /2; | |
angle = 0; | |
for(var i = 0; i < 360; i++) { | |
angle += 0.09; | |
r += 0.05; | |
k = 4/5; | |
noFill(); | |
var x = cos(k * angle) * cos(angle) * r; | |
var y = cos(k * angle) * sin(angle) * r; | |
stroke(255); | |
fill(255) | |
strokeWeight(0.5); | |
ellipse(x + width / 2, y + height / 2, 10, 10); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment