ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk>
Subject: Re: \sometxt bodyfontsize in staticMPfigure (2006.09.27 beta)
Date: Thu, 05 Oct 2006 05:38:08 +0100	[thread overview]
Message-ID: <E1GVKzo-0000ox-00@skye.ra.phy.cam.ac.uk> (raw)
In-Reply-To: Your message of "Wed, 04 Oct 2006 19:14:00 EDT." <Pine.WNT.4.63.0610041857020.3328@nqvgln>

> [1] metaobj is slow. I really hope that sometime in the future,
> metapost gets programming abilities of a real language. Maybe
> asymptote already does this, but it is too latex oriented.

And gets native 3d curves, which asymptote also has.  For example, I'd
imagine this being a valid path:

p := (0,0)--(0,1)--(1,0)--(1,1,1)--(0,0);

where the third coordinate is 0 if not specified, so all of metapost's
current drawing would still work, but you could move in or out of the
piece of paper too.  And the default view would be face on but you
could change the viewpoint.

Not sure if asymptote has that kind of syntax, but it does do tension
and curl and splines a la metapost but generalized to 3d paths.  I
tried to convert asymptote away from its latex origins, and
surprisingly I found that latex isn't the main obstacle, and I'd
configured most of the latex strings away.  The main issue is that
asymptote uses PStricks to do lots of the figure transformations.  For
example, the rotation in the figure below is handled by metapost with
a postscript rotation operator:

 beginfig(1)
 draw thelabel(btex hello etex, origin) rotated 70;
 endfig;

In asymptote, if I remember right, the hello box is created and then
pstricks macros are used to rotate it.  But that approach means
incorporating the pstricks postscript headers, and makes it
complicated to do on-the-fly parsing of the postscript output and to
convert it to pdf (what the internal mptopdf can and does do in
ConTeXt for metapost's easy postscript).

In thinking about this more, I guess I like metapost's declarative
syntax (asymptote is purely procedural) including for constructing
paths.  I wish it had paths (composed of maybe disjoint subpaths) and
subpaths (what metapost calls paths now) a la postscript.  I wish it
had 3d.  Featpost is not bad but is a layer built on top of metapost,
not so well integrated.  I wish metapost had real mathematical
functions, not the sarith.mp hack for large numbers.  Asymptote for
example has bessel functions handy (the authors can easily and do add
functions from the GNU math library).

Oh and modern color model (and shading) would be good.  Then Hans
wouldn't have to do magic to get transparency or cmyk.

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
         --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.

  reply	other threads:[~2006-10-05  4:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-28  4:24 Sanjoy Mahajan
2006-09-28  7:25 ` Hans Hagen
2006-09-29  0:16   ` Sanjoy Mahajan
2006-09-29  7:12     ` Hans Hagen
2006-10-04 23:14   ` Aditya Mahajan
2006-10-05  4:38     ` Sanjoy Mahajan [this message]
2006-10-05  7:08       ` Taco Hoekwater
2006-10-05  8:01     ` Hans Hagen
2006-10-05 13:22       ` Aditya Mahajan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1GVKzo-0000ox-00@skye.ra.phy.cam.ac.uk \
    --to=sanjoy@mrao.cam.ac.uk \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).