
-----------------------------------
Kuntzy
Tue Nov 11, 2003 9:41 pm

Help with Equation of a Circle y=sqrt(r**2 + x**2)
-----------------------------------
I was wondering if anyone knew how to get a line to move around the screen like clock.
     All have thus far is:

var r: real:= 200
var mx:int:=1
var my:int:=1

loop

mx+=1
my+=1

var y:real:= sqrt(r**2 + mx**2)
var x:real:= sqrt(r**2 + my**2)

drawline(320, 150, round(x), round(y),black)
delay(30)
cls
end loop

Once I get this i working i want to make a gambling game and would use this to make the ballspin around the table. [/b]

-----------------------------------
Mazer
Tue Nov 11, 2003 10:03 pm


-----------------------------------
use trig.


for i : 0 .. 360 by 2
    drawline (maxx div 2, maxy div 2, maxx div 2 + round (80 * cosd (i)), maxy div 2 + round (80 * sind (i)), 7)
    drawoval (maxx div 2, maxy div 2, 83, 83, 7)
    delay (40)
    cls
end for


-----------------------------------
Tony
Tue Nov 11, 2003 11:15 pm


-----------------------------------
oh yeah, trig pwnz 8) Calculus too, although I haven't used it in programming just yet...

-----------------------------------
Kuntzy
Wed Nov 12, 2003 11:07 pm

Thankz A lot
-----------------------------------
Thanks for your help, the code worked great :D
