%%%% grrhm_02.ldf %%%% Created by Laurence D. Finston (LDF) Tue Dec 20 19:49:55 CET 2005 %% * (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, 2019, 2020, 2021, 2022, 2023 The Free Software Foundation, Inc. %%%% 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 the maintainer of %%%% GNU 3DLDF to send 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 The Free Software Foundation, Inc. %%%% 51 Franklin St, Fifth Floor %%%% Boston, MA 02110-1301 %%%% USA %%%% Laurence.Finston@gmx.de %% *** (3) The Great_Rhombicosidododecahedron. %% LDF 2005.12.20. verbatim_metapost "verbatimtex \magnification=\magstep5 etex"; pickup pencircle scaled (1.5mm, 1.5mm); color dull_red; color dull_yellow; color dull_blue; set dull_red (.925, 0, 0); set dull_yellow (.925, .925, 0); set dull_blue (0, 0, .925); focus f; set f with_position (0, 1, -20) with_direction (0, 1, 10) with_distance 20; picture save_picture; beginfig(1); polyhedron gr; gr := unit_great_rhombicosidododecahedron scaled 4; polygon poly[]; point center[]; for i = 0 upto size gr - 1: poly[i] := get_reg_polygon (i) gr; center[i] := get_center poly[i]; if zpart center[i] < 0: if (size poly[i] == 4): filldraw poly[i] with_fill_color dull_blue; else: if (size poly[i] == 6): filldraw poly[i] with_fill_color dull_yellow; else: if (size poly[i] == 10): filldraw poly[i] with_fill_color dull_red; fi; fi; fi; fi; endfor; save_picture := current_picture; endfig with_focus f; %% **** (4) beginfig(2); for i = 0 upto size gr - 1: poly[i] := get_reg_polygon (i) gr; center[i] := get_center poly[i]; if ypart center[i] >= 0: if (size poly[i] == 4): filldraw poly[i] with_fill_color dull_blue; else: if (size poly[i] == 6): filldraw poly[i] with_fill_color dull_yellow; else: if (size poly[i] == 10): filldraw poly[i] with_fill_color dull_red; fi; fi; fi; fi; endfor; endfig with_projection parallel_x_z; beginfig(3); output save_picture with_projection parallel_x_y; endfig; beginfig(4); for i = 0 upto size gr - 1: poly[i] := get_reg_polygon (i) gr; center[i] := get_center poly[i]; if xpart center[i] >= 0: if (size poly[i] == 4): filldraw poly[i] with_fill_color dull_blue; else: if (size poly[i] == 6): filldraw poly[i] with_fill_color dull_yellow; else: if (size poly[i] == 10): filldraw poly[i] with_fill_color dull_red; fi; fi; fi; fi; endfor; endfig with_projection parallel_z_y; verbatim_metapost "end"; end;