From 5a4f3ecabf6d315fd68a3ab49d307235ee199f0b Mon Sep 17 00:00:00 2001 From: Martin Thoma Date: Thu, 30 Aug 2012 22:45:46 +0200 Subject: [PATCH] added axis to the ellipsoid --- README.md | 1 + povray/ellipsoid/Makefile | 17 ------ povray/ellipsoid/ellipsoid.pov | 105 ++++++++++++++++++++++++++++++--- 3 files changed, 99 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 3588e5b..8306ab4 100644 --- a/README.md +++ b/README.md @@ -29,3 +29,4 @@ some images here * [Ubuntuusers.de](http://wiki.ubuntuusers.de/POV-Ray) - German installation instructions * [Many examples](http://www.f-lohmueller.de/) * [More examples with complete sources](http://www.ms.uky.edu/~lee/visual05/povray/povray.html) +* [High quality examples](http://hof.povray.org/) diff --git a/povray/ellipsoid/Makefile b/povray/ellipsoid/Makefile index d478262..ae3c26c 100644 --- a/povray/ellipsoid/Makefile +++ b/povray/ellipsoid/Makefile @@ -11,22 +11,5 @@ make: clean: rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot -gif: - pdfcrop $(SOURCE).pdf - convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif - make clean - png: make - make svg - inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png - -transparentGif: - convert $(SOURCE).pdf -transparent white result.gif - make clean - -svg: - #inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg - pdf2svg $(SOURCE).pdf $(SOURCE).svg - # Necessary, as pdf2svg does not always create valid svgs: - inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg diff --git a/povray/ellipsoid/ellipsoid.pov b/povray/ellipsoid/ellipsoid.pov index cde1901..ebb619c 100644 --- a/povray/ellipsoid/ellipsoid.pov +++ b/povray/ellipsoid/ellipsoid.pov @@ -1,24 +1,115 @@ +#version 3.5; #include "colors.inc" -#include "stones.inc" // needed for texture T_Stone1 +#include "glass.inc" camera { - location <10, 10, 0> + location <14, 8, 0> look_at <0, 0, 0> } plane { - y, 0 + y, -4 pigment { checker color Gray color White } } sphere { - <0, 0, 0>, 4 // center and radius + <0, 0, 0>, // center of the spehre + 4 // radius scale<1,1,1.4> - pigment { color Green transmit 0.5 } + material { M_Glass } + photons { // photon block for an object + target 1.0 + refraction on + reflection on + } finish { - reflection 0.1 - phong 0.3 + reflection 0.2 // glass reflects a bit + phong 0.9 phong_size 40 // a highlight } } + +#declare Axis_texture = // +pigment { + gradient <1,0,0> + color_map {[0.0 color <1,1,1>] + [0.5 color <1,1,1>] + [0.5 color <1,0,0>] + [1.0 color <1,0,0>] + } + scale 2 +} + + +#declare Diameter = 0.1; +#declare LengthX = 5; +#declare LengthY = 8; +#declare LengthZ = 5; +#declare axisY = // +union { + cylinder { + <0, 0, 0>, , Diameter + } + cone { , Diameter * 2, , 0 } + texture { Axis_texture} + finish {ambient 0.1 diffuse 0.9 phong 1} +} +#declare axis = // +union { + cylinder { + <0, 0, 0>, , Diameter + } + cone { , Diameter * 2, , 0 } + texture { Axis_texture} + finish {ambient 0.1 diffuse 0.9 phong 1} +} + +declare XYZ_axis = // +union { + text { + ttf "crystal.ttf", + "0", + .1, + 0 scale 0.5 + pigment{color<1,1,0>} + } + union { + object {axis} + text { + ttf "crystal.ttf", + "X", + .1, + 0 scale 0.5 + pigment{color<1,1,0> } + translate + } + } + union { + object {axisY} + text { + ttf "crystal.ttf", + "Y", + .1, + 0 scale 0.5 + pigment{color<1,1,0>} + translate + } + rotate <0,90,0> + } + union { + object {axis } + text { ttf "crystal.ttf", "Z", .1, 0 + rotate <0,0,-90> + scale 0.5 + pigment{color<1,1,0>} + translate + } + rotate <0,0,90> + } +} + +object {XYZ_axis} + +// this should surround the elipsoid: box {<-1, -1, -1> < 1, 1, 1>} + light_source { <5, 10, 10> color White } light_source { <10, 10, 5> color White }