Using a parabola
Author |
Message |
HaVoC
|
Posted: Mon Jan 12, 2004 11:32 am Post subject: Using a parabola |
|
|
I'm doing some animation and i'm trying to make the object I made move in a quadratic equation(parabola)
code: | x := 30
d := 100
y := round(-0.125 * (x - 300) * (x - 300) + 200)
net (500, 0)
for i : 1 .. 30
x := x + 15
y := y + 10
basketball (x, round(y: real): int, 1)
net (500, 0)
delay (d)
basketball (x, y, 0)
net (500, 0)
end for |
It's not workign to well though...anyone see why? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
AsianSensation
|
Posted: Mon Jan 12, 2004 4:05 pm Post subject: (No subject) |
|
|
where did you declare net? and where did you declare basketball?
code: | basketball (x, round(y: real): int, 1) |
also, basketball cannot be called like that, it should be this instead:
code: | basketball (x, round(y), 1) |
|
|
|
|
|
|
Homer_simpson
|
Posted: Mon Jan 12, 2004 4:38 pm Post subject: (No subject) |
|
|
take a look at my volleyball program... or better yet my projectile tutorial.. |
|
|
|
|
|
Andy
|
Posted: Mon Jan 12, 2004 8:13 pm Post subject: (No subject) |
|
|
use whatdotcolor... u draw the parabola, then u whatdotcolor it |
|
|
|
|
|
|
|