mirror of
git://projects.qi-hardware.com/ben-scans.git
synced 2024-11-21 21:33:11 +02:00
Makefile and helper scripts for running solidify and POV-Ray.
- sfy/Makefile: shortcuts for common operations. Based on solidify/Makefile - sfy/solidify: wrapper to invoke solidify over at cae-tools - sfy/template.pov: standard scene template, from cae-tools/solidify
This commit is contained in:
parent
c00799f3c9
commit
6e287cdfb6
19
sfy/Makefile
Normal file
19
sfy/Makefile
Normal file
@ -0,0 +1,19 @@
|
||||
PROJECTS = baseframe batcvr dispbase dispshell kbd lcdframe
|
||||
|
||||
.PHONY: run pov clean
|
||||
|
||||
run: $(NAME).sfy
|
||||
./solidify $(NAME).sfy
|
||||
|
||||
$(NAME).inc: $(NAME).sfy
|
||||
./solidify -p $(NAME).sfy
|
||||
|
||||
pov: $(NAME).pov $(NAME).inc
|
||||
povray +A +P -W1280 -H900 $(NAME).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)
|
8
sfy/solidify
Executable file
8
sfy/solidify
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
if [ ! -z "$SOLIDIFY_AGAIN" ]; then
|
||||
echo "$0: found only myself" 2>&1
|
||||
exit 1
|
||||
fi
|
||||
export SOLIDIFY_AGAIN=1
|
||||
PATH=../../cae-tools/solidify:$PATH
|
||||
exec solidify "$@"
|
82
sfy/template.pov
Normal file
82
sfy/template.pov
Normal file
@ -0,0 +1,82 @@
|
||||
#include "colors.inc"
|
||||
#include "NAME.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, -80, 40>
|
||||
look_at <20, 20, 0>
|
||||
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
|
||||
*/
|
||||
|
||||
sphere { < 0, 0, 0>, 1 pigment { color Red } }
|
||||
sphere { <10, 0, 0>, 1 pigment { color Green } }
|
||||
sphere { <20, 0, 0>, 1 pigment { color Green } }
|
||||
sphere { <30, 0, 0>, 1 pigment { color Green } }
|
||||
sphere { < 0, 10, 0>, 1 pigment { color Blue } }
|
||||
sphere { < 0, 20, 0>, 1 pigment { color Blue } }
|
||||
sphere { < 0, 0, 10>, 1 pigment { color Yellow } }
|
||||
|
||||
#declare Finish = finish {
|
||||
brilliance 2
|
||||
phong 0.8
|
||||
phong_size 100
|
||||
metallic
|
||||
ambient 0.2
|
||||
}
|
||||
|
||||
object {
|
||||
Part_NAME
|
||||
pigment { rgbf <0.9, 0.9, 0.9, 0.2> }
|
||||
finish { Finish }
|
||||
rotate <0, 0, 30>
|
||||
}
|
||||
|
||||
object {
|
||||
Part_NAME
|
||||
pigment { rgbf <1, 0.8, 0.8, 0.2> }
|
||||
finish { Finish }
|
||||
translate <0, 0, 25>
|
||||
rotate <0, 20, 80>
|
||||
}
|
||||
|
||||
object {
|
||||
Part_NAME
|
||||
pigment { rgbf <0.8, 1, 1, 0.2> }
|
||||
finish { Finish }
|
||||
rotate <180, 0, 0>
|
||||
translate <0, 0, 13>
|
||||
rotate <0, 10, -140>
|
||||
translate <60, 0, 0>
|
||||
}
|
||||
|
||||
object {
|
||||
box { <-50, -50, -0.1> <0, 0, 0.1> }
|
||||
pigment { rgb <1, 0.5, 0.5> }
|
||||
finish { ambient rgb <1, 0, 0> }
|
||||
}
|
Loading…
Reference in New Issue
Block a user