Computer Science Canada Help with Equation of a Circle y=sqrt(r**2 + x**2) |
Author: | Kuntzy [ Tue Nov 11, 2003 9:41 pm ] |
Post subject: | 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] |
Author: | Mazer [ Tue Nov 11, 2003 10:03 pm ] | ||
Post subject: | |||
use trig.
|
Author: | Tony [ Tue Nov 11, 2003 11:15 pm ] |
Post subject: | |
oh yeah, trig pwnz 8) Calculus too, although I haven't used it in programming just yet... |
Author: | Kuntzy [ Wed Nov 12, 2003 11:07 pm ] |
Post subject: | Thankz A lot |
Thanks for your help, the code worked great :D |