1
0
mirror of git://projects.qi-hardware.com/ben-scans.git synced 2024-11-21 21:33:11 +02:00

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
This commit is contained in:
Werner Almesberger 2010-09-27 03:34:21 -03:00
parent 6e287cdfb6
commit 3b6325d914
2 changed files with 121 additions and 6 deletions

View File

@ -1,19 +1,25 @@
PROJECTS = baseframe batcvr dispbase dispshell kbd lcdframe
PARTS = baseframe batcvr dispbase dispshell kbd lcdframe
.PHONY: run pov clean
.SUFFIXES: .sfy .inc
.PHONY: run pov ben clean
run: $(NAME).sfy
./solidify $(NAME).sfy
$(NAME).inc: $(NAME).sfy
./solidify -p $(NAME).sfy
.sfy.inc:
./solidify -p $<
pov: $(NAME).pov $(NAME).inc
povray +A +P -W1280 -H900 $(NAME).pov
ben: ben.pov $(PARTS:%=%.inc)
povray +A +P -W1280 -H900 ben.pov
# povray +A +P -W640 -H480 ben.pov
$(NAME).pov: template.pov
sed 's/NAME/$(NAME)/' template.pov >$@ || { rm -f $@; exit 1; }
clean:
rm -f $(PROJECTS:%=%.inc) $(PROJECTS:%=%.pov) *.pgm
rm -f $(PROJECTS:%=%.png)
rm -f $(PARTS:%=%.inc) $(PARTS:%=%.pov) *.pgm
rm -f $(PARTS:%=%.png)

109
sfy/ben.pov Normal file
View File

@ -0,0 +1,109 @@
#include "colors.inc"
#include "dispshell.inc"
#include "dispbase.inc"
/* lcdpcb */
/* lcd */
#include "lcdframe.inc"
/* screen */
#include "baseframe.inc"
#include "kbd.inc"
/* pcb */
/* bottom */
/* battery */
#include "batcvr.inc"
/*
* POV-Ray defaults to a "camera" coordinate system that can be confusing.
* We use a traditional mathematical/engineering view, with a view from
* X-/Y-/Z+ into the X/Y plane.
*/
camera {
location <30, -150, 90>
look_at <0, 20, 20>
sky z
right -4/3*x
}
background { color White }
light_source {
<-200, -300, 200>
color White
}
light_source {
<100, -500, 50>
color White
}
/*
* Mark the coordinate axes:
* - a red unit sphere at the center
* - three green spheres at x = 10*i
* - two blue spheres at y = 10*i
* - one yellow sphere at z = 10
*/
#declare Finish = finish {
brilliance 2
phong 0.8
phong_size 100
metallic
ambient 0.5
}
object {
Part_dispshell
pigment { rgb <0.8, 0.8, 0.8> }
finish { Finish }
rotate <0, 0, 180>
translate <0, 0, 80>
}
object {
Part_dispbase
pigment { rgb <0.25, 0, 0.75> }
finish { Finish }
rotate <0, 0, 180>
translate <0, 0, 70>
}
/* lcdpcb 60 <0.5, 0. 0.5> */
/* lcd 50 <1, 0, 0> */
object {
Part_lcdframe
pigment { rgb <0.75, 0, 0.25> }
finish { Finish }
rotate <180, 0, 0>
translate <0, 0, 40>
}
/* screen 30 <1, 0, 0> */
object {
Part_baseframe
pigment { rgb <0.5, 0.5, 0> }
finish { Finish }
translate <0, 0, 20>
}
object {
Part_kbd
pigment { rgb <0, 1, 0> }
finish { Finish }
translate <0, 0, 10>
}
/* pcb 0 <0, 0.75, 0.25> */
/* bottom -10 <0, 0.5, 0.5> */
/* battery -20 <0, 0.25, 0.75> */
object {
Part_batcvr
pigment { rgb <0, 0, 1> }
finish { Finish }
rotate <180, 0, 0>
translate <0, 0, -30>
}