Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
31
Task/Polyspiral/FreeBASIC/polyspiral.basic
Normal file
31
Task/Polyspiral/FreeBASIC/polyspiral.basic
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#include "fbgfx.bi"
|
||||
#if __FB_LANG__ = "fb"
|
||||
Using FB '' Scan code constants are stored in the FB namespace in lang FB
|
||||
#endif
|
||||
#define pi 4 * Atn(1)
|
||||
#define Deg2Rad pi/180
|
||||
|
||||
Dim As Integer w = 900, h = w
|
||||
Screenres w, h, 8
|
||||
Windowtitle "Polyspiral"
|
||||
|
||||
Dim As Integer incr = 0, angulo, longitud, x1, y1, x2, y2, N
|
||||
Do
|
||||
incr += 1
|
||||
x1 = w / 2
|
||||
y1 = h / 2
|
||||
Pset (Fix(x1), Fix(y1))
|
||||
longitud = 5
|
||||
angulo = incr
|
||||
For N = 1 To 150
|
||||
x2 = x1 + longitud * Cos(angulo * Deg2Rad)
|
||||
y2 = y1 + longitud * Sin(angulo * Deg2Rad)
|
||||
Line - (Fix(x2), Fix(y2)), N+16
|
||||
x1 = x2
|
||||
y1 = y2
|
||||
longitud += 3
|
||||
angulo += incr
|
||||
Next N
|
||||
Sleep 500
|
||||
Cls
|
||||
Loop Until Multikey(SC_ESCAPE)
|
||||
Loading…
Add table
Add a link
Reference in a new issue