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 Henrik Tidefelt
23 t3: t2 * Numeric..golden
33 d_curve: [[shift (0,y2)]
34 Geometry..@defaultunit:1%c | (0mm,y2)>(^0°)--(1%c^)<(0.5*x3,ypart*y2)>(1%C^~10°)--(^)<(x3,0)>(^)--(1%C^10°)<(0.5*x3,~ypart*y2)>(1%c^)--(^0°)<(0mm,~y2)
36 r_curve: [[shift (0,y2)]
37 Geometry..@defaultunit:1%c | (0mm,y1)>(^0°)--(1%c^)<(0.5*x2,ypart*y1)>(1%C^~10°)--(^)<(x2,0)>(^)--(1%C^10°)<(0.5*x2,~ypart*y1)>(1%c^)--(^0°)<(0mm,~y1)
40 fillColor: @nonstroking:[rgb 205/255 49/255 0/255]
42 IO..•page << fillColor | [Graphics..fill d_curve--[Geometry..reverse r_curve]--cycle]
44 IO..•page << @width:t3 & @cap:Traits..Cap..BUTT | [Graphics..stroke (0cm,2*y2)--(0mm,0mm)]
45 IO..•page << @width:t2 & @cap:Traits..Cap..ROUND & Geometry..@defaultunit:1%c | [Graphics..stroke (x1,2*y2)--d_curve--(x1,0mm)]
46 IO..•page << @width:t2 & @cap:Traits..Cap..ROUND & Geometry..@defaultunit:1%c | [Graphics..stroke r_curve]
48 r_ray: r_point--(r_curve.end - 3mm).p
49 IO..•page << @width:t2 & @cap:Traits..Cap..ROUND & Geometry..@defaultunit:1%c | [Graphics..stroke r_ray]
55 c: [shift (x1,radius-0.5*t2+0.5*@width)][][Geometry..circle radius]
56 IO..•page << fillColor | [Graphics..fill c]
57 IO..•page << [Graphics..stroke c]
64 c: [shift sl.p]*[rotate 180°+[angle sl.T]]*[shift (0,radius-0.5*t2+0.5*@width)] [] [Geometry..circle radius]
65 IO..•page << fillColor | [Graphics..fill c]
66 IO..•page << [Graphics..stroke c]