[metapost] Re: "3D" Metafont fonts with GNU 3DLDF

Laurence Finston lfinsto1 at gwdg.de
Tue Jan 11 21:00:03 CET 2005


On Tue, 11 Jan 2005, Laurence Finston wrote:

>
> The code used to generate it is fairly compact, so I include
> it below.


The following is a better loop for generating the figures.
For one thing, it cuts down on the repetition resulting
from the symmetry of the sphere.

Laurence


picture p;
picture q;
q := p := current_picture;

n := 0;

for i = 0 step 1 until 4:
   p := q;
   if i > 0:
      rotate p (45i, 0);
   fi;
   for j = 0 step 1 until 5:
      if j > 0:
         rotate p (0, 30);
      fi
      beginfig(n);
         output p;
      endfig;
      n += 1;
   endfor;
endfor;
end;




More information about the metapost mailing list