Fix Makefile whitespace errors
[shapes.git] / examples / showcase / circuitdemo.shape
blob5ec83e499225d773e5999ff1bdc35ff7345fde3d
1 /** This file is part of Shapes.
2  **
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
6  ** any later version.
7  **
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.
12  **
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/>.
15  **
16  ** Copyright 2008, 2010, 2014 Henrik Tidefelt
17  **/
19 ##needs ..Applications..Blockdraw
20 ##needs ..Applications..Circuit
22 ##needs demoprefs.shext
24 ##lookin ..Shapes
25 ##lookin ..Shapes..Geometry
26 ##lookin ..Applications..Blockdraw
27 ##lookin ..Applications..Circuit
29 demoprefs & Geometry..@defaultunit:1%c
31 { |** book preferences active
33 t1: [putblockOrigin IO..•page [termcircle]]
35 r: [putblockNearRight IO..•page [resistance] t1]
36 l: [putblockNearRight IO..•page [inductance] r]
37 h: [putblockNearRight IO..•page Graphics..pointpicture l]
38 c: [putblockNearBelow IO..•page [[rotate 90°] [capacitance]] h]
40 t2: [putblockNearBelow IO..•page [termcircle] c]
42 IO..•page << [putlabelAbove [Graphics..TeX `$R$´] [toppoint r] 0]
43 IO..•page << [putlabelAbove [Graphics..TeX `$L$´] [toppoint l] 0]
44 IO..•page << [putlabelLeft [Graphics..TeX `$C$´] [leftpoint c] 0]
46 Traits..@width:@connectionlw
49   |** We don't wan't the usual arrowheads on the connections, so the implicitly drawn connection must be ignored.
50   IO..•page << [Graphics..stroke [connect •ignore t1 r]]
51   IO..•page << [Graphics..stroke [connect •ignore r l]]
52   IO..•page << [Graphics..stroke [connect •ignore l c]]
53   IO..•page << [Graphics..stroke [connect •ignore c t2]]
56 } |** end of book preferences