Ben NanoNote 3D scans
Sign in or create your account | Project List | Help
Ben NanoNote 3D scans Commit Details
Date: | 2010-09-27 07:46:54 (12 years 11 months ago) |
---|---|
Author: | Werner Almesberger |
Commit: | 6e287cdfb6dd7d27e47c7dc40658e4fd24064cdc |
Message: | 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 |
Files: |
sfy/Makefile (1 diff) sfy/solidify (1 diff) sfy/template.pov (1 diff) |
Change Details
sfy/Makefile | ||
---|---|---|
1 | PROJECTS = baseframe batcvr dispbase dispshell kbd lcdframe | |
2 | ||
3 | .PHONY: run pov clean | |
4 | ||
5 | run: $(NAME).sfy | |
6 | ./solidify $(NAME).sfy | |
7 | ||
8 | $(NAME).inc: $(NAME).sfy | |
9 | ./solidify -p $(NAME).sfy | |
10 | ||
11 | pov: $(NAME).pov $(NAME).inc | |
12 | povray +A +P -W1280 -H900 $(NAME).pov | |
13 | ||
14 | $(NAME).pov: template.pov | |
15 | sed 's/NAME/$(NAME)/' template.pov >$@ || { rm -f $@; exit 1; } | |
16 | ||
17 | clean: | |
18 | rm -f $(PROJECTS:%=%.inc) $(PROJECTS:%=%.pov) *.pgm | |
19 | rm -f $(PROJECTS:%=%.png) |
sfy/solidify | ||
---|---|---|
1 | #!/bin/sh | |
2 | if [ ! -z "$SOLIDIFY_AGAIN" ]; then | |
3 | echo "$0: found only myself" 2>&1 | |
4 | exit 1 | |
5 | fi | |
6 | export SOLIDIFY_AGAIN=1 | |
7 | PATH=../../cae-tools/solidify:$PATH | |
8 | exec solidify "$@" |
sfy/template.pov | ||
---|---|---|
1 | #include "colors.inc" | |
2 | #include "NAME.inc" | |
3 | ||
4 | /* | |
5 | * POV-Ray defaults to a "camera" coordinate system that can be confusing. | |
6 | * We use a traditional mathematical/engineering view, with a view from | |
7 | * X-/Y-/Z+ into the X/Y plane. | |
8 | */ | |
9 | ||
10 | camera { | |
11 | location <-30, -80, 40> | |
12 | look_at <20, 20, 0> | |
13 | sky z | |
14 | right -4/3*x | |
15 | } | |
16 | ||
17 | background { color White } | |
18 | ||
19 | light_source { | |
20 | <-200, -300, 200> | |
21 | color White | |
22 | } | |
23 | ||
24 | light_source { | |
25 | <100, -500, -50> | |
26 | color White | |
27 | } | |
28 | ||
29 | /* | |
30 | * Mark the coordinate axes: | |
31 | * - a red unit sphere at the center | |
32 | * - three green spheres at x = 10*i | |
33 | * - two blue spheres at y = 10*i | |
34 | * - one yellow sphere at z = 10 | |
35 | */ | |
36 | ||
37 | sphere { < 0, 0, 0>, 1 pigment { color Red } } | |
38 | sphere { <10, 0, 0>, 1 pigment { color Green } } | |
39 | sphere { <20, 0, 0>, 1 pigment { color Green } } | |
40 | sphere { <30, 0, 0>, 1 pigment { color Green } } | |
41 | sphere { < 0, 10, 0>, 1 pigment { color Blue } } | |
42 | sphere { < 0, 20, 0>, 1 pigment { color Blue } } | |
43 | sphere { < 0, 0, 10>, 1 pigment { color Yellow } } | |
44 | ||
45 | #declare Finish = finish { | |
46 | brilliance 2 | |
47 | phong 0.8 | |
48 | phong_size 100 | |
49 | metallic | |
50 | ambient 0.2 | |
51 | } | |
52 | ||
53 | object { | |
54 | Part_NAME | |
55 | pigment { rgbf <0.9, 0.9, 0.9, 0.2> } | |
56 | finish { Finish } | |
57 | rotate <0, 0, 30> | |
58 | } | |
59 | ||
60 | object { | |
61 | Part_NAME | |
62 | pigment { rgbf <1, 0.8, 0.8, 0.2> } | |
63 | finish { Finish } | |
64 | translate <0, 0, 25> | |
65 | rotate <0, 20, 80> | |
66 | } | |
67 | ||
68 | object { | |
69 | Part_NAME | |
70 | pigment { rgbf <0.8, 1, 1, 0.2> } | |
71 | finish { Finish } | |
72 | rotate <180, 0, 0> | |
73 | translate <0, 0, 13> | |
74 | rotate <0, 10, -140> | |
75 | translate <60, 0, 0> | |
76 | } | |
77 | ||
78 | object { | |
79 | box { <-50, -50, -0.1> <0, 0, 0.1> } | |
80 | pigment { rgb <1, 0.5, 0.5> } | |
81 | finish { ambient rgb <1, 0, 0> } | |
82 | } |
Branches:
master