gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] manuscripts/Paper zipfarea.mp


From: Tuomas J. Lukka
Subject: [Gzz-commits] manuscripts/Paper zipfarea.mp
Date: Mon, 24 Mar 2003 05:20:36 -0500

CVSROOT:        /cvsroot/gzz
Module name:    manuscripts
Changes by:     Tuomas J. Lukka <address@hidden>        03/03/24 05:20:36

Modified files:
        Paper          : zipfarea.mp 

Log message:
        twid

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/manuscripts/Paper/zipfarea.mp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: manuscripts/Paper/zipfarea.mp
diff -u manuscripts/Paper/zipfarea.mp:1.1 manuscripts/Paper/zipfarea.mp:1.2
--- manuscripts/Paper/zipfarea.mp:1.1   Sun Mar 23 15:16:05 2003
+++ manuscripts/Paper/zipfarea.mp       Mon Mar 24 05:20:35 2003
@@ -1,31 +1,49 @@
 beginfig(1);
 
-mrad = 200;
 
-path ucircle = fullcircle shifted (.5,.5);
+mrad = 100;
+
+path ucircle;
+ucircle := fullcircle shifted (.5,.5);
 
 h = 250;
 
 vardef getcoord(expr s, e) =
     save tp;
+    save cp;
     picture tp;
+    path cp;
     tp := currentpicture;
-    clip tp to unitsquare xscaled 600 yscaled (e-s) shifted (-50,s);
-    xpart(left tp)
+    cp := unitsquare xscaled 1000 yscaled (e-s) shifted (-50,s);
+    clip tp to cp;
+%    show bbox(tp);
+    xpart(urcorner(tp))
 enddef;
 
 vardef addcircle(expr rad) =
-    save cmi;
+    save cmi, cmc;
     save cur;
     cmi := 1000;
-    for i = 0 upto h / rad
-       cur := getcoord(
+    for i = 0 upto h / rad:
+       cur := getcoord(i*rad, (i+1)*rad);
+%      show i,cur;
+       if cur < cmi:
+           cmi := cur;
+           cmc := i * rad;
+       fi
     endfor;
+    draw ucircle scaled rad shifted (cmi,cmc);
 enddef;
 
 for i = 1 upto 100:
-    draw fullcircle scaled (mrad/((i**1.01)**.5)) shifted (.02*mrad*i,100);
+%    draw fullcircle scaled (mrad/((i**1.01)**.5)) shifted (.02*mrad*i,100);
+    addcircle(mrad / ((i**1.01)**.5));
 endfor;
+
+picture p;
+p := currentpicture;
+clip p to unitsquare;
+show bbox(p);
 
 endfig;
 end




reply via email to

[Prev in Thread] Current Thread [Next in Thread]