
-----------------------------------
HaVoC
Mon Jan 12, 2004 11:32 am

Using a parabola
-----------------------------------
I'm doing some animation and i'm trying to make the object I made move in a quadratic equation(parabola)

 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?

-----------------------------------
AsianSensation
Mon Jan 12, 2004 4:05 pm


-----------------------------------
where did you declare net? and where did you declare basketball?

basketball (x, round(y: real): int, 1)

also, basketball cannot be called like that, it should be this instead:

basketball (x, round(y), 1)

-----------------------------------
Homer_simpson
Mon Jan 12, 2004 4:38 pm


-----------------------------------
take a look at my volleyball program... or better yet my projectile tutorial..

-----------------------------------
Andy
Mon Jan 12, 2004 8:13 pm


-----------------------------------
use whatdotcolor... u draw the parabola, then u whatdotcolor it
