a = 3, b = 1, c = 0,d = 1
function setup() {
createCanvas(720, 720);
angleMode(DEGREES);
stroke(0);
strokeWeight(1);
strokeWeight(0);
}
function draw() {
translate(360,360)
text('Parametric Generator - click to change the equation (plots (x,y) and (y,x))',-350,-320)
y = 120*(cos(a*frameCount/5)+sin(b*frameCount/5)/2)
x = 220*(sin(c*frameCount/5)/2+cos(d*frameCount/5));
fill(0,random(255),random(255),50);
circle(y,x,10)
circle(x,y,10)
}
function mousePressed() {
background(255)
frameCount = 1;
a = round(random(12))
b = round(random(12))
c = round(random(12))
d = round(random(12))
str1 = ('(x,y) = '+ 'cos('+ a + 't) + sin('+b+'t)/2, sin('+c+'t)/2+cos('+d+'t))');
strokeWeight(1)
text(str1,0,350)
strokeWeight(0)
print(a,b,c,d)
}