Archimedean spiral: Difference between revisions

Content added Content deleted
m (→‎{{header|ALGOL W}}: cite coirrect soure of the translation!)
(→‎{{header|ALGOL W}}: Round insted of truncate)
Line 169: Line 169:
real r;
real r;
r := a + b * t;
r := a + b * t;
x := entier(r * cos(t) + w);
x := round(r * cos(t) + w);
y := entier(r * sin(t) + h);
y := round(r * sin(t) + h);
if x <= 0 or y <= 0 then begin end
if x <= 0 or y <= 0 then begin end
else if x >= 280 then begin end
else if x >= 280 then begin end
Line 194: Line 194:
{{out}}
{{out}}
<pre>
<pre>
********************
**************
****** ******
******** ********
**** ****
****** ****
**** ****
**** ******
**** ****
**** ****
**** ****
**** ****
**** ************** ****
**** ****
**** ****** ****** **
**** ****************** **
** **** **** ****
**** **** ****** **
**** **** **** **
** **** **** ****
** **** **** ****
**** ** **** **
**** **** ** **
** **** **** **
** ** ******** ** **
** **** ** **
** ** ****** **** ** ****
** ** ********** **** **
**** ** ** **** ** **
** **** **** **** ** **
** ** **** ** ** **
** ** ** **** ** **
** ** ** ** ** **
** ** **** ** ** **
** **** ** **** ** **
** ** ** **** ** **
** **** ** **** ** ****
** ** ** ****** ** **
** ** ** **** **
** ** ** **** **
** ** ** ** **
** ** **** ** **
**** ** ** **** ****
** ** ** **** **
** ** **** **** **
** ** **** **** **
** ** ****** ****** ****
** ** ****** **** ****
**** **** ************ **
** **** ************** **
** ** ****
** ** **
** **** ****
**** ** ****
** **** ****
** **** ****
**** **** ****
**** **** ******
** ******** ******
** ****** ******
** ****************
** ******** ********
** **********
**
**
**
****
****
******
******
******
********
********
**********
********
</pre>
</pre>