This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: Making xfig drawings with scheme
rm@mamma.varadinet.de writes:
> On Thu, Jul 20, 2000 at 11:41:34AM -0400, Harvey J. Stein wrote:
> > [...]
> > Not really. Everything becomes a sequence of rather basic postscript
> > commands. For example, it doesn't make use of the postscript looping
> > constructs and doesn't expose them to the scheme programmer. So, for
> > example, a loop generating 1000 nested squares becomes 1000 postscript
> > polygon draw cmds instead of becomming a loop in postscript to
> > generate the nested squares.
> >
>
> ... and that might be a problem for complex drawings. There is an
> upper limit for certain things in PostScript (and often enough it's
> anoyingly low ...). Off course it would be rather simple to have
> a function 'ps-loop-over' or 'ps-for-char-in' (boy, i'm finally back to
> postscript programming ;-)
It looks simple, but I don't think it really is simple. You run into
issues of correspondence btw scheme variables & postscript variables,
function calling, etc. What do you do with things like:
(ps-do-loop (i 1 (sin x)) (draw line (my-function i) (* 2 (sqrt (my-other-function j)))))
--
Harvey Stein
Bloomberg LP
hjstein@bfr.co.il