<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV id=yiv490172214>
<DIV>Hi Karl, </DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank you for your response.</DIV>
<DIV>&nbsp;</DIV>
<DIV>It's just a simple recursion drawing. </DIV>
<DIV>&nbsp;</DIV>
<DIV>numeric n, m, x,y,z,aa,bb;<BR>picture h, h[], g, g[];<BR>path p,p[];<BR>pair a,a[],b,b[];</DIV>
<DIV>&nbsp;</DIV>
<DIV>beginfig(1)<BR>n:=8;</DIV>
<DIV>u:=.6cm;</DIV>
<DIV>for i=0 upto n-1:<BR>a[i]:=u*dir(360*i/n);<BR>endfor;<BR>p0:=a[0] for i:=1 upto n-1: --a[i] endfor --cycle;</DIV>
<DIV>a:=u*dir(360/n) shifted a1;<BR>y:=arclength ((0,0)--a);<BR>y:=1.2y;</DIV>
<DIV><BR>def froct(expr m)=<BR>&nbsp;if m=0:<BR>&nbsp;&nbsp; fill p0 scaled ((y+u)/u) withcolor red;<BR>&nbsp;else:<BR>&nbsp; fill p0 withcolor red;<BR>&nbsp; h0:=currentpicture;<BR>&nbsp; currentpicture:=nullpicture;<BR>&nbsp;&nbsp; for j=1 upto m:<BR>&nbsp;&nbsp; for i=0 upto n-1:<BR>&nbsp;&nbsp;&nbsp; b[i]:=y*dir(360*i/n);<BR>&nbsp;&nbsp;&nbsp; draw h0 shifted b[i];<BR>&nbsp;&nbsp; endfor;<BR>&nbsp;&nbsp; h:=currentpicture;<BR>&nbsp;&nbsp; currentpicture:=nullpicture;<BR>&nbsp;&nbsp; h0:=h scaled (u/(y+u));<BR>&nbsp;&nbsp; endfor;<BR>&nbsp;&nbsp; draw h;<BR>&nbsp; fi; <BR>enddef;<BR>&nbsp;<BR>froct(1);<BR>h1:=currentpicture;<BR>currentpicture:=nullpicture;</DIV>
<DIV><BR>froct(2);<BR>h2:=currentpicture;<BR>currentpicture:=nullpicture;</DIV>
<DIV>froct(4);<BR>h3:=currentpicture;<BR>currentpicture:=nullpicture;</DIV>
<DIV>draw h1;<BR>draw h2 shifted (8u,0);<BR>draw h3 shifted (16u,0);&nbsp; </DIV>
<DIV>endfig;<BR>end</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>If you change froct(5) in picture 3, then the capacity is exceeded 800000 already, which is strange because 8^5 is only 32768, even though the growth is exponential, it&nbsp;will exceed any memory capacity with a few more iteration, I admit.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I don't know anything about what you described below, because I am a&nbsp;novice in programming and computer. </DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Another strange thing for me is&nbsp;at the beginning of the definition of a function,</DIV>
<DIV>&nbsp;</DIV>
<DIV>def froct(expr m)=<BR>&nbsp;if m=0:<BR>&nbsp;&nbsp; <FONT style="BACKGROUND-COLOR: #ffff40">fill p0 scaled ((y+u)/u) withcolor red;<BR></FONT>&nbsp;else:<BR>&nbsp; <FONT style="BACKGROUND-COLOR: #ffff00">fill p0 withcolor red;<BR></FONT>&nbsp; h0:=currentpicture;<BR>&nbsp; currentpicture:=nullpicture;</DIV>
<DIV>&nbsp;</DIV>
<DIV>these two highlighted sentences&nbsp;look redundant, so I&nbsp;pull them outside of function froct such as:</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; <FONT style="BACKGROUND-COLOR: #c3be71">fill p0 withcolor red;<BR>&nbsp; h0:=currentpicture;<BR>&nbsp; currentpicture:=nullpicture;</FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #c3be71"></FONT>&nbsp;</DIV>
<DIV><FONT style="BACKGROUND-COLOR: #c3be71">def froct(expr m)=<BR>&nbsp;if m=0:<BR>&nbsp;&nbsp;&nbsp;draw h0&nbsp;scaled ((y+u)/u);<BR>&nbsp;else:<BR>&nbsp;&nbsp;draw h0;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT style="BACKGROUND-COLOR: #ffffbf">this looks more efficient to me, but in this case, it cannot even perform 4 iterations. So, obviously, it is less efficient than the original one.</FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #ffffbf"></FONT>&nbsp;</DIV>
<DIV><FONT style="BACKGROUND-COLOR: #ffffbf">I am just a beginner of programming (this is basically my first), I would appreciate it very much if any experts can give some insight.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT style="BACKGROUND-COLOR: #ffffbf"></FONT>&nbsp;</DIV>
<DIV>Thanks,</DIV>
<DIV>Steve</DIV>
<DIV><FONT style="BACKGROUND-COLOR: #ffffbf"></FONT>&nbsp;</DIV>
<DIV><BR><BR>--- On <B>Sat, 2/7/09, Karl Berry <I>&lt;karl@freefriends.org&gt;</I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">From: Karl Berry &lt;karl@freefriends.org&gt;<BR>Subject: Re: [<SPAN>metapost</SPAN>] ! MetaPost capacity exceeded<BR>To: hmc0907@yahoo.com, metapost@tug.org<BR>Date: Saturday, February 7, 2009, 3:37 PM<BR><BR><PRE>    &gt; If you want your change to affect only metapost, add or change
    &gt; main_memory.mpost only

I'm curious what kind of graph you are generating that the current
main_memory is insufficient for!  My knee-jerk reaction to such reports
is always to just increase the defaults, since if you're running into
it, probably others are too.  It's not just an infinite recursion or
some such?

    texlive ...and therefore I am uncertain what the 'best' command is.

Er, well, it all depends on what one wants to do :).  It's already done,
but for the record ...

As you already mentioned, fmtutil generates stuff per-user; fmtutils-sys
generates it for the "system" install.  In this case, I gather there
was
no permission to write in the system dirs.

As for the options, here are the principal ones:
  --all                      recreate all format files
  --missing                  create all missing format files
  --refresh                  recreate only existing format files
  --byfmt formatname         (re)create format for `formatname'

So,  fmtutil --byfmt mpost  would have been my first suggestion, 
since it didn't seem desired to remake the tex or metafont formats here.

Happy formatting,
karl
</PRE></BLOCKQUOTE></DIV></td></tr></table><br>