Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Using a parabola
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
HaVoC




PostPosted: 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
Sponsor
sponsor
AsianSensation




PostPosted: 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




PostPosted: 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




PostPosted: Mon Jan 12, 2004 8:13 pm   Post subject: (No subject)

use whatdotcolor... u draw the parabola, then u whatdotcolor it
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: