1 /** This file is part of Shapes.
3 ** Shapes is free software: you can redistribute it and/or modify
4 ** it under the terms of the GNU General Public License as published by
5 ** the Free Software Foundation, either version 3 of the License, or
8 ** Shapes is distributed in the hope that it will be useful,
9 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ** GNU General Public License for more details.
13 ** You should have received a copy of the GNU General Public License
14 ** along with Shapes. If not, see <http://www.gnu.org/licenses/>.
16 ** Copyright 2008 Henrik Tidefelt
24 @nonstroking:[gray 0.8]
25 & @reflections:[phong 1]
26 & @autointensity:[gray 0.1]
27 & @autoscattering:[phong 0.2]
29 & @facetresolution:1cm
31 [facet (r,~5cm,~0.5w)--(r,5cm,~0.5w)--(r,5cm,0.5w)--(r,~5cm,0.5w)--cycle
32 [facetnormal (r,0cm,~1cm) [normalized (r,0cm,~1cm)]]
33 [facetnormal (r,0cm,1cm) [normalized (r,0cm,1cm)]]
34 [facetnormal (r,5cm,0cm) [normalized (r,5cm,0cm)]]]
36 [[range 20° 160° 20°].foldsl
39 •st << [rotate3D (0,1,0) ~e] [] obj
45 •zbuf << [shift (10cm,3cm,10cm)] [] [specular_light [gray 0.9]]
49 tmp: [bboxed_enlarge [view zbuf] (5mm,5mm)]
51 •page << @nonstroking:GRAY_BLACK | [fill [bbox tmp]]