ZX BASIC:Circle.Bas

From BorielWiki
Jump to: navigation, search
Program: circle.bas
  1. REM Sample circle drawing without using the CIRCLE command
  2. DIM i, r, x, y, q AS FLOAT
  3. DIM ax, ay, zx, zy, dx, dy AS INTEGER
  4. x = 127
  5. y = 87
  6. r = 40
  7. q = 1 / r
  8. FOR i = 0 TO PI / 2 STEP q
  9. dy = SIN(i) * r
  10. dx = COS(i) * r
  11. zx = x - dx
  12. zy = y - dy
  13. ax = x + dx
  14. ay = y + dy
  15. PLOT ax, ay
  16. PLOT zx, ay
  17. PLOT ax, zy
  18. PLOT zx, zy
  19. NEXT i
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox
Translate
Google AdSense