Bonjour,
Nous avons essayé de faire une trajectoire parabolique avec un ballon (avec les équations horaires), mais ça ne marche pas..
Pouvez vous nous dire pourquoi ?
Voici le programme pour le moment
PImage img;
PImage img2;
float Vitesse = 5;
float x=0;
float y= 0;
// float i;
float g= 6*10^11;
float t;
float alpha=50;
float V0;
int []tab= new int [4];
int [] abscisse = new int [4];
void setup() {
size (1200, 800);
img = loadImage("ballon.png");
img2 = loadImage ("panier.png");
}
void draw() {
background (255);
image(img, x, 600, 200, 200);
image (img2, 800, 80,350,350);
Deplacement () ;
// x = x + V0*cos(alpha)*t;
// y = y + -1/2*((g*t)*(g*t))+V0*sin(alpha)*t;
}
void Deplacement (){
if (keyPressed) {
if (key == 'e' || key == 'E') {
x=x+10 ;
}
}
}
Merci,
Laura et Sarah.
