I went through old code and found a neat lerp algorithm. Two circles rotate and a third chases the previous angle between the two moving circles. The path of the third is drawn with very low (I believe it is 5) opacity.
} }
let v1,v2,v3,v4;
var size=1;
var rot1=30/100;
var rot2=40/200;
function setup() {
createCanvas(windowWidth, windowHeight);
background(0);
noFill();
v1 = createVector(-20, 20);
v2 = createVector(20, 20);
function draw() {
var r = 0;
var g = 255;
var b = 100;
r+=5;
var step=.05;
translate(width/2,height/2);
v1.rotate(rot1);
v2.rotate(rot2);
v3 = p5.Vector.lerp(v1, v2, step);
stroke((5*second())%255,(6*second())%255,(4*second())%255,5);
ellipse(v3.x,v3.y,size,size);
size+=.1;
function roll(n){
return floor(random(n));
}
nice one keep doing on your great work :)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Twitter link: https://twitter.com/rub3al3xand3r/status/1216565719120392194
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit