[metapost] Re: Asymptote
bowman at math.ualberta.ca
Sat Sep 10 05:38:59 CEST 2005
> I note the following comments on 3D in
> | General hidden surface removal will be implemented
> | by using a binary space partition and picture
> | clipping in an upcoming release.
> | This [graph3] module will be developed into a full
> | three-dimensional graphing package in the near
> | future.
> | Until a complete 3D graphics package [...] is
> | written, a preliminary port of the MetaPost 3D
> | package featpost3D of L. Nobre G., C. Barbarosie
> | and J. Schwaiger to Asymptote makes some 3D
> | functionality already available, as illustrated by
> | the examples near_earth and conicurv.
> Are these comments up-to-date?
No, that's old. See the latest documentation (version 0.87):
Planar hidden surface removal is implemented with a binary space
partition and picture clipping. A planar path is first converted to a
struct face derived from picture. A face may be given to
a drawing routine in place of any picture argument. An array
of such faces may then be drawn, removing hidden surfaces
This module implements three-dimensional versions of the graph
functions in graph.asy.
Here is an example of a helix and a path3 bounding box using
Autoscaling and three-dimensional axes with ticks will be added in an
To facilitate the conversion of existing MetaPost programs,
this module contains a partial port of the MetaPost 3D package
featpost3D of L. Nobre G., C. Barbarosie, and J. Schwaiger to
Asymptote. However, much (but not all) of the functionality of
this port is now obsoleted by the general package three,
which fully extends the notion of a path to three-dimensions. The
original package is documented at
> Where can we find "near_earth.pdf"?
(page 2). It's also in the examples directory (see the Asymptote installation
instructions for the exact location on your system).
> It seems you are currently working on wire models
> of surfaces since Hobby treated only curves (=
> wires). (?) The sample "conicurv" seems to
> involve projection from a finite point onto a
> plane --- which in general converts a bezier curve
> into a more general NURBS curve. But "conicurv" is
> so simple that it would be easy to create it in an
> hoc fashion (I haven't examined the code). Again,
> the example named "surface" resorts to piecewise
> linear curves.
> Will you be supporting NURBS before PostScript
> does? I imagine SVG already supports NURBS. (?)
Currently we only produce postscript, because that's what most high-quality
printers understand. At some point we will produce PDF too.
Asymptote supports Gouraud shading of triangular lattice representations.
Here's an example of how it would look:
As soon as one of those standards supports other kinds of curves we can
certainly add support for them. Talk to Adobe. :-)
Someday we might support SVG, once it becomes a widely used standard
(assuming there is a way of converting it to postscript, so we can actually
print the output).
> Concerning the much used ".." and "..." point
> interpolation operators of metapost, it would
> be nice to have a clearer description of what they
> achieve (or try to achieve) -- in terms of
It's explained fully in the MetafontBook (page 131 and surrounding pages)
and in John Hobby's 1986 article in Discrete and Computational Geometry.
I'll eventually add more details in the documentation, but for now these
are the definitive references.
More information about the metapost