A Pen by Martijn Kunstman on CodePen.
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 canvasWidth = 600; | |
| let canvasHeight = 500; | |
| let spacialHash; | |
| let boids = []; | |
| let diameter = 10; | |
| let boidsCount = 2000; | |
| let useSpacialHash = true; | |
| let grid = diameter; | |
| let counter = 0; |
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
| <canvas id="myCanvas" width="600" height="600" style="border: 1px solid black"></canvas> |
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 width = 700; | |
| let height = 700; | |
| let ruleset = [0, 1, 0, 1, 1, 0, 1, 0]; | |
| let data = []; | |
| let x = 0; | |
| function setup() { |
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 width = 700; | |
| let height = 700; | |
| let points = [ | |
| { x: width / 2, y: 0 }, | |
| { x: 0, y: height }, | |
| { x: width, y: height } | |
| ]; | |
| let pointNow = { x: width / 2, y: height / 2 }; |
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
| <canvas id="myCanvas" width="700" height="700" style="border: 1px solid black"></canvas> |
A Pen by Martijn Kunstman on CodePen.
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 width = 500; | |
| let height = 500; | |
| function setup() { | |
| angleMode(DEGREES); | |
| createCanvas(width, height); | |
| //frameRate(40); | |
| } | |
| let scale = 0.01; | |
| function draw() { | |
| //drawFibonacci(); |
A Pen by Martijn Kunstman on CodePen.