%% ships_1.ldf %% Created by Laurence D. Finston Do Apr 7 14:37:36 CEST 2005 % $Id: ships_1.ldf,v 1.1 2005/04/07 12:39:35 lfinsto1 Exp $ %% * (1) Copyright and License. %%%% This file is part of GNU 3DLDF, a package for three-dimensional drawing. %%%% Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, %%%% 2013, 2014, 2015, 2016, 2017, 2018 The Free Software Foundation %%%% GNU 3DLDF is free software; you can redistribute it and/or modify %%%% it under the terms of the GNU General Public License as published by %%%% the Free Software Foundation; either version 3 of the License, or %%%% (at your option) any later version. %%%% GNU 3DLDF is distributed in the hope that it will be useful, %%%% but WITHOUT ANY WARRANTY; without even the implied warranty of %%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %%%% GNU General Public License for more details. %%%% You should have received a copy of the GNU General Public License %%%% along with GNU 3DLDF; if not, write to the Free Software %%%% Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA %%%% GNU 3DLDF is a GNU package. %%%% It is part of the GNU Project of the %%%% Free Software Foundation %%%% and is published under the GNU General Public License. %%%% See the website http://www.gnu.org %%%% for more information. %%%% GNU 3DLDF is available for downloading from %%%% http://www.gnu.org/software/3dldf/LDF.html. %%%% Please send bug reports to Laurence.Finston@gmx.de %%%% The mailing list help-3dldf@gnu.org is available for people to %%%% ask other users for help. %%%% The mailing list info-3dldf@gnu.org is for sending %%%% announcements to users. To subscribe to these mailing lists, send an %%%% email with ``subscribe '' as the subject. %%%% The author can be contacted at: %%%% Laurence D. Finston %%%% c/o Free Software Foundation, Inc. %%%% 51 Franklin St, Fifth Floor %%%% Boston, MA 02110-1301 %%%% USA %%%% Laurence.Finston@gmx.de %% "Ships that pass in the night 1." %% Two interpenetrating polygons. pickup pencircle scaled 3; reg_polygon p; reg_polygon q; focus f; set f with_position (-5, 10, -10) with_direction (-5, 10, 10) with_distance 10; p := unit_pentagon scaled 5 rotated (0, 20) shifted (0, 0, -5); q := unit_hexagon scaled 5 rotated (90, 20) shifted (0, 1, 3); beginfig(0); path r; r := (-5, -22) -- (15, -22) -- (15, 7) -- (-5, 7) -- cycle; undraw r; output current_picture with_focus f; verbatim_metapost "boxit.b(currentpicture); path p; p = bpath(b);"; clear current_picture; endfig; for i = 1 upto 10: beginfig(i); shift p (0, 0, 3); filldraw p with_draw_color red with_fill_color green; filldraw q with_draw_color blue with_fill_color yellow;; verbatim_metapost "undraw p;"; endfig with_focus f with_surface_hiding; endfor; end;