Last active
April 25, 2020 18:59
-
-
Save JohnPhamous/b5f28b72db44741eb5be512fc338d8f5 to your computer and use it in GitHub Desktop.
Revisions
-
JohnPhamous revised this gist
Apr 25, 2020 . 1 changed file with 10 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ let itter = 1; let max_itter = 10000; let offset = 0; let width = 800; let height = 800; @@ -23,4 +24,12 @@ function draw() { let decay = exp(-pow(d / 100, 2)) / sin(d); ellipse(x, y, decay * 10); } let candi = itter + itter; if (candi > max_itter) { itter = max_itter; } else { itter = candi; } } -
JohnPhamous revised this gist
Apr 25, 2020 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,8 @@ let foregroundColor = "#fca311"; function setup() { pixelDensity(2); createCanvas(width, height); // noLoop(); frameRate(5); } function draw() { -
JohnPhamous created this gist
Apr 25, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ let itter = 10000; let offset = 0; let width = 800; let height = 800; let backgroundColor = "#14213d"; let foregroundColor = "#fca311"; function setup() { pixelDensity(2); createCanvas(width, height); noLoop(); } function draw() { background(backgroundColor); fill(backgroundColor); stroke(foregroundColor); for (let i = 0; i < itter; i++) { let x = random(offset, width - offset); let y = random(offset, height - offset); let d = dist(width / 2, height / 2, x, y); let decay = exp(-pow(d / 100, 2)) / sin(d); ellipse(x, y, decay * 10); } }