This file contains 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
/** | |
Plexus structure for p5js | |
Ponints connected | |
*/ | |
function Plexus(_op) { | |
let opts = { | |
num: 40, | |
cx: 0, | |
cy: 0, |
This file contains 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
/** | |
Maneja los péndulos | |
*/ | |
class Harmonograph { | |
constructor(p) { | |
this.pendulums = p; | |
} | |
update(fn, laps = 10) { | |
for (let j = 0; j < laps; j++) { | |
let px = 0; |
This file contains 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
/* | |
Codigo reducido | |
inspirado en p5js | |
v 20221114 | |
*/ | |
"use strict"; | |
let _stroke = true, | |
_fill = true, | |
__shadow = false, | |
__cx, |
This file contains 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
// simplex noise by Jonas Wagner | |
// Only 3d | |
const F3 = 1.0 / 3.0; | |
const G3 = 1.0 / 6.0; | |
const fastFloor = (x) => Math.floor(x) | 0; | |
const grad3 = new Float64Array([ | |
1, 1, 0, -1, 1, 0, 1, -1, 0, -1, -1, 0, 1, 0, 1, -1, 0, 1, 1, 0, -1, -1, 0, | |
-1, 0, 1, 1, 0, -1, 1, 0, 1, -1, 0, -1, -1, | |
]); |
This file contains 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
// Random function w/ seed | |
/* | |
// seeding -> cyrb128 + mulberry32 | |
let random = _createRandom(seed?); | |
// Use | |
random() -> 0 to < 1 | |
random(5,15) -> 5 to < 15 | |
*/ | |
function _createRandom(seed = "") { | |
let cyrb128 = (str) => { |
This file contains 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
class Harmonograph { | |
constructor() { | |
this.theta = 0.0; | |
this.phi = 0.0; | |
this.vel_theta = 0; | |
this.vel_phi = 0; | |
this.alpha = 0.0; | |
this.radio_x1; | |
this.vel_alpha = 0; | |
this.friction = 0; |
This file contains 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
did:3:bafyreihn7ntavn5tjnnd75e4krdwbr5mjwmxbhimtmd3vatm2zt5owpr5a |
This file contains 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
/* | |
Controles / Controls | |
z: Alternar retorno prticulas / Toggle particles return | |
x: Mantener presionado para que no borre / Keep pressed for not fade to black | |
s: captura imagen / image capture | |
Andrés Senn | |
andressenn.com |
This file contains 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
// Hola LeParc! | |
colorMode(HSB, 255) | |
function draw() { | |
fade(random(255),255,255,10) | |
zoom(0.1) | |
displace(-5,0) | |
fill(45, 255, 255, 100) | |
noStroke() |
This file contains 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
/* | |
Leparc > 0.2.0 | |
Andres Senn | |
*/ | |
colorMode(HSB, 255) | |
function draw() { | |
// bg(0) | |
zoom(0.01) |
NewerOlder