gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] manuscripts/Paper Makefile buoyoing.mp paper.tex


From: Tuomas J. Lukka
Subject: [Gzz-commits] manuscripts/Paper Makefile buoyoing.mp paper.tex
Date: Tue, 18 Mar 2003 03:00:15 -0500

CVSROOT:        /cvsroot/gzz
Module name:    manuscripts
Changes by:     Tuomas J. Lukka <address@hidden>        03/03/18 03:00:12

Modified files:
        Paper          : Makefile buoyoing.mp paper.tex 

Log message:
        The image getting better

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/manuscripts/Paper/Makefile.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/manuscripts/Paper/buoyoing.mp.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/manuscripts/Paper/paper.tex.diff?tr1=1.28&tr2=1.29&r1=text&r2=text

Patches:
Index: manuscripts/Paper/Makefile
diff -u manuscripts/Paper/Makefile:1.2 manuscripts/Paper/Makefile:1.3
--- manuscripts/Paper/Makefile:1.2      Thu Mar  6 09:34:44 2003
+++ manuscripts/Paper/Makefile  Tue Mar 18 03:00:10 2003
@@ -6,7 +6,7 @@
 LATEXCMD=
 endif
 
-all: pipe.1 perceptual-model.eps pipeline.eps buoyoing.1
+all: pipe.1 perceptual-model.eps pipeline.eps buoyoing.1 buoyoing.5
        latex "${LATEXCMD} paper"
        BIBINPUTS=..:$$BIBINPUTS bibtex paper
        latex "${LATEXCMD} paper"
@@ -15,7 +15,7 @@
 pipe.1: pipe.mp
        TEX=latex mpost pipe
 
-buoyoing.1: buoyoing.mp
+buoyoing.1 buoyoing.5: buoyoing.mp
        TEX=latex mpost buoyoing
 
 # doesn't work because of .ps screenshots
Index: manuscripts/Paper/buoyoing.mp
diff -u manuscripts/Paper/buoyoing.mp:1.6 manuscripts/Paper/buoyoing.mp:1.7
--- manuscripts/Paper/buoyoing.mp:1.6   Mon Mar 17 14:58:09 2003
+++ manuscripts/Paper/buoyoing.mp       Tue Mar 18 03:00:10 2003
@@ -1,3 +1,8 @@
+defaultfont := "phvr8r";
+
+boolean colors;
+colors = false;
+
 verbatimtex
 \documentclass{article}
 \usepackage{multicol}
@@ -19,12 +24,20 @@
 \font\foofontii = cmcss12 scaled 1000 
 etex;
 
+
+
 def doc(suffix s)(expr col, pict) =
     picture s.p;
     s.p = nullpicture;
-    addto s.p contour bbox(pict) withcolor col;
+    addto s.p contour bbox(pict) 
+       if colors:
+           withcolor col
+       else:
+           withcolor (.95, .95, .95)
+       fi
+       ;
     addto s.p also pict;
-    addto s.p doublepath bbox(s.p);
+    addto s.p doublepath bbox(s.p) withpen pencircle scaled 4pt;
     pair s.size;
     s.size = (urcorner pict) - (llcorner pict);
     pair s.loc;
@@ -42,11 +55,13 @@
 enddef;
 
 vardef docpicclip(suffix s)(expr locp, clipp) =
-    save p;
+    save p, pa;
     picture p;
     p := docpicraw(s, locp);
+    path pa;
+    addto p doublepath clipp transformed locp withpen pencircle scaled 4pt;
     clip p to clipp transformed locp;
-    addto p doublepath (clipp transformed locp) withpen pencircle scaled 4pt;
+    clip p to bbox(s.p) transformed locp;
     addto currentpicture also p;
 enddef;
 
@@ -94,7 +109,7 @@
     locatelinkend(b, ind);
     plainlinkend(a, ind)
     plainlinkend(b, ind)
-    draw ((0,0) transformed lnk[ind].a.loc){right} .. tension 2 ..
+    draw ((0,0) transformed lnk[ind].a.loc){right} .. tension 1.5 ..
         ((0,0) transformed lnk[ind].b.loc){right} withpen pencircle scaled 6pt;
 enddef;
 
@@ -102,10 +117,11 @@
     (x-2*r,y)...(x,y-r)...(x+2*r,y)...(x,y+r)...cycle
 enddef;
 
-link("a", cir(50,30,25), "c", cir(75,110,40));
+link("a", cir(50,30,25), "c", cir(70,160,37));
 link("b", cir(50,230,30), "a", cir(350,290,30));
 link("b", cir(60,170,35), "d", cir(150,60,50));
-link("c", cir(70,160,37), "b", cir(58,310,32));
+link("c", cir(75,110,40), "b", cir(58,310,32));
+link("a", cir(48,100,26), "e", cir(220,150,32));
 
 
 
@@ -143,10 +159,21 @@
 docpic(d, identity shifted (b.loc + (0, -400)));
 docpic(e, identity shifted (d.loc + (xpart(d.size)+50, 0)));
 
+def doclabel(suffix d)(expr l) =
+    label.lrt(l infont defaultfont scaled 10 , d.loc + (0,ypart d.size));
+enddef;
+
+doclabel(a, "1");
+doclabel(b, "2");
+doclabel(c, "3");
+doclabel(d, "4");
+doclabel(e, "5");
+
 plainlink(0);
 plainlink(1);
 plainlink(2);
 plainlink(3);
+plainlink(4);
 
 % addto currentpicture also a.p;
 % 
@@ -176,39 +203,137 @@
            withpen pencircle scaled 2pt;;
 enddef;
 
-beginfig(2);
 
-docpic(a, identity shifted (-50, -50) scaled 1.2);
+bboxmargin := 0pt;
+
+def atrans(expr e) =
+    identity shifted(-50,-50) scaled (e[1.2, .7]) rotated (e*15) shifted 
(e[(0,0), (-150,25)])
+enddef;
+
+def aclip(expr e) =
+    lnk0a.p scaled ((sqrt(e))[7, 2]) shifted lnk0a.l
+enddef;
+
+def ctrans(expr e) =
+    identity shifted (-lnk0b.l) scaled (e[.7,1.2]) rotated (e[-15,0]) shifted 
(e[(150,-60),(0,0)])
+enddef;
+
+def cclip(expr e) =
+    lnk0b.p scaled (e[1.05, 5]) shifted lnk0b.l
+enddef;
+
+
+def btrans(expr e) =
+       identity shifted (-lnk3b.l) scaled (e[.7,1.15]) rotated (e[-15,0]) 
+           shifted (e[(150, -70),(0,20)])
+enddef;
+def bclip(expr e) =
+    lnk3b.p scaled(e[1.05, 5]) shifted lnk3b.l
+enddef;
+
+def linkline(expr ind) =
+    locatelinkend(a, ind);
+    locatelinkend(b, ind);
+    draw ((0,0) transformed lnk[ind].a.loc) .. 
+        ((0,0) transformed lnk[ind].b.loc) withpen pencircle scaled 3pt;
+enddef;
+
+def aniframe(expr fract) =
+    docpicclip(a, atrans(fract), aclip(fract));
+    % link 0
+    docpicclip(c, ctrans(fract), cclip(fract));
+    if fract>.5:
+       docpicclip(a, atrans(fract), aclip(fract));
+    fi;
+
+    if fract < .01:
+       docpicclip(e, 
+           identity shifted (-lnk4b.l) scaled .7 rotated -5 shifted (150,60),
+           lnk4b.p scaled 1.5 shifted lnk4b.l);
+       linkline(4);
+    fi;
+    if fract > .99:
+       docpicclip(b, btrans(0), bclip(0));
+       linkline(3);
+    fi;
 
-docpicclip(c, identity shifted (-lnk0b.l) scaled .7 rotated -15 
shifted(150,-60),
-           lnk0b.p scaled 1.05 shifted lnk0b.l);
+    linkline(0);
+    cscreen;
 
-locatelinkend(a, 0);
-locatelinkend(b, 0);
+enddef;
 
-draw ((0,0) transformed lnk0.a.loc) .. 
-     ((0,0) transformed lnk0.b.loc) withpen pencircle scaled 3pt;
 
-cscreen;
+% Initial position
 
+beginfig(2);
+aniframe(0);
 endfig;
 
 beginfig(3);
+aniframe(0.3);
+endfig;
 
+beginfig(4);
+aniframe(0.65);
+endfig;
+
+beginfig(5);
+aniframe(1.0);
+endfig;
 
-docpic(b, identity shifted (-.5*b.size) scaled 1.4);
+% Now, c starts to move away.
+% Inverting the parameter to make change easier.
 
-docpicclip(a, identity shifted (-lnk1b.l) scaled .7 rotated -15 shifted 
(150,10),
+def ctrans(expr e) =
+    identity shifted (e[(-lnk3a.l),(-lnk0b.l)]) scaled (e[.7,1.2]) rotated 
(e[15,0]) shifted (e[(-150,-30),(0,0)])
+enddef;
+
+def cclip(expr e) =
+    lnk3a.p scaled (e[1.05, 5]) shifted lnk3a.l
+enddef;
+
+
+def aniframe(expr fract) =
+
+    % link 0
+    docpicclip(c, ctrans(1-fract), cclip(1-fract));
+    docpicclip(b, btrans(fract), bclip(fract));
+    if fract>.5:
+    fi;
+
+    if fract < .01:
+       docpicclip(a, atrans(fract), aclip(fract));
+       linkline(0);
+    fi;
+
+    if fract > .99:
+       docpicclip(d, 
+           identity shifted (-lnk2b.l) scaled .7 rotated -15 shifted 
(150,-140),
+           lnk2b.p scaled 1.05 shifted lnk2b.l);
+       linkline(2);
+
+       docpicclip(a, 
+           identity shifted (-lnk1b.l) scaled .7 rotated -15 shifted (150,-50),
            lnk1b.p scaled 1.5 shifted lnk1b.l);
+       linkline(1);
 
-locatelinkend(a, 1);
-locatelinkend(b, 1);
+    fi;
 
-draw ((0,0) transformed lnk1.a.loc) .. 
-     ((0,0) transformed lnk1.b.loc) withpen pencircle scaled 3pt;
+    linkline(3);
+    cscreen;
+enddef;
 
-cscreen;
+beginfig(6);
+aniframe(.3);
+endfig;
+beginfig(7);
+aniframe(.65);
+endfig;
+beginfig(8);
+aniframe(1);
 endfig;
+
+
 
 verbatimtex
 \end{document}
Index: manuscripts/Paper/paper.tex
diff -u manuscripts/Paper/paper.tex:1.28 manuscripts/Paper/paper.tex:1.29
--- manuscripts/Paper/paper.tex:1.28    Mon Mar 17 15:18:57 2003
+++ manuscripts/Paper/paper.tex Tue Mar 18 03:00:10 2003
@@ -440,8 +440,20 @@
 
 \begin{figure*}
 \def\bw{7cm}
+\def\fw{3.5cm}
+\def\fkw{6cm}
 \includegraphics[width=\bw]{buoyoing.1}
-\includegraphics[width=\bw]{buoyoing.2}
+\vbox{
+\textwidth=5cm\raggedright
+\hsize=7.5cm
+\includegraphics[width=\fkw]{buoyoing.2}
+\includegraphics[width=\fw]{buoyoing.3}
+\includegraphics[width=\fw]{buoyoing.4}
+\includegraphics[width=\fkw]{buoyoing.5}
+\includegraphics[width=\fw]{buoyoing.6}
+\includegraphics[width=\fw]{buoyoing.7}
+\includegraphics[width=\fkw]{buoyoing.8}
+}
 \caption{
 An example of the structure used by BuoyOING.
 a) A small network of documents.




reply via email to

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