Archimedean spiral: Difference between revisions

Content added Content deleted
m (Moved FutureBasic out of Basic group)
Line 561: Line 561:
Sleep
Sleep
End</syntaxhighlight>
End</syntaxhighlight>

==={{header|FutureBasic}}===
<syntaxhighlight lang="futurebasic">
_maxPoints = 190

void local fn DoIt
window 1, @"Archimedean Spiral", (0,0,500,500)
WindowSetBackgroundColor( 1, fn ColorBlack )
pen 3, fn ColorRed
float x, y, angle
long i, a = 10, b = 10, x1 = 250, y1 = 250
for i = 0 to _maxPoints - 1
angle = 0.1 * i
x = (a + b * angle) * cos(angle) + 250
y = (a + b * angle) * sin(angle) + 250
line x1,y1 to x,y
x1 = x : y1 = y
next
end fn

fn DoIt

HandleEvents
</syntaxhighlight>
{{output}}
[[File:ArchimedeanSpiralFB.png]]


==={{header|GW-BASIC}}===
==={{header|GW-BASIC}}===
Line 1,321: Line 1,294:
}
}
}</syntaxhighlight>
}</syntaxhighlight>

==={{header|FutureBasic}}===
<syntaxhighlight lang="futurebasic">
_maxPoints = 190

void local fn DoIt
window 1, @"Archimedean Spiral", (0,0,500,500)
WindowSetBackgroundColor( 1, fn ColorBlack )
pen 3, fn ColorRed
float x, y, angle
long i, a = 10, b = 10, x1 = 250, y1 = 250
for i = 0 to _maxPoints - 1
angle = 0.1 * i
x = (a + b * angle) * cos(angle) + 250
y = (a + b * angle) * sin(angle) + 250
line x1,y1 to x,y
x1 = x : y1 = y
next
end fn

fn DoIt

HandleEvents
</syntaxhighlight>
{{output}}
[[File:ArchimedeanSpiralFB.png]]


=={{header|Haskell}}==
=={{header|Haskell}}==