From: Joshua Grams Date: Mon, 4 Apr 2005 19:53:21 +0000 (+0000) Subject: POV-Ray ship -- somehow collision detection still seems to work X-Git-Tag: 0.1~14 X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=commitdiff_plain;h=794983bc2921a8ffe9f507b2b2fc4bec08390f45;ds=sidebyside POV-Ray ship -- somehow collision detection still seems to work --- diff --git a/Makefile b/Makefile index 3f06d1e..6a9e40d 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ INSTALL_DATA = $(INSTALL) -m 644 DATA_PREFIX = /usr/share/vor PROGRAM_PREFIX = /usr/games/bin -all: vor +all: vor data/sprites/ship.png %.o: %.c $(CC) $(cflags) -c -o $@ $< @@ -42,8 +42,12 @@ main.o file.o: file.h vor: $(objects) $(CC) $(ldflags) -o $@ $^ $(LIBRARIES) +data/sprites/ship.png: ship.pov + povray -GA -D +A +UA +W32 +H24 ship.pov >/dev/null 2>/dev/null + mv ship.png data/sprites/ + clean: - rm -f *.o vor + rm -f *.o vor data/sprites/ship.png install: all if [ ! -d $(DATA_PREFIX) ]; then mkdir $(DATA_PREFIX); fi diff --git a/data/sprites/ship.png b/data/sprites/ship.png deleted file mode 100644 index be23002..0000000 Binary files a/data/sprites/ship.png and /dev/null differ diff --git a/oldship.png b/oldship.png new file mode 100644 index 0000000..be23002 Binary files /dev/null and b/oldship.png differ diff --git a/ship.pov b/ship.pov new file mode 100644 index 0000000..96e30ed --- /dev/null +++ b/ship.pov @@ -0,0 +1,75 @@ +#include "colors.inc" +#include "metals.inc" + +#ifndef(xr) + #declare xr = 0; +#end + +#ifndef(yr) + #declare yr = 0; +#end + +#declare r = 2.0; +#declare r2 = 2.01; +#declare cr = 1/16; + +camera { + up <0, 1, 0> + right <1, 0, 0> + location <0, 0, -r/sin(radians(15))> + angle 30 + look_at <0, 0, 0> +} +light_source { <-500, 500, -700> White } + +#declare xring = intersection { + difference { + sphere { 0, r } + sphere { 0, r-cr } + } + box { <-0.25, -r2, -r2>, <0.25, r2, r2> } +} + +#declare yring = intersection { + difference { + sphere { 0, r } + sphere { 0, r-cr } + } + box { <-r2, -0.25, -r2>, } +} + +#declare zring = intersection { + difference { + sphere { 0, r } + sphere { 0, r-cr } + } + box { <-r2, -r2, -0.25>, } +} + + +union { + sphere { 0, r-0.1 } + intersection { + sphere { 0, r-0.09 } + box { <0, 0, -r2>, } + pigment { rgbf < 0.5, 0.75, 0.5, 0.6 > } + } + object { xring } + object { yring } + texture { + pigment { rgb < 0.75, 0.75, 1.0 > } + finish { + ambient 0.35 + brilliance 2 + diffuse 0.3 + metallic + specular 0.6 + roughness 1/60 + reflection 0.25 + } + normal { bumps 0.1 scale 0.25 } + } + + rotate + rotate <0, yr*360/32, 0> +}