xxxxxxxxxx
let simplex
function preload(){
font= loadFont('FamiljenGrotesk-VariableFont_wght.ttf')
}
function setup() {
createCanvas(400, 400);
simplex= new openSimplexNoise(Date.now())
background('#f4f1de')
}
function draw(){
background('#f4f1de')
curlyQ(200, 0, 200, 300)
fill('#f4f1de')
noStroke()
rect(0, 0, width, 40)
rect(0, 0, 40, height)
rect(360, 0, 60, height)
rect(0, 360, width, 40)
noFill()
stroke(100)
textFont(font)
fill(100)
strokeWeight(1)
stroke(100)
text('1.25', 20, 380)
}
function curlyQ(x, y, x2, y2){
stroke(0)
let vec= createVector(x, y)
let vec2= createVector(x2, y2)
for(let i=0; i<1; i+=0.0004){
let pos=p5.Vector.lerp(vec, vec2, i)
let xoff= map(simplex.noise4D(pos.x/100, pos.y/100, i, frameCount/200), -1, 1, -20, 20)
let yoff= map(simplex.noise4D(pos.x/100, pos.y/100, i, frameCount/200), -1, 1, -20, 20)
let sinXOff= sin(i*xoff)*100+(xoff)
let sinYOff= cos(i*yoff)*50+(yoff)
let stroker= map(simplex.noise3D(x, y, i*3), -1, 1, 0, 6)
stroke(0)
strokeWeight(stroker)
let cx= constrain(pos.x+sinXOff , 60, 340)
let cy= constrain(pos.y+sinYOff, 60, 340)
point(cx, cy)
}
}