When a Picture
is projected onto the x-y plane, the
x and y-values from the world_coordinates
of the Points
belonging to the objects on the
Picture
are copied to
their projective_coordinates
, which are
used in the MetaPost code written to out_stream
.
If a Picture
p contains an object in the x-y plane,
or in a plane parallel to the x-y plane, then
the result of p
.output(Projections::PARALLEL_X_Y)
is more-or-less
equivalent to just using MetaPost without 3DLDF.
Rectangle r(origin, 3, 3, 90); Circle c(origin, 3, 90); c *= r.shift(0, 0, 5); r.draw(); c.draw(); current_picture.output(Projections::PARALLEL_X_Y);
Fig. 53.
If the objects do not lie in the x-y plane, or a plane parallel to the x-y plane, then the projection will be distorted:
current_picture.output(Projections::PARALLEL_X_Y);
Fig. 54.
Picture::output()
can be called with an additional real
argument factor for magnifying or shrinking the Picture
.
Rectangle r(origin, 4, 4, 90, 60); Circle c(origin, 4, 90, 60); c *= r.shift(0, 0, 5); r.filldraw(black, gray); c.unfilldraw(black); current_picture.output(Projections::PARALLEL_X_Y, .5); current_picture.shift(2.5); current_picture.output(Projections::PARALLEL_X_Y); current_picture.shift(1); current_picture.output(Projections::PARALLEL_X_Y, 2);
Fig. 55.
Parallel projection onto the x-z and z-y planes are completely analogous to parallel projection onto the x-y plane.