xxxxxxxxxx
48
var x = 0,y = 600
var hitx = //valores llegada
var hity = //Valores llegada
var focox = // Valores proporcionados
var focoy = // Valores proporcionados
var A = //A completar por el alumno
var H = //A completar por el alumno
var K = //A completar por el alumno
var F = //A completar por el alumno
function setup() {
createCanvas(600, 600);
background(220);
line(width/2,0,width/2,height)
line(0,height/2,width,height/2)
}
function draw() {
fill(255,0,0)
noStroke()
circle(x,y,5)
//////////// Ecuacion
y = A * (x - H) * (x - K) + F
x += 0.5 //incremento
/////////////////////////////
stroke(0)
fill(0,255,0)
circle(hitx,hity,5)
fill(0,0,255)
circle(focox,focoy,5)
}
/////////////////////////////////////
//////// Made by Devant /////////////
/////////////////////////////////////