Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
circle algorithm question
#3
This (basically the same as Zap's heheh)?

Code:
#define PI 3.141592

dim as double radians
dim as integer angle, r, px, py

screenres 640, 480

angle = 30
r=100
numPoints=10

Do
    
    radians = angle * 3.14/180

    px = r * cos(radians)
    py = r * sin(radians)
    
    Line (320, 240)-(320 + px, 240 + py)
    
    Print PX, PY
    
    Angle += 30
    
Loop until angle > 360
sleep
Reply


Messages In This Thread
circle algorithm question - by Agamemnus - 07-17-2006, 08:37 AM
circle algorithm question - by Zap - 07-17-2006, 01:51 PM
circle algorithm question - by TheAdventMaster - 07-17-2006, 02:07 PM
circle algorithm question - by Agamemnus - 07-17-2006, 08:05 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)