Flying line

new topic     » topic index » view thread      » older message » newer message

------=_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>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>include graphics.e<BR>include =
get.e</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>integer=20
gmode<BR>gmode=3Dgraphics_mode(19)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>atom=20
ix=3Dix-1<BR>iiy=3Diy-1</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>procedure wait(atom=20
pinterval)<BR>&nbsp;&nbsp;&nbsp; atom=20
endtime<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; endtime=3D time() =
+=20
pinterval<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while endtime =
&gt;=20
time() do<BR>&nbsp;&nbsp;&nbsp; end while<BR>end procedure</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>while ix and iy !=3Dyx and yy=20
do<BR>&nbsp;&nbsp;&nbsp; lcol=3Drand(15)<BR>&nbsp;&nbsp;&nbsp; =
iy+=3D1</FONT></DIV>
<DIV><FONT face=3DArial =
iix=3Dix-1<BR>&nbsp;&nbsp;&nbsp; iiy=3Diy-1<BR>&nbsp;&nbsp;&nbsp;=20
draw_line(0,{{iix,iix},{iiy,iiy}})<BR>&nbsp;&nbsp;&nbsp; =
wait(0.00005)<BR>end=20
while<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>-Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>8-)</FONT></DIV>

------=_NextPart_000_0007_01C02597.A0FE8CA0--

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu