diff --git a/pr/tfk/Makefile b/pr/tfk/Makefile new file mode 100644 index 0000000..523f8f1 --- /dev/null +++ b/pr/tfk/Makefile @@ -0,0 +1,34 @@ +# what's where? +POVHOME=/usr/local/povray3 +POVBIN=$(POVHOME)/bin +POVINC=$(POVHOME)/include +POVRAY=$(POVBIN)/x-povray + +# image +WIDTH=400 +HEIGHT=300 + +%.ppm: %.pov + $(POVRAY) +W$(WIDTH) +H$(HEIGHT) +V -I$< +L$(POVINC) +Q5 +D +FP + +dgk-hangar.ppm: \ + dgk-hangar.pov \ + dgk.pov \ + maindecks.pov \ + strut.pov \ + ring.pov \ + guns.pov \ + tfk.pov \ + hangar.pov \ + hangars.pov \ + name.gif \ + Makefile + +%.pov: make% + $< > $@ + +dgk.ppm: +test-ring.ppm: test-ring.pov ring.pov +test-hangar.ppm: test-hangar.pov hangar.pov +test-tfk.ppm: test-tfk.pov tfk.pov +test-struts.ppm: test-struts.pov dgk.pov diff --git a/pr/tfk/maketfk b/pr/tfk/maketfk new file mode 100755 index 0000000..e2d9fc1 --- /dev/null +++ b/pr/tfk/maketfk @@ -0,0 +1,104 @@ +#!/usr/bin/perl + +# Eine Transformkanone: +# +# Ich stimme mit Rudolf Zengerle überein, daß sie eine Spirale +# um den Lauf haben sollte, weil das schaut cool aus. +# Der Rest gefällt mir aber nicht so, den mache ich anders: +# Der eigentliche Lauf besteht aus fünf Stäben mit einem Ring +# vornedrauf. +# Das ganze ist auf einer großen Kugel montiert, die Magazin, +# Energieanlagen und Platz für einen menschlichen Gunner enthält. +# Kugel deswegen, weil sich die in jeder Lage montieren läßt. + +# 1: Keine Spirale: +# 2: Spirale nur aus Cones zusammengesetzt +# 3: Lücken mit Kugeln aufgefüllt +$detail = 3; + +# Lauf: +print "#declare TFK_Lauf = \n"; +print "\tunion {\n"; + +# Führungsstäbe Lauf: +$rlauf = 5; +$rfs = 2; + +$pi = atan2(1, 1) * 4; +for ($a = 0; $a < 2*$pi; $a += 2*$pi/5) { + $x = sin($a) * $rlauf; + $y = cos($a) * $rlauf; + print "\t\tcone {<$x, $y, 0>, $rfs, <$x, $y, 50>, $rfs\n"; + print "\t\t\ttexture {\n"; + print "\t\t\t\tpigment {color <0.7, 0.7, 1.0>}\n"; + print "\t\t\t\tfinish {phong 1.0 metallic}\n"; + print "\t\t\t}\n"; + print "\t\t}\n"; +} + +# Spirale Lauf: + +if ($detail > 1) { + $step = 2*$pi/30; + for ($a = 0, $n = 0; $a < 55; $a += $step, $n++) { + $x1 = sin($a-$step) * ($rlauf + $rfs); + $y1 = cos($a-$step) * ($rlauf + $rfs); + $x2 = sin($a) * ($rlauf + $rfs); + $y2 = cos($a) * ($rlauf + $rfs); + if ($n % 2) { + $color = "<1, 0, 0>" + } else { + $color = "<1, 1, 0>" + } + print "\t\tcone {\n"; + print "\t\t\t<$x1, $y1, $a-$step>, 1, <$x2, $y2, $a>, 1\n"; + print "\t\t\ttexture {pigment {color $color}\n"; + print "\t\t\t\tfinish {phong 1.0}\n"; + print "\t\t\t}\n"; + print "\t\t}\n"; + if ($detail > 2) { + print "\t\tsphere {\n"; + print "\t\t\t<$x2, $y2, $a>, 1\n"; + print "\t\t\ttexture {pigment {color $color}}\n"; + print "\t\t}\n"; + } + } +} + +# Abstrahlring Lauf: + +print "\t\tdifference {\n"; +print "\t\t\tunion {\n"; +print "\t\t\t\tcone {<0, 0, 50>, ($rlauf + $rfs), <0, 0, 55>, ($rlauf + 2.5*$rfs)}\n"; +print "\t\t\t\tcone {<0, 0, 65>, ($rlauf + $rfs), <0, 0, 55>, ($rlauf + 2.5*$rfs)}\n"; +print "\t\t\t}\n"; +print "\t\t\tcone {<0, 0, 49>, ($rlauf - $rfs), <0, 0, 66>, ($rlauf - $rfs)}\n"; +print "\t\t\ttexture {\n"; +print "\t\t\t\tpigment {color <0.7, 0.7, 1.0>}\n"; +print "\t\t\t\tfinish {phong 1.0}\n"; +print "\t\t\t}\n"; +print "\t\t}\n"; +print "\t}\n"; + + + + +print "#declare TFK = \n"; +print "\tunion {\n"; +# Kugel: +print "\t\tsphere { <0, 0, 0>, 25\n"; +print "\t\t\ttexture {\n"; +print "\t\t\t\tpigment {color <0.7, 0.7, 1.0>}\n"; +print "\t\t\t\tfinish {phong 1.0}\n"; +print "\t\t\t}\n"; +print "\t\t}\n"; +print "\t\tobject {TFK_Lauf translate <-($rlauf+3*$rfs), 0, 0>}\n"; +print "\t\tobject {TFK_Lauf translate <+($rlauf+3*$rfs), 0, 0>}\n"; +print "\t\tcone { <0, 11, 13>, 1, <0, 11, 16>, 2\n"; +print "\t\t\ttexture {\n"; +print "\t\t\t\tpigment {color <0.1, 0.1, 0.2>}\n"; +print "\t\t\t\tfinish {phong 1.0 metallic}\n"; +print "\t\t\t}\n"; +print "\t\t}\n"; +print "\t}\n"; + diff --git a/pr/tfk/povray.ini b/pr/tfk/povray.ini new file mode 100644 index 0000000..89e306d --- /dev/null +++ b/pr/tfk/povray.ini @@ -0,0 +1,5 @@ ++a ++fp +w400 +h300 +d1 ++l/usr/local/povray3/include ++l/home/hjp/wrk/dgk +display_gamma = 2.2 diff --git a/pr/tfk/test-tfk.pov b/pr/tfk/test-tfk.pov new file mode 100644 index 0000000..ce3104f --- /dev/null +++ b/pr/tfk/test-tfk.pov @@ -0,0 +1,31 @@ +#include "colors.inc" +#include "shapes.inc" +#include "textures.inc" +#include "stones.inc" + +global_settings { + assumed_gamma 1.0 + ambient_light rgb<0.5, 0.5, 0.5> +} +camera { + //location <-0, 100, 130> + //location <0, 0, 30> + location <0, 40, 0> + look_at <0, 0, 50> + //location <20, 17, 60> + //look_at <0, 17, 20> +} + +light_source { + <100, 100, 0> color White +} +light_source { + <0, 50, 0> color White +} + +#declare Ynkelonium_Texture = + texture {pigment {color Salmon}} + +#include "tfk.pov" +object { TFK } +