Date:2010-09-27 08:34:21 (8 years 9 months ago)
Author:Werner Almesberger
Commit:3b6325d9142a0e99b18408d342722c3fedbc6204
Message:Show an exploded view of all parts scanned so far in one image.

- sfy/ben.pov: show a stack of all parts scanned so far
- sfy/Makefile: replaced $(NAME).inc with general .sfy -> .inc rule
- sfy/Makefile (PROJECTS): renamed to PARTS
- sfy/Makefile (ben): process ben.pov
Files: sfy/Makefile (1 diff)
sfy/ben.pov (1 diff)

Change Details

sfy/Makefile
1PROJECTS = baseframe batcvr dispbase dispshell kbd lcdframe
1PARTS = baseframe batcvr dispbase dispshell kbd lcdframe
22
3.PHONY: run pov clean
3.SUFFIXES: .sfy .inc
4
5.PHONY: run pov ben clean
46
57run: $(NAME).sfy
68        ./solidify $(NAME).sfy
79
8$(NAME).inc: $(NAME).sfy
9        ./solidify -p $(NAME).sfy
10.sfy.inc:
11        ./solidify -p $<
1012
1113pov: $(NAME).pov $(NAME).inc
1214        povray +A +P -W1280 -H900 $(NAME).pov
1315
16ben: ben.pov $(PARTS:%=%.inc)
17        povray +A +P -W1280 -H900 ben.pov
18# povray +A +P -W640 -H480 ben.pov
19
1420$(NAME).pov: template.pov
1521        sed 's/NAME/$(NAME)/' template.pov >$@ || { rm -f $@; exit 1; }
1622
1723clean:
18        rm -f $(PROJECTS:%=%.inc) $(PROJECTS:%=%.pov) *.pgm
19        rm -f $(PROJECTS:%=%.png)
24        rm -f $(PARTS:%=%.inc) $(PARTS:%=%.pov) *.pgm
25        rm -f $(PARTS:%=%.png)
sfy/ben.pov
1#include "colors.inc"
2#include "dispshell.inc"
3#include "dispbase.inc"
4/* lcdpcb */
5/* lcd */
6#include "lcdframe.inc"
7/* screen */
8#include "baseframe.inc"
9#include "kbd.inc"
10/* pcb */
11/* bottom */
12/* battery */
13#include "batcvr.inc"
14
15/*
16 * POV-Ray defaults to a "camera" coordinate system that can be confusing.
17 * We use a traditional mathematical/engineering view, with a view from
18 * X-/Y-/Z+ into the X/Y plane.
19 */
20
21camera {
22    location <30, -150, 90>
23    look_at <0, 20, 20>
24    sky z
25    right -4/3*x
26}
27
28background { color White }
29
30light_source {
31    <-200, -300, 200>
32    color White
33}
34
35light_source {
36    <100, -500, 50>
37    color White
38}
39
40/*
41 * Mark the coordinate axes:
42 * - a red unit sphere at the center
43 * - three green spheres at x = 10*i
44 * - two blue spheres at y = 10*i
45 * - one yellow sphere at z = 10
46 */
47
48#declare Finish = finish {
49    brilliance 2
50    phong 0.8
51    phong_size 100
52    metallic
53    ambient 0.5
54}
55
56object {
57    Part_dispshell
58    pigment { rgb <0.8, 0.8, 0.8> }
59    finish { Finish }
60    rotate <0, 0, 180>
61    translate <0, 0, 80>
62}
63
64object {
65    Part_dispbase
66    pigment { rgb <0.25, 0, 0.75> }
67    finish { Finish }
68    rotate <0, 0, 180>
69    translate <0, 0, 70>
70}
71
72/* lcdpcb 60 <0.5, 0. 0.5> */
73/* lcd 50 <1, 0, 0> */
74
75object {
76    Part_lcdframe
77    pigment { rgb <0.75, 0, 0.25> }
78    finish { Finish }
79    rotate <180, 0, 0>
80    translate <0, 0, 40>
81}
82
83/* screen 30 <1, 0, 0> */
84
85object {
86    Part_baseframe
87    pigment { rgb <0.5, 0.5, 0> }
88    finish { Finish }
89    translate <0, 0, 20>
90}
91
92object {
93    Part_kbd
94    pigment { rgb <0, 1, 0> }
95    finish { Finish }
96    translate <0, 0, 10>
97}
98
99/* pcb 0 <0, 0.75, 0.25> */
100/* bottom -10 <0, 0.5, 0.5> */
101/* battery -20 <0, 0.25, 0.75> */
102
103object {
104    Part_batcvr
105    pigment { rgb <0, 0, 1> }
106    finish { Finish }
107    rotate <180, 0, 0>
108    translate <0, 0, -30>
109}

Archive Download the corresponding diff file

Branches:
master



interactive