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, 2014, 2015 Henrik Tidefelt
20 ##lookin ..Shapes..Layout
21 ##lookin ..Shapes..Geometry3D
23 •zbuf: Graphics3D..newZBuf
28 @nonstroking:[gray 0.8]
29 & @reflections:[phong 1]
30 & @autointensity:[gray 0.1]
31 & @autoscattering:[phong 0.2]
33 & @facetresolution:1cm
35 [Graphics3D..facet (r,~5cm,~0.5w)--(r,5cm,~0.5w)--(r,5cm,0.5w)--(r,~5cm,0.5w)--cycle
36 [Graphics3D..facetnormal (r,0cm,~1cm) [normalized (r,0cm,~1cm)]]
37 [Graphics3D..facetnormal (r,0cm,1cm) [normalized (r,0cm,1cm)]]
38 [Graphics3D..facetnormal (r,5cm,0cm) [normalized (r,5cm,0cm)]]]
40 [[Data..range 20° 160° 20°].foldsl
43 •st << [Geometry3D..rotate (0,1,0) ~e] [] obj
49 •zbuf << [shift (10cm,3cm,10cm)] [] [specular_light [gray 0.9]]
53 tmp: [bboxed_enlarge [view zbuf] (5mm,5mm)]
55 IO..•page << @nonstroking:Traits..BW..BLACK | [Graphics..fill [Layout..bbox tmp]]