Home » Archimedes archive » Acorn User » AU 1993-11.adf » !StarInfo_StarInfo » Frames

Frames

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1993-11.adf » !StarInfo_StarInfo
Filename: Frames
Read OK:
File size: 1D30 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM    >Frames
   20REM By  Tim Jones
   30REM For 32-bit machines
   40REM (c) BAU November 1993
   50:
   60ON ERROR PROCerror
   70MODE 9+128
   80PROCinit
   90PROCedit
  100END
  110:
  120DEF PROCinit
  130OFF
  140SYS "OS_Byte",4,1
  150SYS "OS_Byte",25,0
  160maxdots=30-1
  170maxlinks=20-1
  180gravity=2
  190taut=.8
  200slow=0.99
  210bounce=1
  220blob=4
  230scr=1
  240size=blob
  250DIM dx(maxdots),dy(maxdots)
  260DIM odx(maxdots),ody(maxdots)
  270DIM xs(maxdots),ys(maxdots)
  280DIM fx(maxdots)
  290DIM link(2,maxlinks)
  300DIM gravity(maxdots)
  310MOUSE RECTANGLE blob,blob+4,1276-blob*2,1016-blob*2
  320MOUSE ON
  330ENDPROC
  340:
  350DEF PROCedit
  360LOCAL dot
  370dots=-1
  380links=-1
  390@%=&A
  400REPEAT
  410 PROCmouse(mx,my,mb)
  420 dot=FNfinddot(mx,my)
  430 IF mb>0 PROCcheckdot(dot,mx,my,mb)
  440 CASE INKEY$(0) OF
  450  WHEN "R":dots=-1:links=-1
  460  WHEN " ":size=0:PROCrec(2):PROCclear:PROCanimate:PROCrec(1)
  470 ENDCASE
  480 PROCredraw(1)
  490 IF dot>-1 GCOL 3:CIRCLE dx(dot),dy(dot),size+8
  500 PROCswap
  510UNTIL FALSE
  520ENDPROC
  530:
  540DEF PROCcheckdot(dot,mx,my,mb)
  550CASE mb OF
  560 WHEN 1,4:nfx=1
  570 WHEN 2:nfx=2
  580ENDCASE
  590IF dot=-1 PROCnewdot(mx,my,nfx):dot=dots:new=TRUE ELSE new=FALSE
  600IF mb=1 AND dot>-1 THEN
  610 PROCdragdot(dot)
  620ELSE
  630 IF FNdrag(mx,my) THEN
  640  PROClink(dot)
  650 ELSE
  660  IF fx(dot)=nfx AND NOT new PROCdeldot(dot) ELSE fx(dot)=nfx
  670 ENDIF
  680ENDIF
  690ENDPROC
  700:
  710DEF FNdrag(mx,my)
  720LOCAL dot1,dot2,mb
  730dot1=FNfinddot(mx,my)
  740REPEAT
  750 PROCmouse(mx,my,mb)
  760 dot2=FNfinddot(mx,my)
  770UNTIL dot1<>dot2 OR mb=0
  780IF dot1<>dot2 =TRUE
  790=FALSE
  800:
  810DEF PROCdragdot(dot)
  820LOCAL mx,my,mb,top
  830MOUSE TO dx(dot),dy(dot)
  840REPEAT
  850 PROCmouse(mx,my,mb)
  860 dx(dot)=-size
  870 top=FNfinddot(mx,my)
  880 IF top>-1 GCOL 3:CIRCLE dx(top),dy(top),size+8
  890 dx(dot)=mx
  900 dy(dot)=my
  910 PROCredraw(1)
  920 PROCswap
  930UNTIL mb=0
  940IF top>-1 THEN
  950 FOR link=0 TO links
  960  l0=link(0,link)
  970  l1=link(1,link)
  980  IF l0=dot link(0,link)=top:l0=top
  990  IF l1=dot link(1,link)=top:l1=top
 1000  IF l0=l1 THEN
 1010   PROCdellink(link):link-=1
 1020  ELSE
 1030   link(2,link)=FNdist(dx(l0),dy(l0),dx(l1),dy(l1))
 1040  ENDIF
 1050 NEXT
 1060 PROCdeldot(dot)
 1070ENDIF
 1080FOR link=0 TO links
 1090 l0=link(0,link)
 1100 l1=link(1,link)
 1110 IF l0=dot OR l1=dot THEN
 1120  link(2,link)=FNdist(dx(l0),dy(l0),dx(l1),dy(l1))
 1130 ENDIF
 1140NEXT
 1150ENDPROC
 1160:
 1170DEF FNfinddot(mx,my)
 1180LOCAL fdot,dot
 1190IF dots=-1 =-1
 1200fdot=-1
 1210FOR dot=0 TO dots
 1220 IF FNdist(mx,my,dx(dot),dy(dot))<blob*2 fdot=dot
 1230NEXT
 1240=fdot
 1250:
 1260DEF PROCnewdot(dx,dy,fx)
 1270IF dots=maxdots ENDPROC
 1280dots+=1
 1290dx(dots)=dx
 1300dy(dots)=dy
 1310fx(dots)=fx
 1320ENDPROC
 1330:
 1340DEF PROCdeldot(dot)
 1350LOCAL del,link
 1360dx(dot)=dx(dots)
 1370dy(dot)=dy(dots)
 1380fx(dot)=fx(dots)
 1390del=0
 1400IF links>-1 THEN
 1410 link=0
 1420 REPEAT
 1430  IF link(0,link)=dot OR link(1,link)=dot THEN
 1440   PROCdellink(link)
 1450   link-=1
 1460   del+=1
 1470  ENDIF
 1480  link+=1
 1490 UNTIL link>links
 1500 FOR link=0 TO links
 1510  IF link(0,link)=dots link(0,link)=dot
 1520  IF link(1,link)=dots link(1,link)=dot
 1530 NEXT
 1540ENDIF
 1550dots-=1
 1560ENDPROC
 1570:
 1580DEF PROClink(dot1)
 1590LOCAL mx,my,mb
 1600REPEAT
 1610 PROCmouse(mx,my,mb)
 1620 dot2=FNfinddot(mx,my)
 1630 GCOL 2
 1640 IF dot2=-1 THEN
 1650  LINE dx(dot1),dy(dot1),mx,my
 1660 ELSE
 1670  LINE dx(dot1),dy(dot1),dx(dot2),dy(dot2)
 1680 ENDIF
 1690 PROCredraw(1)
 1700 IF dot2>-1 GCOL 3:CIRCLE dx(dot2),dy(dot2),size+8
 1710 PROCswap
 1720UNTIL mb=0
 1730IF dot1=dot2 ENDPROC
 1740IF dot2=-1 PROCnewdot(mx,my,nfx):dot2=dots
 1750IF FNlink(dot1,dot2)>-1 PROCdellink(FNlink(dot1,dot2)):ENDPROC
 1760IF links=maxlinks ENDPROC
 1770IF dot1>dot2 SWAP dot1,dot2
 1780links+=1
 1790link(0,links)=dot1
 1800link(1,links)=dot2
 1810link(2,links)=FNdist(dx(dot1),dy(dot1),dx(dot2),dy(dot2))
 1820ENDPROC
 1830:
 1840DEF PROCdellink(link)
 1850link(0,link)=link(0,links)
 1860link(1,link)=link(1,links)
 1870link(2,link)=link(2,links)
 1880links-=1
 1890ENDPROC
 1900:
 1910DEF FNdist(x1,y1,x2,y2)
 1920=SQR((x2-x1)^2+(y2-y1)^2)
 1930:
 1940DEF FNlink(dot1,dot2)
 1950LOCAL num,link
 1960IF links=-1 =-1
 1970num=-1
 1980link=-1
 1990REPEAT
 2000 link+=1
 2010 IF link(0,link)=dot1 AND link(1,link)=dot2 num=link
 2020 IF link(0,link)=dot2 AND link(1,link)=dot1 num=link
 2030UNTIL link=links OR num>-1
 2040=num
 2050:
 2060DEF PROCerror
 2070SYS 6,113,3-scr
 2080REPORT
 2090PRINT;" at line ";ERL
 2100MOUSE OFF
 2110END
 2120ENDPROC
 2130:
 2140DEF PROCswap
 2150SYS 6,112,scr
 2160scr=3-scr
 2170SYS 6,113,scr
 2180WAIT
 2190CLS
 2200ENDPROC
 2210:
 2220DEF PROCredraw(blobs)
 2230LOCAL link,dot
 2240IF links>-1 THEN
 2250 GCOL 2
 2260 FOR link=0 TO links
 2270  LINE dx(link(0,link)),dy(link(0,link)),dx(link(1,link)),dy(link(1,link))
 2280 NEXT
 2290ENDIF
 2300IF dots>-1 AND blobs THEN
 2310 FOR dot=0 TO dots
 2320  GCOL fx(dot)
 2330  CIRCLE FILL dx(dot),dy(dot),size
 2340 NEXT
 2350ENDIF
 2360ENDPROC
 2370:
 2380DEF PROCnomouse
 2390LOCAL mx,my,mb
 2400REPEAT
 2410 PROCmouse(mx,my,mb)
 2420UNTIL mb=0
 2430ENDPROC
 2440:
 2450DEF PROCanimate
 2460LOCAL odx(),ody(),ofx(),dot,end
 2470DIM odx(DIM(dx(),1)),ody(DIM(dy(),1)),ofx(DIM(fx(),1))
 2480odx()=dx()
 2490ody()=dy()
 2500ofx()=fx()
 2510xs()=0
 2520ys()=0
 2530pos=0
 2540on=FALSE
 2550drag=-1
 2560@%=&2020A
 2570FOR dot=0 TO dots
 2580 gravity(dot)=1
 2590NEXT
 2600dx()=dx()*gravity()
 2610dy()=dy()*gravity()
 2620gravity()=gravity()*gravity
 2630PROCnomouse
 2640REPEAT
 2650 key$=INKEY$(0)
 2660 IF key$>"" THEN
 2670  CASE key$ OF
 2680   WHEN "�":
 2690    IF on THEN
 2700     CASE pos OF
 2710      WHEN 0:
 2720       IF gravity<8 gravity+=0.05 ELSE gravity=8
 2730       FOR dot=0 TO dots
 2740        gravity(dot)=gravity
 2750       NEXT
 2760      WHEN 1:
 2770       IF taut<10 taut+=0.05 ELSE taut=10
 2780      WHEN 2:
 2790       IF bounce<1.5 bounce+=0.02 ELSE bounce=1.5
 2800      WHEN 3:
 2810       IF slow<5 slow+=0.01 ELSE slow=5
 2820     ENDCASE
 2830    ENDIF
 2840   WHEN "�":
 2850    IF on THEN
 2860     CASE pos OF
 2870      WHEN 0:
 2880       IF gravity>0 gravity-=0.05 ELSE gravity=0
 2890       FOR dot=0 TO dots
 2900        gravity(dot)=gravity
 2910       NEXT
 2920      WHEN 1:
 2930       IF taut>0.05 taut-=0.05 ELSE taut=0.05
 2940      WHEN 2:
 2950       IF bounce>0 bounce-=0.02 ELSE bounce=0
 2960      WHEN 3:
 2970       IF slow>0 slow-=0.01 ELSE slow=0
 2980     ENDCASE
 2990    ENDIF
 3000   WHEN "�":
 3010    IF pos>0 pos-=1
 3020   WHEN "�":
 3030    IF pos<3 pos+=1
 3040   WHEN "S":
 3050    dx()=odx()
 3060    dy()=ody()
 3070    fx()=ofx()
 3080    xs()=0
 3090    ys()=0
 3100    drag=-1
 3110   WHEN "D":
 3120    IF size=0 size=blob:PROCrec(1) ELSE size=0:PROCrec(2)
 3130   WHEN "P"
 3140    REPEATUNTILINKEY$(0)>""
 3150   WHEN "T":
 3160    on=NOT on
 3170  ENDCASE
 3180 ENDIF
 3190 PROCmouse(mx,my,mb)
 3200 ys()=ys()-gravity()
 3210 xs()=xs()*slow
 3220 ys()=ys()*slow
 3230 dx()=dx()+xs()
 3240 dy()=dy()+ys()
 3250 IF drag>-1 THEN
 3260  IF mb>0 THEN
 3270   xs(drag)=mx-dx(drag)
 3280   ys(drag)=my-dy(drag)
 3290   dx(drag)=mx
 3300   dy(drag)=my
 3310  ELSE
 3320   MOUSE TO dx(drag),dy(drag)
 3330   PROCmouse(mx,my,mb)
 3340   drag=-1
 3350  ENDIF
 3360 ELSE
 3370  IF mb>0 THEN
 3380   drag=FNfinddot(mx,my)
 3390   IF drag>-1 THEN
 3400    MOUSE TO dx(drag),dy(drag)
 3410    CASE mb OF
 3420     WHEN 4:fx(drag)=1
 3430     WHEN 2:fx(drag)=2
 3440    ENDCASE
 3450   ENDIF
 3460  ENDIF
 3470 ENDIF
 3480 FOR dot=0 TO dots
 3490  IF dx(dot)<size xs(dot)=ABSxs(dot)*bounce:dx(dot)=size
 3500  IF dx(dot)>1276-size xs(dot)=-ABSxs(dot)*bounce:dx(dot)=1276-size
 3510  IF dy(dot)<size ys(dot)=ABSys(dot)*bounce-gravity:dy(dot)=size
 3520 NEXT
 3530 IF links>-1 THEN
 3540  FOR link=0 TO links
 3550   l0=link(0,link)
 3560   l1=link(1,link)
 3570   l2=link(2,link)
 3580   sx=dx(l0)+(dx(l1)-dx(l0))/2
 3590   sy=dy(l0)+(dy(l1)-dy(l0))/2
 3600   sd=FNdist(dx(l0),dy(l0),sx,sy)*2
 3610   PROCmovedot(l0)
 3620   PROCmovedot(l1)
 3630  NEXT
 3640 ENDIF
 3650 IF on THEN
 3660  PRINT;" Gravity   Tautness  Bounce    Drag";TAB(pos*10,0);"�";
 3670  PRINTTAB(1);ABSgravity;TAB(11);ABStaut;
 3680  PRINTTAB(21);ABSbounce;TAB(31);ABSslow;
 3690 ENDIF
 3700 PROCredraw(SGNsize)
 3710 PROCswap
 3720UNTIL key$=" "
 3730dx()=odx()
 3740dy()=ody()
 3750fx()=ofx()
 3760size=blob
 3770@%=&A
 3780PROCnomouse
 3790ENDPROC
 3800:
 3810DEF PROCmovedot(dot)
 3820CASE fx(dot) OF
 3830 WHEN 1:PROCmovepos(dot)
 3840 WHEN 2:xs(dot)=0:ys(dot)=gravity
 3850ENDCASE
 3860ENDPROC
 3870:
 3880DEF PROCmovepos(dot)
 3890nx=(dx(dot)-sx)/sd*l2+sx
 3900ny=(dy(dot)-sy)/sd*l2+sy
 3910xs(dot)+=(nx-dx(dot))*taut
 3920ys(dot)+=(ny-dy(dot))*taut
 3930dx(dot)=nx
 3940IF ny<size dy(dot)=size ELSE dy(dot)=ny
 3950ENDPROC
 3960:
 3970DEF PROCclear
 3980LOCAL clear
 3990IF dots=maxdots ENDPROC
 4000FOR clear=dots+1 TO maxdots
 4010 dx(clear)=0
 4020 dy(clear)=0
 4030 odx(clear)=0
 4040 ody(clear)=0
 4050NEXT
 4060ENDPROC
 4070:
 4080DEF PROCrec(rec)
 4090CASE rec OF
 4100 WHEN 1:MOUSE RECTANGLE size,size,1276-size*2,1016-size*2
 4110 WHEN 2:MOUSE RECTANGLE 0,0,1276,1016
 4120ENDCASE
 4130ENDPROC
 4140:
 4150DEF PROCmouse(RETURN mx,RETURN my,RETURN mb)
 4160MOUSE mx,my,mb
 4170mx=mx DIV 4*4
 4180my=my DIV 4*4
 4190ENDPROC

�    >Frames
� By  Tim Jones
� For 32-bit machines
(� (c) BAU November 1993
2:
<� � �error
F� 9+128
P	�init
Z	�edit
d�
n:
x� �init
��
�ș "OS_Byte",4,1
�ș "OS_Byte",25,0
�maxdots=30-1
�maxlinks=20-1
�
gravity=2
�taut=.8
�
slow=0.99
�bounce=1
�
blob=4
�	scr=1
�
size=blob
�� dx(maxdots),dy(maxdots)
� odx(maxdots),ody(maxdots)
� xs(maxdots),ys(maxdots)
� fx(maxdots)
"� link(2,maxlinks)
,� gravity(maxdots)
6-ȗ ȓ blob,blob+4,1276-blob*2,1016-blob*2
@ȗ �
J�
T:
^� �edit
h	� dot
rdots=-1
|links=-1
�	@%=&A
��
� �mouse(mx,my,mb)
� dot=�finddot(mx,my)
�# � mb>0 �checkdot(dot,mx,my,mb)
� Ȏ �(0) �
�  � "R":dots=-1:links=-1
�2  � " ":size=0:�rec(2):�clear:�animate:�rec(1)
� �
� �redraw(1)
�+ � dot>-1 � 3:ȏ dx(dot),dy(dot),size+8
�
 �swap
�� �
�
:
� �checkdot(dot,mx,my,mb)
&Ȏ mb �
0 � 1,4:nfx=1
: � 2:nfx=2
D�
N6� dot=-1 �newdot(mx,my,nfx):dot=dots:new=� � new=�
X� mb=1 � dot>-1 �
b �dragdot(dot)
l�
v � �drag(mx,my) �
�  �link(dot)
� �
�6  � fx(dot)=nfx � � new �deldot(dot) � fx(dot)=nfx
� �
��
��
�:
�� �drag(mx,my)
�� dot1,dot2,mb
�dot1=�finddot(mx,my)
��
� �mouse(mx,my,mb)
� dot2=�finddot(mx,my)
� dot1<>dot2 � mb=0
� dot1<>dot2 =�
=�
 :
*� �dragdot(dot)
4� mx,my,mb,top
>ȗ � dx(dot),dy(dot)
H�
R �mouse(mx,my,mb)
\ dx(dot)=-size
f top=�finddot(mx,my)
p+ � top>-1 � 3:ȏ dx(top),dy(top),size+8
z dx(dot)=mx
� dy(dot)=my
� �redraw(1)
�
 �swap
�
� mb=0
�� top>-1 �
� � link=0 � links
�  l0=link(0,link)
�  l1=link(1,link)
�&  � l0=dot link(0,link)=top:l0=top
�&  � l1=dot link(1,link)=top:l1=top
�  � l0=l1 �
�   �dellink(link):link-=1
�  �
6   link(2,link)=�dist(dx(l0),dy(l0),dx(l1),dy(l1))
  �
 �
$ �deldot(dot)
.�
8� link=0 � links
B l0=link(0,link)
L l1=link(1,link)
V � l0=dot � l1=dot �
`5  link(2,link)=�dist(dx(l0),dy(l0),dx(l1),dy(l1))
j �
t�
~�
�:
�� �finddot(mx,my)
�� fdot,dot
�� dots=-1 =-1
�fdot=-1
�� dot=0 � dots
�3 � �dist(mx,my,dx(dot),dy(dot))<blob*2 fdot=dot
��
�	=fdot
�:
�� �newdot(dx,dy,fx)
�� dots=maxdots �
dots+=1

dx(dots)=dx
dy(dots)=dy
fx(dots)=fx
(�
2:
<� �deldot(dot)
F� del,link
Pdx(dot)=dx(dots)
Zdy(dot)=dy(dots)
dfx(dot)=fx(dots)
n	del=0
x� links>-1 �
� link=0
� �
�-  � link(0,link)=dot � link(1,link)=dot �
�   �dellink(link)
�   link-=1
�
   del+=1
�  �
�
  link+=1
� � link>links
� � link=0 � links
�*  � link(0,link)=dots link(0,link)=dot
�*  � link(1,link)=dots link(1,link)=dot
� �
�
dots-=1
�
":
,� �link(dot1)
6� mx,my,mb
@�
J �mouse(mx,my,mb)
T dot2=�finddot(mx,my)
^ � 2
h � dot2=-1 �
r  � dx(dot1),dy(dot1),mx,my
| �
�+  � dx(dot1),dy(dot1),dx(dot2),dy(dot2)
� �
� �redraw(1)
�. � dot2>-1 � 3:ȏ dx(dot2),dy(dot2),size+8
�
 �swap
�
� mb=0
�� dot1=dot2 �
�*� dot2=-1 �newdot(mx,my,nfx):dot2=dots
�6� �link(dot1,dot2)>-1 �dellink(�link(dot1,dot2)):�
�� links=maxlinks �
�� dot1>dot2 Ȕ dot1,dot2
�links+=1
�link(0,links)=dot1
link(1,links)=dot2
<link(2,links)=�dist(dx(dot1),dy(dot1),dx(dot2),dy(dot2))
�
&:
0� �dellink(link)
:link(0,link)=link(0,links)
Dlink(1,link)=link(1,links)
Nlink(2,link)=link(2,links)
Xlinks-=1
b�
l:
v� �dist(x1,y1,x2,y2)
�=�((x2-x1)^2+(y2-y1)^2)
�:
�� �link(dot1,dot2)
�� num,link
�� links=-1 =-1
�
num=-1
�link=-1
��
� link+=1
�5 � link(0,link)=dot1 � link(1,link)=dot2 num=link
�5 � link(0,link)=dot2 � link(1,link)=dot1 num=link
�� link=links � num>-1
�=num
:
� �error
ș 6,113,3-scr
 �
*�;" at line ";�
4ȗ �
>�
H�
R:
\� �swap
fș 6,112,scr
p
scr=3-scr
zș 6,113,scr
�Ȗ
��
��
�:
�� �redraw(blobs)
�� link,dot
�� links>-1 �
� � 2
� � link=0 � links
�K  � dx(link(0,link)),dy(link(0,link)),dx(link(1,link)),dy(link(1,link))
� �
��
�� dots>-1 � blobs �
	 � dot=0 � dots
	  � fx(dot)
	   ȏ Ȑ dx(dot),dy(dot),size
	$ �
	.�
	8�
	B:
	L� �nomouse
	V� mx,my,mb
	`�
	j �mouse(mx,my,mb)
	t
� mb=0
	~�
	�:
	�� �animate
	�� odx(),ody(),ofx(),dot,end
	�2� odx(�(dx(),1)),ody(�(dy(),1)),ofx(�(fx(),1))
	�odx()=dx()
	�ody()=dy()
	�ofx()=fx()
	�
xs()=0
	�
ys()=0
	�	pos=0
	�on=�
	�drag=-1

@%=&2020A

� dot=0 � dots
 gravity(dot)=1
�
(dx()=dx()*gravity()
2dy()=dy()*gravity()
<gravity()=gravity()*gravity
F�nomouse
P�
Z key$=�(0)
d � key$>"" �
n  Ȏ key$ �
x
   � "�":
�    � on �
�     Ȏ pos �
�      � 0:
�0       � gravity<8 gravity+=0.05 � gravity=8
�       � dot=0 � dots
�         gravity(dot)=gravity
�       �
�      � 1:
�)       � taut<10 taut+=0.05 � taut=10
�      � 2:
�1       � bounce<1.5 bounce+=0.02 � bounce=1.5
�      � 3:
�'       � slow<5 slow+=0.01 � slow=5

     �
	    �

   � "�":
"    � on �
,     Ȏ pos �
6      � 0:
@0       � gravity>0 gravity-=0.05 � gravity=0
J       � dot=0 � dots
T         gravity(dot)=gravity
^       �
h      � 1:
r-       � taut>0.05 taut-=0.05 � taut=0.05
|      � 2:
�-       � bounce>0 bounce-=0.02 � bounce=0
�      � 3:
�'       � slow>0 slow-=0.01 � slow=0
�
     �
�	    �
�
   � "�":
�    � pos>0 pos-=1
�
   � "�":
�    � pos<3 pos+=1
�
   � "S":
�    dx()=odx()
�    dy()=ody()
�    fx()=ofx()
    xs()=0
    ys()=0
    drag=-1
&
   � "D":
03    � size=0 size=blob:�rec(1) � size=0:�rec(2)
:   � "P"
D    ���(0)>""
N
   � "T":
X    on=� on
b  �
l �
v �mouse(mx,my,mb)
� ys()=ys()-gravity()
� xs()=xs()*slow
� ys()=ys()*slow
� dx()=dx()+xs()
� dy()=dy()+ys()
� � drag>-1 �
�  � mb>0 �
�   xs(drag)=mx-dx(drag)
�   ys(drag)=my-dy(drag)
�   dx(drag)=mx
�   dy(drag)=my
�  �
�   ȗ � dx(drag),dy(drag)

   �mouse(mx,my,mb)

   drag=-1

  �

  �

*  � mb>0 �

4   drag=�finddot(mx,my)

>   � drag>-1 �

H    ȗ � dx(drag),dy(drag)

R    Ȏ mb �

\     � 4:fx(drag)=1

f     � 2:fx(drag)=2

p	    �

z   �

�  �

� �

� � dot=0 � dots

�9  � dx(dot)<size xs(dot)=�xs(dot)*bounce:dx(dot)=size

�D  � dx(dot)>1276-size xs(dot)=-�xs(dot)*bounce:dx(dot)=1276-size

�A  � dy(dot)<size ys(dot)=�ys(dot)*bounce-gravity:dy(dot)=size

� �

� � links>-1 �

�  � link=0 � links

�   l0=link(0,link)

�   l1=link(1,link)

�   l2=link(2,link)

�"   sx=dx(l0)+(dx(l1)-dx(l0))/2
"   sy=dy(l0)+(dy(l1)-dy(l0))/2
&   sd=�dist(dx(l0),dy(l0),sx,sy)*2
   �movedot(l0)
$   �movedot(l1)
.  �
8 �
B � on �
L=  �;" Gravity   Tautness  Bounce    Drag";�pos*10,0);"�";
V  �1);�gravity;�11);�taut;
`  �21);�bounce;�31);�slow;
j �
t �redraw(�size)
~
 �swap
�� key$=" "
�dx()=odx()
�dy()=ody()
�fx()=ofx()
�
size=blob
�	@%=&A
��nomouse
��
�:
�� �movedot(dot)
�Ȏ fx(dot) �
� � 1:�movepos(dot)
" � 2:xs(dot)=0:ys(dot)=gravity

�
�
:
(� �movepos(dot)
2nx=(dx(dot)-sx)/sd*l2+sx
<ny=(dy(dot)-sy)/sd*l2+sy
Fxs(dot)+=(nx-dx(dot))*taut
Pys(dot)+=(ny-dy(dot))*taut
Zdx(dot)=nx
d'� ny<size dy(dot)=size � dy(dot)=ny
n�
x:
�� �clear
�� clear
�� dots=maxdots �
�� clear=dots+1 � maxdots
� dx(clear)=0
� dy(clear)=0
� odx(clear)=0
� ody(clear)=0
��
��
�:
�� �rec(rec)
�Ȏ rec �
0 � 1:ȗ ȓ size,size,1276-size*2,1016-size*2
 � 2:ȗ ȓ 0,0,1276,1016
�
"�
,:
6� �mouse(� mx,� my,� mb)
@ȗ mx,my,mb
Jmx=mx � 4*4
Tmy=my � 4*4
^�
�
00000000  0d 00 0a 10 f4 20 20 20  20 3e 46 72 61 6d 65 73  |.....    >Frames|
00000010  0d 00 14 13 f4 20 42 79  20 20 54 69 6d 20 4a 6f  |..... By  Tim Jo|
00000020  6e 65 73 0d 00 1e 19 f4  20 46 6f 72 20 33 32 2d  |nes..... For 32-|
00000030  62 69 74 20 6d 61 63 68  69 6e 65 73 0d 00 28 1b  |bit machines..(.|
00000040  f4 20 28 63 29 20 42 41  55 20 4e 6f 76 65 6d 62  |. (c) BAU Novemb|
00000050  65 72 20 31 39 39 33 0d  00 32 05 3a 0d 00 3c 0e  |er 1993..2.:..<.|
00000060  ee 20 85 20 f2 65 72 72  6f 72 0d 00 46 0b eb 20  |. . .error..F.. |
00000070  39 2b 31 32 38 0d 00 50  09 f2 69 6e 69 74 0d 00  |9+128..P..init..|
00000080  5a 09 f2 65 64 69 74 0d  00 64 05 e0 0d 00 6e 05  |Z..edit..d....n.|
00000090  3a 0d 00 78 0b dd 20 f2  69 6e 69 74 0d 00 82 05  |:..x.. .init....|
000000a0  87 0d 00 8c 14 c8 99 20  22 4f 53 5f 42 79 74 65  |....... "OS_Byte|
000000b0  22 2c 34 2c 31 0d 00 96  15 c8 99 20 22 4f 53 5f  |",4,1...... "OS_|
000000c0  42 79 74 65 22 2c 32 35  2c 30 0d 00 a0 10 6d 61  |Byte",25,0....ma|
000000d0  78 64 6f 74 73 3d 33 30  2d 31 0d 00 aa 11 6d 61  |xdots=30-1....ma|
000000e0  78 6c 69 6e 6b 73 3d 32  30 2d 31 0d 00 b4 0d 67  |xlinks=20-1....g|
000000f0  72 61 76 69 74 79 3d 32  0d 00 be 0b 74 61 75 74  |ravity=2....taut|
00000100  3d 2e 38 0d 00 c8 0d 73  6c 6f 77 3d 30 2e 39 39  |=.8....slow=0.99|
00000110  0d 00 d2 0c 62 6f 75 6e  63 65 3d 31 0d 00 dc 0a  |....bounce=1....|
00000120  62 6c 6f 62 3d 34 0d 00  e6 09 73 63 72 3d 31 0d  |blob=4....scr=1.|
00000130  00 f0 0d 73 69 7a 65 3d  62 6c 6f 62 0d 00 fa 1d  |...size=blob....|
00000140  de 20 64 78 28 6d 61 78  64 6f 74 73 29 2c 64 79  |. dx(maxdots),dy|
00000150  28 6d 61 78 64 6f 74 73  29 0d 01 04 1f de 20 6f  |(maxdots)..... o|
00000160  64 78 28 6d 61 78 64 6f  74 73 29 2c 6f 64 79 28  |dx(maxdots),ody(|
00000170  6d 61 78 64 6f 74 73 29  0d 01 0e 1d de 20 78 73  |maxdots)..... xs|
00000180  28 6d 61 78 64 6f 74 73  29 2c 79 73 28 6d 61 78  |(maxdots),ys(max|
00000190  64 6f 74 73 29 0d 01 18  11 de 20 66 78 28 6d 61  |dots)..... fx(ma|
000001a0  78 64 6f 74 73 29 0d 01  22 16 de 20 6c 69 6e 6b  |xdots)..".. link|
000001b0  28 32 2c 6d 61 78 6c 69  6e 6b 73 29 0d 01 2c 16  |(2,maxlinks)..,.|
000001c0  de 20 67 72 61 76 69 74  79 28 6d 61 78 64 6f 74  |. gravity(maxdot|
000001d0  73 29 0d 01 36 2d c8 97  20 c8 93 20 62 6c 6f 62  |s)..6-.. .. blob|
000001e0  2c 62 6c 6f 62 2b 34 2c  31 32 37 36 2d 62 6c 6f  |,blob+4,1276-blo|
000001f0  62 2a 32 2c 31 30 31 36  2d 62 6c 6f 62 2a 32 0d  |b*2,1016-blob*2.|
00000200  01 40 08 c8 97 20 ee 0d  01 4a 05 e1 0d 01 54 05  |.@... ...J....T.|
00000210  3a 0d 01 5e 0b dd 20 f2  65 64 69 74 0d 01 68 09  |:..^.. .edit..h.|
00000220  ea 20 64 6f 74 0d 01 72  0b 64 6f 74 73 3d 2d 31  |. dot..r.dots=-1|
00000230  0d 01 7c 0c 6c 69 6e 6b  73 3d 2d 31 0d 01 86 09  |..|.links=-1....|
00000240  40 25 3d 26 41 0d 01 90  05 f5 0d 01 9a 15 20 f2  |@%=&A......... .|
00000250  6d 6f 75 73 65 28 6d 78  2c 6d 79 2c 6d 62 29 0d  |mouse(mx,my,mb).|
00000260  01 a4 18 20 64 6f 74 3d  a4 66 69 6e 64 64 6f 74  |... dot=.finddot|
00000270  28 6d 78 2c 6d 79 29 0d  01 ae 23 20 e7 20 6d 62  |(mx,my)...# . mb|
00000280  3e 30 20 f2 63 68 65 63  6b 64 6f 74 28 64 6f 74  |>0 .checkdot(dot|
00000290  2c 6d 78 2c 6d 79 2c 6d  62 29 0d 01 b8 0e 20 c8  |,mx,my,mb).... .|
000002a0  8e 20 bf 28 30 29 20 ca  0d 01 c2 1c 20 20 c9 20  |. .(0) .....  . |
000002b0  22 52 22 3a 64 6f 74 73  3d 2d 31 3a 6c 69 6e 6b  |"R":dots=-1:link|
000002c0  73 3d 2d 31 0d 01 cc 32  20 20 c9 20 22 20 22 3a  |s=-1...2  . " ":|
000002d0  73 69 7a 65 3d 30 3a f2  72 65 63 28 32 29 3a f2  |size=0:.rec(2):.|
000002e0  63 6c 65 61 72 3a f2 61  6e 69 6d 61 74 65 3a f2  |clear:.animate:.|
000002f0  72 65 63 28 31 29 0d 01  d6 06 20 cb 0d 01 e0 0f  |rec(1).... .....|
00000300  20 f2 72 65 64 72 61 77  28 31 29 0d 01 ea 2b 20  | .redraw(1)...+ |
00000310  e7 20 64 6f 74 3e 2d 31  20 e6 20 33 3a c8 8f 20  |. dot>-1 . 3:.. |
00000320  64 78 28 64 6f 74 29 2c  64 79 28 64 6f 74 29 2c  |dx(dot),dy(dot),|
00000330  73 69 7a 65 2b 38 0d 01  f4 0a 20 f2 73 77 61 70  |size+8.... .swap|
00000340  0d 01 fe 07 fd 20 a3 0d  02 08 05 e1 0d 02 12 05  |..... ..........|
00000350  3a 0d 02 1c 1d dd 20 f2  63 68 65 63 6b 64 6f 74  |:..... .checkdot|
00000360  28 64 6f 74 2c 6d 78 2c  6d 79 2c 6d 62 29 0d 02  |(dot,mx,my,mb)..|
00000370  26 0b c8 8e 20 6d 62 20  ca 0d 02 30 10 20 c9 20  |&... mb ...0. . |
00000380  31 2c 34 3a 6e 66 78 3d  31 0d 02 3a 0e 20 c9 20  |1,4:nfx=1..:. . |
00000390  32 3a 6e 66 78 3d 32 0d  02 44 05 cb 0d 02 4e 36  |2:nfx=2..D....N6|
000003a0  e7 20 64 6f 74 3d 2d 31  20 f2 6e 65 77 64 6f 74  |. dot=-1 .newdot|
000003b0  28 6d 78 2c 6d 79 2c 6e  66 78 29 3a 64 6f 74 3d  |(mx,my,nfx):dot=|
000003c0  64 6f 74 73 3a 6e 65 77  3d b9 20 8b 20 6e 65 77  |dots:new=. . new|
000003d0  3d a3 0d 02 58 15 e7 20  6d 62 3d 31 20 80 20 64  |=...X.. mb=1 . d|
000003e0  6f 74 3e 2d 31 20 8c 0d  02 62 12 20 f2 64 72 61  |ot>-1 ...b. .dra|
000003f0  67 64 6f 74 28 64 6f 74  29 0d 02 6c 05 cc 0d 02  |gdot(dot)..l....|
00000400  76 15 20 e7 20 a4 64 72  61 67 28 6d 78 2c 6d 79  |v. . .drag(mx,my|
00000410  29 20 8c 0d 02 80 10 20  20 f2 6c 69 6e 6b 28 64  |) .....  .link(d|
00000420  6f 74 29 0d 02 8a 06 20  cc 0d 02 94 36 20 20 e7  |ot).... ....6  .|
00000430  20 66 78 28 64 6f 74 29  3d 6e 66 78 20 80 20 ac  | fx(dot)=nfx . .|
00000440  20 6e 65 77 20 f2 64 65  6c 64 6f 74 28 64 6f 74  | new .deldot(dot|
00000450  29 20 8b 20 66 78 28 64  6f 74 29 3d 6e 66 78 0d  |) . fx(dot)=nfx.|
00000460  02 9e 06 20 cd 0d 02 a8  05 cd 0d 02 b2 05 e1 0d  |... ............|
00000470  02 bc 05 3a 0d 02 c6 12  dd 20 a4 64 72 61 67 28  |...:..... .drag(|
00000480  6d 78 2c 6d 79 29 0d 02  d0 12 ea 20 64 6f 74 31  |mx,my)..... dot1|
00000490  2c 64 6f 74 32 2c 6d 62  0d 02 da 18 64 6f 74 31  |,dot2,mb....dot1|
000004a0  3d a4 66 69 6e 64 64 6f  74 28 6d 78 2c 6d 79 29  |=.finddot(mx,my)|
000004b0  0d 02 e4 05 f5 0d 02 ee  15 20 f2 6d 6f 75 73 65  |......... .mouse|
000004c0  28 6d 78 2c 6d 79 2c 6d  62 29 0d 02 f8 19 20 64  |(mx,my,mb).... d|
000004d0  6f 74 32 3d a4 66 69 6e  64 64 6f 74 28 6d 78 2c  |ot2=.finddot(mx,|
000004e0  6d 79 29 0d 03 02 17 fd  20 64 6f 74 31 3c 3e 64  |my)..... dot1<>d|
000004f0  6f 74 32 20 84 20 6d 62  3d 30 0d 03 0c 13 e7 20  |ot2 . mb=0..... |
00000500  64 6f 74 31 3c 3e 64 6f  74 32 20 3d b9 0d 03 16  |dot1<>dot2 =....|
00000510  06 3d a3 0d 03 20 05 3a  0d 03 2a 13 dd 20 f2 64  |.=... .:..*.. .d|
00000520  72 61 67 64 6f 74 28 64  6f 74 29 0d 03 34 12 ea  |ragdot(dot)..4..|
00000530  20 6d 78 2c 6d 79 2c 6d  62 2c 74 6f 70 0d 03 3e  | mx,my,mb,top..>|
00000540  18 c8 97 20 b8 20 64 78  28 64 6f 74 29 2c 64 79  |... . dx(dot),dy|
00000550  28 64 6f 74 29 0d 03 48  05 f5 0d 03 52 15 20 f2  |(dot)..H....R. .|
00000560  6d 6f 75 73 65 28 6d 78  2c 6d 79 2c 6d 62 29 0d  |mouse(mx,my,mb).|
00000570  03 5c 12 20 64 78 28 64  6f 74 29 3d 2d 73 69 7a  |.\. dx(dot)=-siz|
00000580  65 0d 03 66 18 20 74 6f  70 3d a4 66 69 6e 64 64  |e..f. top=.findd|
00000590  6f 74 28 6d 78 2c 6d 79  29 0d 03 70 2b 20 e7 20  |ot(mx,my)..p+ . |
000005a0  74 6f 70 3e 2d 31 20 e6  20 33 3a c8 8f 20 64 78  |top>-1 . 3:.. dx|
000005b0  28 74 6f 70 29 2c 64 79  28 74 6f 70 29 2c 73 69  |(top),dy(top),si|
000005c0  7a 65 2b 38 0d 03 7a 0f  20 64 78 28 64 6f 74 29  |ze+8..z. dx(dot)|
000005d0  3d 6d 78 0d 03 84 0f 20  64 79 28 64 6f 74 29 3d  |=mx.... dy(dot)=|
000005e0  6d 79 0d 03 8e 0f 20 f2  72 65 64 72 61 77 28 31  |my.... .redraw(1|
000005f0  29 0d 03 98 0a 20 f2 73  77 61 70 0d 03 a2 0a fd  |).... .swap.....|
00000600  20 6d 62 3d 30 0d 03 ac  0e e7 20 74 6f 70 3e 2d  | mb=0..... top>-|
00000610  31 20 8c 0d 03 b6 15 20  e3 20 6c 69 6e 6b 3d 30  |1 ..... . link=0|
00000620  20 b8 20 6c 69 6e 6b 73  0d 03 c0 15 20 20 6c 30  | . links....  l0|
00000630  3d 6c 69 6e 6b 28 30 2c  6c 69 6e 6b 29 0d 03 ca  |=link(0,link)...|
00000640  15 20 20 6c 31 3d 6c 69  6e 6b 28 31 2c 6c 69 6e  |.  l1=link(1,lin|
00000650  6b 29 0d 03 d4 26 20 20  e7 20 6c 30 3d 64 6f 74  |k)...&  . l0=dot|
00000660  20 6c 69 6e 6b 28 30 2c  6c 69 6e 6b 29 3d 74 6f  | link(0,link)=to|
00000670  70 3a 6c 30 3d 74 6f 70  0d 03 de 26 20 20 e7 20  |p:l0=top...&  . |
00000680  6c 31 3d 64 6f 74 20 6c  69 6e 6b 28 31 2c 6c 69  |l1=dot link(1,li|
00000690  6e 6b 29 3d 74 6f 70 3a  6c 31 3d 74 6f 70 0d 03  |nk)=top:l1=top..|
000006a0  e8 0f 20 20 e7 20 6c 30  3d 6c 31 20 8c 0d 03 f2  |..  . l0=l1 ....|
000006b0  1d 20 20 20 f2 64 65 6c  6c 69 6e 6b 28 6c 69 6e  |.   .dellink(lin|
000006c0  6b 29 3a 6c 69 6e 6b 2d  3d 31 0d 03 fc 07 20 20  |k):link-=1....  |
000006d0  cc 0d 04 06 36 20 20 20  6c 69 6e 6b 28 32 2c 6c  |....6   link(2,l|
000006e0  69 6e 6b 29 3d a4 64 69  73 74 28 64 78 28 6c 30  |ink)=.dist(dx(l0|
000006f0  29 2c 64 79 28 6c 30 29  2c 64 78 28 6c 31 29 2c  |),dy(l0),dx(l1),|
00000700  64 79 28 6c 31 29 29 0d  04 10 07 20 20 cd 0d 04  |dy(l1))....  ...|
00000710  1a 06 20 ed 0d 04 24 11  20 f2 64 65 6c 64 6f 74  |.. ...$. .deldot|
00000720  28 64 6f 74 29 0d 04 2e  05 cd 0d 04 38 14 e3 20  |(dot).......8.. |
00000730  6c 69 6e 6b 3d 30 20 b8  20 6c 69 6e 6b 73 0d 04  |link=0 . links..|
00000740  42 14 20 6c 30 3d 6c 69  6e 6b 28 30 2c 6c 69 6e  |B. l0=link(0,lin|
00000750  6b 29 0d 04 4c 14 20 6c  31 3d 6c 69 6e 6b 28 31  |k)..L. l1=link(1|
00000760  2c 6c 69 6e 6b 29 0d 04  56 18 20 e7 20 6c 30 3d  |,link)..V. . l0=|
00000770  64 6f 74 20 84 20 6c 31  3d 64 6f 74 20 8c 0d 04  |dot . l1=dot ...|
00000780  60 35 20 20 6c 69 6e 6b  28 32 2c 6c 69 6e 6b 29  |`5  link(2,link)|
00000790  3d a4 64 69 73 74 28 64  78 28 6c 30 29 2c 64 79  |=.dist(dx(l0),dy|
000007a0  28 6c 30 29 2c 64 78 28  6c 31 29 2c 64 79 28 6c  |(l0),dx(l1),dy(l|
000007b0  31 29 29 0d 04 6a 06 20  cd 0d 04 74 05 ed 0d 04  |1))..j. ...t....|
000007c0  7e 05 e1 0d 04 88 05 3a  0d 04 92 15 dd 20 a4 66  |~......:..... .f|
000007d0  69 6e 64 64 6f 74 28 6d  78 2c 6d 79 29 0d 04 9c  |inddot(mx,my)...|
000007e0  0e ea 20 66 64 6f 74 2c  64 6f 74 0d 04 a6 11 e7  |.. fdot,dot.....|
000007f0  20 64 6f 74 73 3d 2d 31  20 3d 2d 31 0d 04 b0 0b  | dots=-1 =-1....|
00000800  66 64 6f 74 3d 2d 31 0d  04 ba 12 e3 20 64 6f 74  |fdot=-1..... dot|
00000810  3d 30 20 b8 20 64 6f 74  73 0d 04 c4 33 20 e7 20  |=0 . dots...3 . |
00000820  a4 64 69 73 74 28 6d 78  2c 6d 79 2c 64 78 28 64  |.dist(mx,my,dx(d|
00000830  6f 74 29 2c 64 79 28 64  6f 74 29 29 3c 62 6c 6f  |ot),dy(dot))<blo|
00000840  62 2a 32 20 66 64 6f 74  3d 64 6f 74 0d 04 ce 05  |b*2 fdot=dot....|
00000850  ed 0d 04 d8 09 3d 66 64  6f 74 0d 04 e2 05 3a 0d  |.....=fdot....:.|
00000860  04 ec 17 dd 20 f2 6e 65  77 64 6f 74 28 64 78 2c  |.... .newdot(dx,|
00000870  64 79 2c 66 78 29 0d 04  f6 14 e7 20 64 6f 74 73  |dy,fx)..... dots|
00000880  3d 6d 61 78 64 6f 74 73  20 e1 0d 05 00 0b 64 6f  |=maxdots .....do|
00000890  74 73 2b 3d 31 0d 05 0a  0f 64 78 28 64 6f 74 73  |ts+=1....dx(dots|
000008a0  29 3d 64 78 0d 05 14 0f  64 79 28 64 6f 74 73 29  |)=dx....dy(dots)|
000008b0  3d 64 79 0d 05 1e 0f 66  78 28 64 6f 74 73 29 3d  |=dy....fx(dots)=|
000008c0  66 78 0d 05 28 05 e1 0d  05 32 05 3a 0d 05 3c 12  |fx..(....2.:..<.|
000008d0  dd 20 f2 64 65 6c 64 6f  74 28 64 6f 74 29 0d 05  |. .deldot(dot)..|
000008e0  46 0e ea 20 64 65 6c 2c  6c 69 6e 6b 0d 05 50 14  |F.. del,link..P.|
000008f0  64 78 28 64 6f 74 29 3d  64 78 28 64 6f 74 73 29  |dx(dot)=dx(dots)|
00000900  0d 05 5a 14 64 79 28 64  6f 74 29 3d 64 79 28 64  |..Z.dy(dot)=dy(d|
00000910  6f 74 73 29 0d 05 64 14  66 78 28 64 6f 74 29 3d  |ots)..d.fx(dot)=|
00000920  66 78 28 64 6f 74 73 29  0d 05 6e 09 64 65 6c 3d  |fx(dots)..n.del=|
00000930  30 0d 05 78 10 e7 20 6c  69 6e 6b 73 3e 2d 31 20  |0..x.. links>-1 |
00000940  8c 0d 05 82 0b 20 6c 69  6e 6b 3d 30 0d 05 8c 06  |..... link=0....|
00000950  20 f5 0d 05 96 2d 20 20  e7 20 6c 69 6e 6b 28 30  | ....-  . link(0|
00000960  2c 6c 69 6e 6b 29 3d 64  6f 74 20 84 20 6c 69 6e  |,link)=dot . lin|
00000970  6b 28 31 2c 6c 69 6e 6b  29 3d 64 6f 74 20 8c 0d  |k(1,link)=dot ..|
00000980  05 a0 15 20 20 20 f2 64  65 6c 6c 69 6e 6b 28 6c  |...   .dellink(l|
00000990  69 6e 6b 29 0d 05 aa 0e  20 20 20 6c 69 6e 6b 2d  |ink)....   link-|
000009a0  3d 31 0d 05 b4 0d 20 20  20 64 65 6c 2b 3d 31 0d  |=1....   del+=1.|
000009b0  05 be 07 20 20 cd 0d 05  c8 0d 20 20 6c 69 6e 6b  |...  .....  link|
000009c0  2b 3d 31 0d 05 d2 11 20  fd 20 6c 69 6e 6b 3e 6c  |+=1.... . link>l|
000009d0  69 6e 6b 73 0d 05 dc 15  20 e3 20 6c 69 6e 6b 3d  |inks.... . link=|
000009e0  30 20 b8 20 6c 69 6e 6b  73 0d 05 e6 2a 20 20 e7  |0 . links...*  .|
000009f0  20 6c 69 6e 6b 28 30 2c  6c 69 6e 6b 29 3d 64 6f  | link(0,link)=do|
00000a00  74 73 20 6c 69 6e 6b 28  30 2c 6c 69 6e 6b 29 3d  |ts link(0,link)=|
00000a10  64 6f 74 0d 05 f0 2a 20  20 e7 20 6c 69 6e 6b 28  |dot...*  . link(|
00000a20  31 2c 6c 69 6e 6b 29 3d  64 6f 74 73 20 6c 69 6e  |1,link)=dots lin|
00000a30  6b 28 31 2c 6c 69 6e 6b  29 3d 64 6f 74 0d 05 fa  |k(1,link)=dot...|
00000a40  06 20 ed 0d 06 04 05 cd  0d 06 0e 0b 64 6f 74 73  |. ..........dots|
00000a50  2d 3d 31 0d 06 18 05 e1  0d 06 22 05 3a 0d 06 2c  |-=1.......".:..,|
00000a60  11 dd 20 f2 6c 69 6e 6b  28 64 6f 74 31 29 0d 06  |.. .link(dot1)..|
00000a70  36 0e ea 20 6d 78 2c 6d  79 2c 6d 62 0d 06 40 05  |6.. mx,my,mb..@.|
00000a80  f5 0d 06 4a 15 20 f2 6d  6f 75 73 65 28 6d 78 2c  |...J. .mouse(mx,|
00000a90  6d 79 2c 6d 62 29 0d 06  54 19 20 64 6f 74 32 3d  |my,mb)..T. dot2=|
00000aa0  a4 66 69 6e 64 64 6f 74  28 6d 78 2c 6d 79 29 0d  |.finddot(mx,my).|
00000ab0  06 5e 08 20 e6 20 32 0d  06 68 10 20 e7 20 64 6f  |.^. . 2..h. . do|
00000ac0  74 32 3d 2d 31 20 8c 0d  06 72 1f 20 20 86 20 64  |t2=-1 ...r.  . d|
00000ad0  78 28 64 6f 74 31 29 2c  64 79 28 64 6f 74 31 29  |x(dot1),dy(dot1)|
00000ae0  2c 6d 78 2c 6d 79 0d 06  7c 06 20 cc 0d 06 86 2b  |,mx,my..|. ....+|
00000af0  20 20 86 20 64 78 28 64  6f 74 31 29 2c 64 79 28  |  . dx(dot1),dy(|
00000b00  64 6f 74 31 29 2c 64 78  28 64 6f 74 32 29 2c 64  |dot1),dx(dot2),d|
00000b10  79 28 64 6f 74 32 29 0d  06 90 06 20 cd 0d 06 9a  |y(dot2).... ....|
00000b20  0f 20 f2 72 65 64 72 61  77 28 31 29 0d 06 a4 2e  |. .redraw(1)....|
00000b30  20 e7 20 64 6f 74 32 3e  2d 31 20 e6 20 33 3a c8  | . dot2>-1 . 3:.|
00000b40  8f 20 64 78 28 64 6f 74  32 29 2c 64 79 28 64 6f  |. dx(dot2),dy(do|
00000b50  74 32 29 2c 73 69 7a 65  2b 38 0d 06 ae 0a 20 f2  |t2),size+8.... .|
00000b60  73 77 61 70 0d 06 b8 0a  fd 20 6d 62 3d 30 0d 06  |swap..... mb=0..|
00000b70  c2 11 e7 20 64 6f 74 31  3d 64 6f 74 32 20 e1 0d  |... dot1=dot2 ..|
00000b80  06 cc 2a e7 20 64 6f 74  32 3d 2d 31 20 f2 6e 65  |..*. dot2=-1 .ne|
00000b90  77 64 6f 74 28 6d 78 2c  6d 79 2c 6e 66 78 29 3a  |wdot(mx,my,nfx):|
00000ba0  64 6f 74 32 3d 64 6f 74  73 0d 06 d6 36 e7 20 a4  |dot2=dots...6. .|
00000bb0  6c 69 6e 6b 28 64 6f 74  31 2c 64 6f 74 32 29 3e  |link(dot1,dot2)>|
00000bc0  2d 31 20 f2 64 65 6c 6c  69 6e 6b 28 a4 6c 69 6e  |-1 .dellink(.lin|
00000bd0  6b 28 64 6f 74 31 2c 64  6f 74 32 29 29 3a e1 0d  |k(dot1,dot2)):..|
00000be0  06 e0 16 e7 20 6c 69 6e  6b 73 3d 6d 61 78 6c 69  |.... links=maxli|
00000bf0  6e 6b 73 20 e1 0d 06 ea  1c e7 20 64 6f 74 31 3e  |nks ...... dot1>|
00000c00  64 6f 74 32 20 c8 94 20  64 6f 74 31 2c 64 6f 74  |dot2 .. dot1,dot|
00000c10  32 0d 06 f4 0c 6c 69 6e  6b 73 2b 3d 31 0d 06 fe  |2....links+=1...|
00000c20  16 6c 69 6e 6b 28 30 2c  6c 69 6e 6b 73 29 3d 64  |.link(0,links)=d|
00000c30  6f 74 31 0d 07 08 16 6c  69 6e 6b 28 31 2c 6c 69  |ot1....link(1,li|
00000c40  6e 6b 73 29 3d 64 6f 74  32 0d 07 12 3c 6c 69 6e  |nks)=dot2...<lin|
00000c50  6b 28 32 2c 6c 69 6e 6b  73 29 3d a4 64 69 73 74  |k(2,links)=.dist|
00000c60  28 64 78 28 64 6f 74 31  29 2c 64 79 28 64 6f 74  |(dx(dot1),dy(dot|
00000c70  31 29 2c 64 78 28 64 6f  74 32 29 2c 64 79 28 64  |1),dx(dot2),dy(d|
00000c80  6f 74 32 29 29 0d 07 1c  05 e1 0d 07 26 05 3a 0d  |ot2)).......&.:.|
00000c90  07 30 14 dd 20 f2 64 65  6c 6c 69 6e 6b 28 6c 69  |.0.. .dellink(li|
00000ca0  6e 6b 29 0d 07 3a 1e 6c  69 6e 6b 28 30 2c 6c 69  |nk)..:.link(0,li|
00000cb0  6e 6b 29 3d 6c 69 6e 6b  28 30 2c 6c 69 6e 6b 73  |nk)=link(0,links|
00000cc0  29 0d 07 44 1e 6c 69 6e  6b 28 31 2c 6c 69 6e 6b  |)..D.link(1,link|
00000cd0  29 3d 6c 69 6e 6b 28 31  2c 6c 69 6e 6b 73 29 0d  |)=link(1,links).|
00000ce0  07 4e 1e 6c 69 6e 6b 28  32 2c 6c 69 6e 6b 29 3d  |.N.link(2,link)=|
00000cf0  6c 69 6e 6b 28 32 2c 6c  69 6e 6b 73 29 0d 07 58  |link(2,links)..X|
00000d00  0c 6c 69 6e 6b 73 2d 3d  31 0d 07 62 05 e1 0d 07  |.links-=1..b....|
00000d10  6c 05 3a 0d 07 76 18 dd  20 a4 64 69 73 74 28 78  |l.:..v.. .dist(x|
00000d20  31 2c 79 31 2c 78 32 2c  79 32 29 0d 07 80 1b 3d  |1,y1,x2,y2)....=|
00000d30  b6 28 28 78 32 2d 78 31  29 5e 32 2b 28 79 32 2d  |.((x2-x1)^2+(y2-|
00000d40  79 31 29 5e 32 29 0d 07  8a 05 3a 0d 07 94 16 dd  |y1)^2)....:.....|
00000d50  20 a4 6c 69 6e 6b 28 64  6f 74 31 2c 64 6f 74 32  | .link(dot1,dot2|
00000d60  29 0d 07 9e 0e ea 20 6e  75 6d 2c 6c 69 6e 6b 0d  |)..... num,link.|
00000d70  07 a8 12 e7 20 6c 69 6e  6b 73 3d 2d 31 20 3d 2d  |.... links=-1 =-|
00000d80  31 0d 07 b2 0a 6e 75 6d  3d 2d 31 0d 07 bc 0b 6c  |1....num=-1....l|
00000d90  69 6e 6b 3d 2d 31 0d 07  c6 05 f5 0d 07 d0 0c 20  |ink=-1......... |
00000da0  6c 69 6e 6b 2b 3d 31 0d  07 da 35 20 e7 20 6c 69  |link+=1...5 . li|
00000db0  6e 6b 28 30 2c 6c 69 6e  6b 29 3d 64 6f 74 31 20  |nk(0,link)=dot1 |
00000dc0  80 20 6c 69 6e 6b 28 31  2c 6c 69 6e 6b 29 3d 64  |. link(1,link)=d|
00000dd0  6f 74 32 20 6e 75 6d 3d  6c 69 6e 6b 0d 07 e4 35  |ot2 num=link...5|
00000de0  20 e7 20 6c 69 6e 6b 28  30 2c 6c 69 6e 6b 29 3d  | . link(0,link)=|
00000df0  64 6f 74 32 20 80 20 6c  69 6e 6b 28 31 2c 6c 69  |dot2 . link(1,li|
00000e00  6e 6b 29 3d 64 6f 74 31  20 6e 75 6d 3d 6c 69 6e  |nk)=dot1 num=lin|
00000e10  6b 0d 07 ee 19 fd 20 6c  69 6e 6b 3d 6c 69 6e 6b  |k..... link=link|
00000e20  73 20 84 20 6e 75 6d 3e  2d 31 0d 07 f8 08 3d 6e  |s . num>-1....=n|
00000e30  75 6d 0d 08 02 05 3a 0d  08 0c 0c dd 20 f2 65 72  |um....:..... .er|
00000e40  72 6f 72 0d 08 16 12 c8  99 20 36 2c 31 31 33 2c  |ror...... 6,113,|
00000e50  33 2d 73 63 72 0d 08 20  05 f6 0d 08 2a 13 f1 3b  |3-scr.. ....*..;|
00000e60  22 20 61 74 20 6c 69 6e  65 20 22 3b 9e 0d 08 34  |" at line ";...4|
00000e70  08 c8 97 20 87 0d 08 3e  05 e0 0d 08 48 05 e1 0d  |... ...>....H...|
00000e80  08 52 05 3a 0d 08 5c 0b  dd 20 f2 73 77 61 70 0d  |.R.:..\.. .swap.|
00000e90  08 66 10 c8 99 20 36 2c  31 31 32 2c 73 63 72 0d  |.f... 6,112,scr.|
00000ea0  08 70 0d 73 63 72 3d 33  2d 73 63 72 0d 08 7a 10  |.p.scr=3-scr..z.|
00000eb0  c8 99 20 36 2c 31 31 33  2c 73 63 72 0d 08 84 06  |.. 6,113,scr....|
00000ec0  c8 96 0d 08 8e 05 db 0d  08 98 05 e1 0d 08 a2 05  |................|
00000ed0  3a 0d 08 ac 14 dd 20 f2  72 65 64 72 61 77 28 62  |:..... .redraw(b|
00000ee0  6c 6f 62 73 29 0d 08 b6  0e ea 20 6c 69 6e 6b 2c  |lobs)..... link,|
00000ef0  64 6f 74 0d 08 c0 10 e7  20 6c 69 6e 6b 73 3e 2d  |dot..... links>-|
00000f00  31 20 8c 0d 08 ca 08 20  e6 20 32 0d 08 d4 15 20  |1 ..... . 2.... |
00000f10  e3 20 6c 69 6e 6b 3d 30  20 b8 20 6c 69 6e 6b 73  |. link=0 . links|
00000f20  0d 08 de 4b 20 20 86 20  64 78 28 6c 69 6e 6b 28  |...K  . dx(link(|
00000f30  30 2c 6c 69 6e 6b 29 29  2c 64 79 28 6c 69 6e 6b  |0,link)),dy(link|
00000f40  28 30 2c 6c 69 6e 6b 29  29 2c 64 78 28 6c 69 6e  |(0,link)),dx(lin|
00000f50  6b 28 31 2c 6c 69 6e 6b  29 29 2c 64 79 28 6c 69  |k(1,link)),dy(li|
00000f60  6e 6b 28 31 2c 6c 69 6e  6b 29 29 0d 08 e8 06 20  |nk(1,link)).... |
00000f70  ed 0d 08 f2 05 cd 0d 08  fc 17 e7 20 64 6f 74 73  |........... dots|
00000f80  3e 2d 31 20 80 20 62 6c  6f 62 73 20 8c 0d 09 06  |>-1 . blobs ....|
00000f90  13 20 e3 20 64 6f 74 3d  30 20 b8 20 64 6f 74 73  |. . dot=0 . dots|
00000fa0  0d 09 10 0f 20 20 e6 20  66 78 28 64 6f 74 29 0d  |....  . fx(dot).|
00000fb0  09 1a 20 20 20 c8 8f 20  c8 90 20 64 78 28 64 6f  |..   .. .. dx(do|
00000fc0  74 29 2c 64 79 28 64 6f  74 29 2c 73 69 7a 65 0d  |t),dy(dot),size.|
00000fd0  09 24 06 20 ed 0d 09 2e  05 cd 0d 09 38 05 e1 0d  |.$. ........8...|
00000fe0  09 42 05 3a 0d 09 4c 0e  dd 20 f2 6e 6f 6d 6f 75  |.B.:..L.. .nomou|
00000ff0  73 65 0d 09 56 0e ea 20  6d 78 2c 6d 79 2c 6d 62  |se..V.. mx,my,mb|
00001000  0d 09 60 05 f5 0d 09 6a  15 20 f2 6d 6f 75 73 65  |..`....j. .mouse|
00001010  28 6d 78 2c 6d 79 2c 6d  62 29 0d 09 74 0a fd 20  |(mx,my,mb)..t.. |
00001020  6d 62 3d 30 0d 09 7e 05  e1 0d 09 88 05 3a 0d 09  |mb=0..~......:..|
00001030  92 0e dd 20 f2 61 6e 69  6d 61 74 65 0d 09 9c 1f  |... .animate....|
00001040  ea 20 6f 64 78 28 29 2c  6f 64 79 28 29 2c 6f 66  |. odx(),ody(),of|
00001050  78 28 29 2c 64 6f 74 2c  65 6e 64 0d 09 a6 32 de  |x(),dot,end...2.|
00001060  20 6f 64 78 28 de 28 64  78 28 29 2c 31 29 29 2c  | odx(.(dx(),1)),|
00001070  6f 64 79 28 de 28 64 79  28 29 2c 31 29 29 2c 6f  |ody(.(dy(),1)),o|
00001080  66 78 28 de 28 66 78 28  29 2c 31 29 29 0d 09 b0  |fx(.(fx(),1))...|
00001090  0e 6f 64 78 28 29 3d 64  78 28 29 0d 09 ba 0e 6f  |.odx()=dx()....o|
000010a0  64 79 28 29 3d 64 79 28  29 0d 09 c4 0e 6f 66 78  |dy()=dy()....ofx|
000010b0  28 29 3d 66 78 28 29 0d  09 ce 0a 78 73 28 29 3d  |()=fx()....xs()=|
000010c0  30 0d 09 d8 0a 79 73 28  29 3d 30 0d 09 e2 09 70  |0....ys()=0....p|
000010d0  6f 73 3d 30 0d 09 ec 08  6f 6e 3d a3 0d 09 f6 0b  |os=0....on=.....|
000010e0  64 72 61 67 3d 2d 31 0d  0a 00 0d 40 25 3d 26 32  |drag=-1....@%=&2|
000010f0  30 32 30 41 0d 0a 0a 12  e3 20 64 6f 74 3d 30 20  |020A..... dot=0 |
00001100  b8 20 64 6f 74 73 0d 0a  14 13 20 67 72 61 76 69  |. dots.... gravi|
00001110  74 79 28 64 6f 74 29 3d  31 0d 0a 1e 05 ed 0d 0a  |ty(dot)=1.......|
00001120  28 17 64 78 28 29 3d 64  78 28 29 2a 67 72 61 76  |(.dx()=dx()*grav|
00001130  69 74 79 28 29 0d 0a 32  17 64 79 28 29 3d 64 79  |ity()..2.dy()=dy|
00001140  28 29 2a 67 72 61 76 69  74 79 28 29 0d 0a 3c 1f  |()*gravity()..<.|
00001150  67 72 61 76 69 74 79 28  29 3d 67 72 61 76 69 74  |gravity()=gravit|
00001160  79 28 29 2a 67 72 61 76  69 74 79 0d 0a 46 0c f2  |y()*gravity..F..|
00001170  6e 6f 6d 6f 75 73 65 0d  0a 50 05 f5 0d 0a 5a 0e  |nomouse..P....Z.|
00001180  20 6b 65 79 24 3d bf 28  30 29 0d 0a 64 10 20 e7  | key$=.(0)..d. .|
00001190  20 6b 65 79 24 3e 22 22  20 8c 0d 0a 6e 0f 20 20  | key$>"" ...n.  |
000011a0  c8 8e 20 6b 65 79 24 20  ca 0d 0a 78 0d 20 20 20  |.. key$ ...x.   |
000011b0  c9 20 22 8b 22 3a 0d 0a  82 0e 20 20 20 20 e7 20  |. ".":....    . |
000011c0  6f 6e 20 8c 0d 0a 8c 11  20 20 20 20 20 c8 8e 20  |on .....     .. |
000011d0  70 6f 73 20 ca 0d 0a 96  0e 20 20 20 20 20 20 c9  |pos .....      .|
000011e0  20 30 3a 0d 0a a0 30 20  20 20 20 20 20 20 e7 20  | 0:...0       . |
000011f0  67 72 61 76 69 74 79 3c  38 20 67 72 61 76 69 74  |gravity<8 gravit|
00001200  79 2b 3d 30 2e 30 35 20  8b 20 67 72 61 76 69 74  |y+=0.05 . gravit|
00001210  79 3d 38 0d 0a aa 19 20  20 20 20 20 20 20 e3 20  |y=8....       . |
00001220  64 6f 74 3d 30 20 b8 20  64 6f 74 73 0d 0a b4 20  |dot=0 . dots... |
00001230  20 20 20 20 20 20 20 20  67 72 61 76 69 74 79 28  |        gravity(|
00001240  64 6f 74 29 3d 67 72 61  76 69 74 79 0d 0a be 0c  |dot)=gravity....|
00001250  20 20 20 20 20 20 20 ed  0d 0a c8 0e 20 20 20 20  |       .....    |
00001260  20 20 c9 20 31 3a 0d 0a  d2 29 20 20 20 20 20 20  |  . 1:...)      |
00001270  20 e7 20 74 61 75 74 3c  31 30 20 74 61 75 74 2b  | . taut<10 taut+|
00001280  3d 30 2e 30 35 20 8b 20  74 61 75 74 3d 31 30 0d  |=0.05 . taut=10.|
00001290  0a dc 0e 20 20 20 20 20  20 c9 20 32 3a 0d 0a e6  |...      . 2:...|
000012a0  31 20 20 20 20 20 20 20  e7 20 62 6f 75 6e 63 65  |1       . bounce|
000012b0  3c 31 2e 35 20 62 6f 75  6e 63 65 2b 3d 30 2e 30  |<1.5 bounce+=0.0|
000012c0  32 20 8b 20 62 6f 75 6e  63 65 3d 31 2e 35 0d 0a  |2 . bounce=1.5..|
000012d0  f0 0e 20 20 20 20 20 20  c9 20 33 3a 0d 0a fa 27  |..      . 3:...'|
000012e0  20 20 20 20 20 20 20 e7  20 73 6c 6f 77 3c 35 20  |       . slow<5 |
000012f0  73 6c 6f 77 2b 3d 30 2e  30 31 20 8b 20 73 6c 6f  |slow+=0.01 . slo|
00001300  77 3d 35 0d 0b 04 0a 20  20 20 20 20 cb 0d 0b 0e  |w=5....     ....|
00001310  09 20 20 20 20 cd 0d 0b  18 0d 20 20 20 c9 20 22  |.    .....   . "|
00001320  8a 22 3a 0d 0b 22 0e 20  20 20 20 e7 20 6f 6e 20  |.":..".    . on |
00001330  8c 0d 0b 2c 11 20 20 20  20 20 c8 8e 20 70 6f 73  |...,.     .. pos|
00001340  20 ca 0d 0b 36 0e 20 20  20 20 20 20 c9 20 30 3a  | ...6.      . 0:|
00001350  0d 0b 40 30 20 20 20 20  20 20 20 e7 20 67 72 61  |..@0       . gra|
00001360  76 69 74 79 3e 30 20 67  72 61 76 69 74 79 2d 3d  |vity>0 gravity-=|
00001370  30 2e 30 35 20 8b 20 67  72 61 76 69 74 79 3d 30  |0.05 . gravity=0|
00001380  0d 0b 4a 19 20 20 20 20  20 20 20 e3 20 64 6f 74  |..J.       . dot|
00001390  3d 30 20 b8 20 64 6f 74  73 0d 0b 54 20 20 20 20  |=0 . dots..T    |
000013a0  20 20 20 20 20 67 72 61  76 69 74 79 28 64 6f 74  |     gravity(dot|
000013b0  29 3d 67 72 61 76 69 74  79 0d 0b 5e 0c 20 20 20  |)=gravity..^.   |
000013c0  20 20 20 20 ed 0d 0b 68  0e 20 20 20 20 20 20 c9  |    ...h.      .|
000013d0  20 31 3a 0d 0b 72 2d 20  20 20 20 20 20 20 e7 20  | 1:..r-       . |
000013e0  74 61 75 74 3e 30 2e 30  35 20 74 61 75 74 2d 3d  |taut>0.05 taut-=|
000013f0  30 2e 30 35 20 8b 20 74  61 75 74 3d 30 2e 30 35  |0.05 . taut=0.05|
00001400  0d 0b 7c 0e 20 20 20 20  20 20 c9 20 32 3a 0d 0b  |..|.      . 2:..|
00001410  86 2d 20 20 20 20 20 20  20 e7 20 62 6f 75 6e 63  |.-       . bounc|
00001420  65 3e 30 20 62 6f 75 6e  63 65 2d 3d 30 2e 30 32  |e>0 bounce-=0.02|
00001430  20 8b 20 62 6f 75 6e 63  65 3d 30 0d 0b 90 0e 20  | . bounce=0.... |
00001440  20 20 20 20 20 c9 20 33  3a 0d 0b 9a 27 20 20 20  |     . 3:...'   |
00001450  20 20 20 20 e7 20 73 6c  6f 77 3e 30 20 73 6c 6f  |    . slow>0 slo|
00001460  77 2d 3d 30 2e 30 31 20  8b 20 73 6c 6f 77 3d 30  |w-=0.01 . slow=0|
00001470  0d 0b a4 0a 20 20 20 20  20 cb 0d 0b ae 09 20 20  |....     .....  |
00001480  20 20 cd 0d 0b b8 0d 20  20 20 c9 20 22 88 22 3a  |  .....   . ".":|
00001490  0d 0b c2 16 20 20 20 20  e7 20 70 6f 73 3e 30 20  |....    . pos>0 |
000014a0  70 6f 73 2d 3d 31 0d 0b  cc 0d 20 20 20 c9 20 22  |pos-=1....   . "|
000014b0  89 22 3a 0d 0b d6 16 20  20 20 20 e7 20 70 6f 73  |.":....    . pos|
000014c0  3c 33 20 70 6f 73 2b 3d  31 0d 0b e0 0d 20 20 20  |<3 pos+=1....   |
000014d0  c9 20 22 53 22 3a 0d 0b  ea 12 20 20 20 20 64 78  |. "S":....    dx|
000014e0  28 29 3d 6f 64 78 28 29  0d 0b f4 12 20 20 20 20  |()=odx()....    |
000014f0  64 79 28 29 3d 6f 64 79  28 29 0d 0b fe 12 20 20  |dy()=ody()....  |
00001500  20 20 66 78 28 29 3d 6f  66 78 28 29 0d 0c 08 0e  |  fx()=ofx()....|
00001510  20 20 20 20 78 73 28 29  3d 30 0d 0c 12 0e 20 20  |    xs()=0....  |
00001520  20 20 79 73 28 29 3d 30  0d 0c 1c 0f 20 20 20 20  |  ys()=0....    |
00001530  64 72 61 67 3d 2d 31 0d  0c 26 0d 20 20 20 c9 20  |drag=-1..&.   . |
00001540  22 44 22 3a 0d 0c 30 33  20 20 20 20 e7 20 73 69  |"D":..03    . si|
00001550  7a 65 3d 30 20 73 69 7a  65 3d 62 6c 6f 62 3a f2  |ze=0 size=blob:.|
00001560  72 65 63 28 31 29 20 8b  20 73 69 7a 65 3d 30 3a  |rec(1) . size=0:|
00001570  f2 72 65 63 28 32 29 0d  0c 3a 0c 20 20 20 c9 20  |.rec(2)..:.   . |
00001580  22 50 22 0d 0c 44 11 20  20 20 20 f5 fd bf 28 30  |"P"..D.    ...(0|
00001590  29 3e 22 22 0d 0c 4e 0d  20 20 20 c9 20 22 54 22  |)>""..N.   . "T"|
000015a0  3a 0d 0c 58 0f 20 20 20  20 6f 6e 3d ac 20 6f 6e  |:..X.    on=. on|
000015b0  0d 0c 62 07 20 20 cb 0d  0c 6c 06 20 cd 0d 0c 76  |..b.  ...l. ...v|
000015c0  15 20 f2 6d 6f 75 73 65  28 6d 78 2c 6d 79 2c 6d  |. .mouse(mx,my,m|
000015d0  62 29 0d 0c 80 18 20 79  73 28 29 3d 79 73 28 29  |b).... ys()=ys()|
000015e0  2d 67 72 61 76 69 74 79  28 29 0d 0c 8a 13 20 78  |-gravity().... x|
000015f0  73 28 29 3d 78 73 28 29  2a 73 6c 6f 77 0d 0c 94  |s()=xs()*slow...|
00001600  13 20 79 73 28 29 3d 79  73 28 29 2a 73 6c 6f 77  |. ys()=ys()*slow|
00001610  0d 0c 9e 13 20 64 78 28  29 3d 64 78 28 29 2b 78  |.... dx()=dx()+x|
00001620  73 28 29 0d 0c a8 13 20  64 79 28 29 3d 64 79 28  |s().... dy()=dy(|
00001630  29 2b 79 73 28 29 0d 0c  b2 10 20 e7 20 64 72 61  |)+ys().... . dra|
00001640  67 3e 2d 31 20 8c 0d 0c  bc 0e 20 20 e7 20 6d 62  |g>-1 .....  . mb|
00001650  3e 30 20 8c 0d 0c c6 1b  20 20 20 78 73 28 64 72  |>0 .....   xs(dr|
00001660  61 67 29 3d 6d 78 2d 64  78 28 64 72 61 67 29 0d  |ag)=mx-dx(drag).|
00001670  0c d0 1b 20 20 20 79 73  28 64 72 61 67 29 3d 6d  |...   ys(drag)=m|
00001680  79 2d 64 79 28 64 72 61  67 29 0d 0c da 12 20 20  |y-dy(drag)....  |
00001690  20 64 78 28 64 72 61 67  29 3d 6d 78 0d 0c e4 12  | dx(drag)=mx....|
000016a0  20 20 20 64 79 28 64 72  61 67 29 3d 6d 79 0d 0c  |   dy(drag)=my..|
000016b0  ee 07 20 20 cc 0d 0c f8  1d 20 20 20 c8 97 20 b8  |..  .....   .. .|
000016c0  20 64 78 28 64 72 61 67  29 2c 64 79 28 64 72 61  | dx(drag),dy(dra|
000016d0  67 29 0d 0d 02 17 20 20  20 f2 6d 6f 75 73 65 28  |g)....   .mouse(|
000016e0  6d 78 2c 6d 79 2c 6d 62  29 0d 0d 0c 0e 20 20 20  |mx,my,mb)....   |
000016f0  64 72 61 67 3d 2d 31 0d  0d 16 07 20 20 cd 0d 0d  |drag=-1....  ...|
00001700  20 06 20 cc 0d 0d 2a 0e  20 20 e7 20 6d 62 3e 30  | . ...*.  . mb>0|
00001710  20 8c 0d 0d 34 1b 20 20  20 64 72 61 67 3d a4 66  | ...4.   drag=.f|
00001720  69 6e 64 64 6f 74 28 6d  78 2c 6d 79 29 0d 0d 3e  |inddot(mx,my)..>|
00001730  12 20 20 20 e7 20 64 72  61 67 3e 2d 31 20 8c 0d  |.   . drag>-1 ..|
00001740  0d 48 1e 20 20 20 20 c8  97 20 b8 20 64 78 28 64  |.H.    .. . dx(d|
00001750  72 61 67 29 2c 64 79 28  64 72 61 67 29 0d 0d 52  |rag),dy(drag)..R|
00001760  0f 20 20 20 20 c8 8e 20  6d 62 20 ca 0d 0d 5c 17  |.    .. mb ...\.|
00001770  20 20 20 20 20 c9 20 34  3a 66 78 28 64 72 61 67  |     . 4:fx(drag|
00001780  29 3d 31 0d 0d 66 17 20  20 20 20 20 c9 20 32 3a  |)=1..f.     . 2:|
00001790  66 78 28 64 72 61 67 29  3d 32 0d 0d 70 09 20 20  |fx(drag)=2..p.  |
000017a0  20 20 cb 0d 0d 7a 08 20  20 20 cd 0d 0d 84 07 20  |  ...z.   ..... |
000017b0  20 cd 0d 0d 8e 06 20 cd  0d 0d 98 13 20 e3 20 64  | ..... ..... . d|
000017c0  6f 74 3d 30 20 b8 20 64  6f 74 73 0d 0d a2 39 20  |ot=0 . dots...9 |
000017d0  20 e7 20 64 78 28 64 6f  74 29 3c 73 69 7a 65 20  | . dx(dot)<size |
000017e0  78 73 28 64 6f 74 29 3d  94 78 73 28 64 6f 74 29  |xs(dot)=.xs(dot)|
000017f0  2a 62 6f 75 6e 63 65 3a  64 78 28 64 6f 74 29 3d  |*bounce:dx(dot)=|
00001800  73 69 7a 65 0d 0d ac 44  20 20 e7 20 64 78 28 64  |size...D  . dx(d|
00001810  6f 74 29 3e 31 32 37 36  2d 73 69 7a 65 20 78 73  |ot)>1276-size xs|
00001820  28 64 6f 74 29 3d 2d 94  78 73 28 64 6f 74 29 2a  |(dot)=-.xs(dot)*|
00001830  62 6f 75 6e 63 65 3a 64  78 28 64 6f 74 29 3d 31  |bounce:dx(dot)=1|
00001840  32 37 36 2d 73 69 7a 65  0d 0d b6 41 20 20 e7 20  |276-size...A  . |
00001850  64 79 28 64 6f 74 29 3c  73 69 7a 65 20 79 73 28  |dy(dot)<size ys(|
00001860  64 6f 74 29 3d 94 79 73  28 64 6f 74 29 2a 62 6f  |dot)=.ys(dot)*bo|
00001870  75 6e 63 65 2d 67 72 61  76 69 74 79 3a 64 79 28  |unce-gravity:dy(|
00001880  64 6f 74 29 3d 73 69 7a  65 0d 0d c0 06 20 ed 0d  |dot)=size.... ..|
00001890  0d ca 11 20 e7 20 6c 69  6e 6b 73 3e 2d 31 20 8c  |... . links>-1 .|
000018a0  0d 0d d4 16 20 20 e3 20  6c 69 6e 6b 3d 30 20 b8  |....  . link=0 .|
000018b0  20 6c 69 6e 6b 73 0d 0d  de 16 20 20 20 6c 30 3d  | links....   l0=|
000018c0  6c 69 6e 6b 28 30 2c 6c  69 6e 6b 29 0d 0d e8 16  |link(0,link)....|
000018d0  20 20 20 6c 31 3d 6c 69  6e 6b 28 31 2c 6c 69 6e  |   l1=link(1,lin|
000018e0  6b 29 0d 0d f2 16 20 20  20 6c 32 3d 6c 69 6e 6b  |k)....   l2=link|
000018f0  28 32 2c 6c 69 6e 6b 29  0d 0d fc 22 20 20 20 73  |(2,link)..."   s|
00001900  78 3d 64 78 28 6c 30 29  2b 28 64 78 28 6c 31 29  |x=dx(l0)+(dx(l1)|
00001910  2d 64 78 28 6c 30 29 29  2f 32 0d 0e 06 22 20 20  |-dx(l0))/2..."  |
00001920  20 73 79 3d 64 79 28 6c  30 29 2b 28 64 79 28 6c  | sy=dy(l0)+(dy(l|
00001930  31 29 2d 64 79 28 6c 30  29 29 2f 32 0d 0e 10 26  |1)-dy(l0))/2...&|
00001940  20 20 20 73 64 3d a4 64  69 73 74 28 64 78 28 6c  |   sd=.dist(dx(l|
00001950  30 29 2c 64 79 28 6c 30  29 2c 73 78 2c 73 79 29  |0),dy(l0),sx,sy)|
00001960  2a 32 0d 0e 1a 13 20 20  20 f2 6d 6f 76 65 64 6f  |*2....   .movedo|
00001970  74 28 6c 30 29 0d 0e 24  13 20 20 20 f2 6d 6f 76  |t(l0)..$.   .mov|
00001980  65 64 6f 74 28 6c 31 29  0d 0e 2e 07 20 20 ed 0d  |edot(l1)....  ..|
00001990  0e 38 06 20 cd 0d 0e 42  0b 20 e7 20 6f 6e 20 8c  |.8. ...B. . on .|
000019a0  0d 0e 4c 3d 20 20 f1 3b  22 20 47 72 61 76 69 74  |..L=  .;" Gravit|
000019b0  79 20 20 20 54 61 75 74  6e 65 73 73 20 20 42 6f  |y   Tautness  Bo|
000019c0  75 6e 63 65 20 20 20 20  44 72 61 67 22 3b 8a 70  |unce    Drag";.p|
000019d0  6f 73 2a 31 30 2c 30 29  3b 22 89 22 3b 0d 0e 56  |os*10,0);".";..V|
000019e0  1f 20 20 f1 8a 31 29 3b  94 67 72 61 76 69 74 79  |.  ..1);.gravity|
000019f0  3b 8a 31 31 29 3b 94 74  61 75 74 3b 0d 0e 60 1f  |;.11);.taut;..`.|
00001a00  20 20 f1 8a 32 31 29 3b  94 62 6f 75 6e 63 65 3b  |  ..21);.bounce;|
00001a10  8a 33 31 29 3b 94 73 6c  6f 77 3b 0d 0e 6a 06 20  |.31);.slow;..j. |
00001a20  cd 0d 0e 74 13 20 f2 72  65 64 72 61 77 28 b4 73  |...t. .redraw(.s|
00001a30  69 7a 65 29 0d 0e 7e 0a  20 f2 73 77 61 70 0d 0e  |ize)..~. .swap..|
00001a40  88 0e fd 20 6b 65 79 24  3d 22 20 22 0d 0e 92 0e  |... key$=" "....|
00001a50  64 78 28 29 3d 6f 64 78  28 29 0d 0e 9c 0e 64 79  |dx()=odx()....dy|
00001a60  28 29 3d 6f 64 79 28 29  0d 0e a6 0e 66 78 28 29  |()=ody()....fx()|
00001a70  3d 6f 66 78 28 29 0d 0e  b0 0d 73 69 7a 65 3d 62  |=ofx()....size=b|
00001a80  6c 6f 62 0d 0e ba 09 40  25 3d 26 41 0d 0e c4 0c  |lob....@%=&A....|
00001a90  f2 6e 6f 6d 6f 75 73 65  0d 0e ce 05 e1 0d 0e d8  |.nomouse........|
00001aa0  05 3a 0d 0e e2 13 dd 20  f2 6d 6f 76 65 64 6f 74  |.:..... .movedot|
00001ab0  28 64 6f 74 29 0d 0e ec  10 c8 8e 20 66 78 28 64  |(dot)...... fx(d|
00001ac0  6f 74 29 20 ca 0d 0e f6  16 20 c9 20 31 3a f2 6d  |ot) ..... . 1:.m|
00001ad0  6f 76 65 70 6f 73 28 64  6f 74 29 0d 0f 00 22 20  |ovepos(dot)..." |
00001ae0  c9 20 32 3a 78 73 28 64  6f 74 29 3d 30 3a 79 73  |. 2:xs(dot)=0:ys|
00001af0  28 64 6f 74 29 3d 67 72  61 76 69 74 79 0d 0f 0a  |(dot)=gravity...|
00001b00  05 cb 0d 0f 14 05 e1 0d  0f 1e 05 3a 0d 0f 28 13  |...........:..(.|
00001b10  dd 20 f2 6d 6f 76 65 70  6f 73 28 64 6f 74 29 0d  |. .movepos(dot).|
00001b20  0f 32 1c 6e 78 3d 28 64  78 28 64 6f 74 29 2d 73  |.2.nx=(dx(dot)-s|
00001b30  78 29 2f 73 64 2a 6c 32  2b 73 78 0d 0f 3c 1c 6e  |x)/sd*l2+sx..<.n|
00001b40  79 3d 28 64 79 28 64 6f  74 29 2d 73 79 29 2f 73  |y=(dy(dot)-sy)/s|
00001b50  64 2a 6c 32 2b 73 79 0d  0f 46 1e 78 73 28 64 6f  |d*l2+sy..F.xs(do|
00001b60  74 29 2b 3d 28 6e 78 2d  64 78 28 64 6f 74 29 29  |t)+=(nx-dx(dot))|
00001b70  2a 74 61 75 74 0d 0f 50  1e 79 73 28 64 6f 74 29  |*taut..P.ys(dot)|
00001b80  2b 3d 28 6e 79 2d 64 79  28 64 6f 74 29 29 2a 74  |+=(ny-dy(dot))*t|
00001b90  61 75 74 0d 0f 5a 0e 64  78 28 64 6f 74 29 3d 6e  |aut..Z.dx(dot)=n|
00001ba0  78 0d 0f 64 27 e7 20 6e  79 3c 73 69 7a 65 20 64  |x..d'. ny<size d|
00001bb0  79 28 64 6f 74 29 3d 73  69 7a 65 20 8b 20 64 79  |y(dot)=size . dy|
00001bc0  28 64 6f 74 29 3d 6e 79  0d 0f 6e 05 e1 0d 0f 78  |(dot)=ny..n....x|
00001bd0  05 3a 0d 0f 82 0c dd 20  f2 63 6c 65 61 72 0d 0f  |.:..... .clear..|
00001be0  8c 0b ea 20 63 6c 65 61  72 0d 0f 96 14 e7 20 64  |... clear..... d|
00001bf0  6f 74 73 3d 6d 61 78 64  6f 74 73 20 e1 0d 0f a0  |ots=maxdots ....|
00001c00  1c e3 20 63 6c 65 61 72  3d 64 6f 74 73 2b 31 20  |.. clear=dots+1 |
00001c10  b8 20 6d 61 78 64 6f 74  73 0d 0f aa 10 20 64 78  |. maxdots.... dx|
00001c20  28 63 6c 65 61 72 29 3d  30 0d 0f b4 10 20 64 79  |(clear)=0.... dy|
00001c30  28 63 6c 65 61 72 29 3d  30 0d 0f be 11 20 6f 64  |(clear)=0.... od|
00001c40  78 28 63 6c 65 61 72 29  3d 30 0d 0f c8 11 20 6f  |x(clear)=0.... o|
00001c50  64 79 28 63 6c 65 61 72  29 3d 30 0d 0f d2 05 ed  |dy(clear)=0.....|
00001c60  0d 0f dc 05 e1 0d 0f e6  05 3a 0d 0f f0 0f dd 20  |.........:..... |
00001c70  f2 72 65 63 28 72 65 63  29 0d 0f fa 0c c8 8e 20  |.rec(rec)...... |
00001c80  72 65 63 20 ca 0d 10 04  30 20 c9 20 31 3a c8 97  |rec ....0 . 1:..|
00001c90  20 c8 93 20 73 69 7a 65  2c 73 69 7a 65 2c 31 32  | .. size,size,12|
00001ca0  37 36 2d 73 69 7a 65 2a  32 2c 31 30 31 36 2d 73  |76-size*2,1016-s|
00001cb0  69 7a 65 2a 32 0d 10 0e  1c 20 c9 20 32 3a c8 97  |ize*2.... . 2:..|
00001cc0  20 c8 93 20 30 2c 30 2c  31 32 37 36 2c 31 30 31  | .. 0,0,1276,101|
00001cd0  36 0d 10 18 05 cb 0d 10  22 05 e1 0d 10 2c 05 3a  |6......."....,.:|
00001ce0  0d 10 36 1c dd 20 f2 6d  6f 75 73 65 28 f8 20 6d  |..6.. .mouse(. m|
00001cf0  78 2c f8 20 6d 79 2c f8  20 6d 62 29 0d 10 40 0f  |x,. my,. mb)..@.|
00001d00  c8 97 20 6d 78 2c 6d 79  2c 6d 62 0d 10 4a 0f 6d  |.. mx,my,mb..J.m|
00001d10  78 3d 6d 78 20 81 20 34  2a 34 0d 10 54 0f 6d 79  |x=mx . 4*4..T.my|
00001d20  3d 6d 79 20 81 20 34 2a  34 0d 10 5e 05 e1 0d ff  |=my . 4*4..^....|
00001d30