So I’m doing a project for school (only been using processing for a week or two), and I’ve been tasked with creating a program that can draw Bézier curves (which i kinda sorted out), and parabolas (preferably on top of eachother). The thing is, i just can’t figure out how to get processing to actually calculate or draw a parabola. I’ve read some people saying i need to use ‘point’, but I couldn’t find any information saying this works.
Anybody got some info that could help?
Thanks
My code so far:
float P0x =100;
float P0y = 260;
float P1x = random(1, 1280);
float P1y = random(1, 720);
float P2x = random(1, 1280);
float P2y = random(1, 720);
float a = 12;
float b = 13;
float c = 14;
float x = 15;
float fx = a*(x*x)+b*x+c;
void setup() {
size (1280, 720);
noFill();
strokeWeight(5);
stroke(66, 133, 244);
line(P0x, P0y, P1x, P1y);
line(P1x, P1y, P2x, P2y);
stroke(234, 67, 53);
bezier(P0x, P0y, P1x, P1y, P1x, P1y, P2x, P2y);
stroke(0);
fx = a*(x*x)+b*x+c;
}