xxxxxxxxxx
31
let r1 = 125, r2 = 125;
let m1 = 10, m2 = 10;
let a1 = 0, a2 = 0;
let a1_v = 0, a2_v = 0;
let a1_a = 0, a2_a = 0;
let g = 0.9;
let cx, cy;
let buffer, px2 = -1, py2 = -1;
function setup() {
createCanvas(800, 600);
pixelDensity(1);
a1 = PI / 2;
a2 = PI / 2;
cx = width / 2;
cy = height / 2;
buffer = createGraphics(width, height);
buffer.background(255);
buffer.translate(cx, cy);
}
function draw() {
formula();
background(255);
imageMode(CORNER);
image(buffer, 0, 0, width, height);
translate(cx, cy);
stroke(0);
strokeWeight(1);
render();
}