Computer Science Canada parabolic arch needed in this dont know how to put it in |
Author: | waleedalidogar [ Wed Dec 14, 2005 6:55 pm ] |
Post subject: | parabolic arch needed in this dont know how to put it in |
my code is: setscreen ("graphics:max;max") loop var x : int var y : int x := 10 y := 600 var yLimit : int yLimit := 400 for i : 1 .. 15 y := yLimit loop drawoval (x, y, 30, 30, brightblue) delay (15) cls x := x + 2 y := y - 10 exit when y <= 25 end loop yLimit := yLimit - 30 loop drawoval (x, y, 30, 30, brightblue) delay (15) cls x := x + 1 y := y + 10 exit when y >= yLim |
Author: | Paul [ Wed Dec 14, 2005 7:22 pm ] | ||
Post subject: | |||
1. This is the wrong from to be posting in, post in the turing help forum. 2. put your code in code boxes like the following. 3. Remember you're not trying to program a parabolic trajectory, as the trajectory is a result of gravity, so you're trying to simulate gravity. Think about it and its easy. Here's something I quickly wrote up.:
|
Author: | Cervantes [ Wed Dec 14, 2005 7:30 pm ] | ||
Post subject: | |||
Moved. Don't forget to indent, Paul. waleedalidogar: Please use [ code][ /code] tags when posting code. Or better yet, [ syntax="turing"][ /syntax] tags. If you're trying to simulate gravity, try Paul's approach. If you really do want to make a parabola, well, why are you adding constant values to x and y? Incriment x, and calculate y based on the equation of your parabola. Ex.
|