Flying line
- Posted by Paul Kerslake <paulk at UNISERVE.COM> Sep 23, 2000
- 431 views
------=_NextPart_000_0007_01C02597.A0FE8CA0 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I made this program, in repsonce to a letter I got to simplify a = procedure. Here it is: include graphics.e include get.e integer gmode gmode=3Dgraphics_mode(19) atom ix,iy,yx,yy,lcol,iix,iiy ix=3D1 iy=3D1 yx=3D100 yy=3D100 iix=3Dix-1 iiy=3Diy-1 procedure wait(atom pinterval) atom endtime endtime=3D time() + pinterval while endtime > time() do end while end procedure while ix and iy !=3Dyx and yy do lcol=3Drand(15) iy+=3D1 ix+=3D1 draw_line(lcol,{{ix,ix},{iy,iy}}) iix=3Dix-1 iiy=3Diy-1 draw_line(0,{{iix,iix},{iiy,iiy}}) wait(0.00005) end while I was wondering: If I use another varibale in place of {{ix,ix},{iy,iy}} = one of those, will it straighten the line? Also, are there any changes I = should make before adding on to it? -Thanks 8-) -Thomas ------=_NextPart_000_0007_01C02597.A0FE8CA0 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>I made this program, in repsonce to a = letter I got=20 to simplify a procedure. Here it is:</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>include graphics.e<BR>include = get.e</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>integer=20 gmode<BR>gmode=3Dgraphics_mode(19)</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>atom=20 ix=3Dix-1<BR>iiy=3Diy-1</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>procedure wait(atom=20 pinterval)<BR> atom=20 endtime<BR> endtime=3D time() = +=20 pinterval<BR> while endtime = >=20 time() do<BR> end while<BR>end procedure</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>while ix and iy !=3Dyx and yy=20 do<BR> lcol=3Drand(15)<BR> = iy+=3D1</FONT></DIV> <DIV><FONT face=3DArial = iix=3Dix-1<BR> iiy=3Diy-1<BR> =20 draw_line(0,{{iix,iix},{iiy,iiy}})<BR> = wait(0.00005)<BR>end=20 while<BR></FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>I was wondering: If I use another = varibale in place=20 of {{ix,ix},{iy,iy}} one of those, will it straighten the line? Also, = are there=20 any changes I should make before adding on to it?</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>-Thanks</FONT></DIV> <DIV><FONT face=3DArial size=3D2>8-)</FONT></DIV> ------=_NextPart_000_0007_01C02597.A0FE8CA0--