This is the include file for "VSI.pov" and requires "Housing.inc," as well. This code is specific to the MegaPov patch, though modifying it to work with the official release of POV would not be difficult. This code could easily be modified to parse and render faster (though only a tad bit faster). Enjoy!
[source]
//VSI.inc -- GrimDude
//Vertical Speed Indicator; P-51D/K
#version unofficial MegaPov 0.7;
#declare Painted = texture { pigment { color rgb <1,1,.7> } finish { ambient 0 diffuse 1 }
normal { bumps 3 scale .0025 scale <50,.1,.015> } }
#declare Center = box { <-.05,-.02,-.001>,<.075,.02,0> texture { Painted } translate -.8*x }
#declare Thousands = box { <-.05,-.015,-.001>,<.075,.015,0> texture { Painted } translate -.8*x }
#declare FiveHundreds = box { <-.05,-.01,-.001>,<.05,.01,0> texture { Painted } translate -.8*x }
#declare Hundreds = box { <-.03,-.005,-.001>,<.03,.005,0> texture { Painted } translate -.8*x }
#declare HundredCount = 0;
#declare GaugeHundreds = union {
#while (HundredCount < 40)
#if (mod(HundredCount,5) = 0)
#declare HundredCount = HundredCount + 4;
#else
object { Hundreds rotate (-HundredCount)*z }
object { Hundreds rotate HundredCount*z }
#declare HundredCount = HundredCount + 4;
#end
#end }
#declare DialReadings = union {
text { ttf "Arial.ttf" ".5" .015,0 translate <-.5,-.5,-.01> scale .0775 rotate 20*z translate -.7*x rotate -20*z
texture { Painted } }
text { ttf "Arial.ttf" "0" .015,0 translate <-.25,-.25,-.01> scale .2 translate -.6*x
texture { Painted } }
text { ttf "Arial.ttf" "1" .015,0 translate <-.25,-.25,-.01> scale .2 rotate 40*z translate -.6*x rotate -40*z
texture { Painted } }
text { ttf "Arial.ttf" "2" .015,0 translate <-.25,-.25,-.01> scale .2 rotate 75*z translate -.6*x rotate -75*z
texture { Painted } }
text { ttf "Arial.ttf" "4" .015,0 translate <-.25,-.25,-.01> scale .2 rotate 130*z translate -.6*x rotate -130*z
texture { Painted } }
text { ttf "Arial.ttf" "6" .015,0 translate <-.25,-.25,-.01> scale .2 rotate 180*z translate -.6*x rotate -180*z
texture { Painted } }
text { ttf "Arial.ttf" ".5" .015,0 translate <-.25,-.5,-.01> scale .0775 rotate -20*z translate -.7*x rotate 20*z
texture { Painted } }
text { ttf "Arial.ttf" "1" .015,0 translate <-.25,-.5,-.01> scale .2 rotate -40*z translate -.6*x rotate 40*z
texture { Painted } }
text { ttf "Arial.ttf" "2" .015,0 translate <-.25,-.25,-.01> scale .2 rotate -75*z translate -.6*x rotate 75*z
texture { Painted } }
text { ttf "Arial.ttf" "4" .015,0 translate <-.25,-.25,-.01> scale .2 rotate -130*z translate -.6*x rotate 130*z
texture { Painted } }
}
#declare VSINeedle = union {
difference {
union {
box { <-.025,-.3,-.025>,<.025,.7,.025> }
triangle { <-.025,.7,-.025>,<0,.75,0>,<.025,.7,-.025> }
triangle { <-.025,.7,-.025>,<0,.75,0>,<-.025,.7,.025> }
triangle { <-.025,.7,.025>,<0,.75,0>,<.025,.7,.025> }
triangle { <.025,.7,-.025>,<0,.75,0>,<.025,.7,.025> }
texture { gradient y
texture_map {
[0 pigment { color rgb .03 } finish { ambient 0 diffuse .6 phong .05 phong_size 100 } ]
[.25 pigment { color rgb .03 } finish { ambient 0 diffuse .6 phong .05 phong_size 100 } ]
[.251 pigment { color rgb <1,1,.9> } finish { ambient 0 diffuse .8 phong .05 phong_size 100 specular .4 reflection_min .025 reflection_max .03 } ]
[1 pigment { color rgb <1,1,.9> } finish { ambient 0 diffuse .8 phong .05 phong_size 100 specular .4 reflection_min .025 reflection_max .03 } ] }
translate -.25*y }
rotate <0,45,90> scale <1,1,.1> translate -.002*z }
cylinder { <0,0,-.1>,<0,0,-.002>,.0225 texture { pigment { color rgb -.3 } finish { ambient 0 diffuse 1 } } } }
difference {
cylinder { <0,0,-.027>,<0,0,0>,.02225 }
box { <-.005,-.1,-.1>,<.005,.1,-.0145> }
texture { pigment { color rgb .06 } finish { ambient 0 diffuse .6 phong .05 phong_size 100 } } rotate -37*z } }
#declare VSILens = intersection {
difference {
sphere { 0,.99 }
sphere { 0,.989 } scale <1,1,.01> }
box { <-1,-1,-1>,<1,1,0> }
texture { pigment { color rgbt <.95,.95,.95,.95> }
finish { ambient 0 diffuse 0 reflection .0175 roughness .0005 phong .00045 phong_size 200 specular .9 } }
interior { ior 1.5 } }
#declare VSI = union {
union {
object { Thousands rotate 40*z }
object { Thousands rotate -40*z }
object { FiveHundreds rotate 20*z }
object { FiveHundreds rotate -20*z }
object { FiveHundreds rotate -57.5*z } // 1.5k ft/min
object { Thousands rotate -75*z } // 2k ft/min
object { FiveHundreds rotate 57.5*z } // 1.5k ft/min
object { Thousands rotate 75*z } // 2k ft/min
object { FiveHundreds rotate -90*z } // 2.5k ft/min
object { Thousands rotate -105*z } // 3k ft/min
object { FiveHundreds rotate 90*z } // 2.5k ft/min
object { Thousands rotate 105*z } // 3k ft/min
object { FiveHundreds rotate -117.5*z } // 3.5k ft/min
object { Thousands rotate -130*z } // 4k ft/min
object { FiveHundreds rotate 117.5*z } // 3.5k ft/min
object { Thousands rotate 130*z } // 4k ft/min
object { FiveHundreds rotate -140*z } // 4.5k ft/min
object { Thousands rotate -150*z } // 5k ft/min
object { FiveHundreds rotate 140*z } // 4.5k ft/min
object { Thousands rotate 150*z } // 5k ft/min
object { FiveHundreds rotate -157.5*z } // 5.5k ft/min
object { Thousands rotate -165*z } // 6k ft/min
object { FiveHundreds rotate 157.5*z } // 5.5k ft/min
object { Thousands rotate 165*z } // 6k ft/min
object { Center }
object { GaugeHundreds }
object { DialReadings }
object { VSINeedle }
object { VSILens translate -.05*z }
object { text { ttf "Arial.ttf" "UP" .015,0 } texture { Painted } translate <-.25,-.5,-.01> scale <.04,.05,.01> translate <-.62,.15,-.01> }
object { text { ttf "Arial.ttf" "DOWN" .015,0 } texture { Painted } translate <-.75,-.5,-.01> scale <.04,.05,.01> translate <-.62,-.15,-.01> }
object { text { ttf "Arial.ttf" ")" .015,0 } texture { Painted } translate <-.25,-.25,-.01> scale <.2,.45,.01> translate <.8,0,-.001> }
object { text { ttf "ARIBLK" "POV-AIRE" .015,0 } texture { Painted } translate <-3,-.5,-.01> scale <.0625,.05,1> translate <0,-.25,-.01> }
object { text { ttf "ARIBLK.ttf" "CLIMB" .015,0 } texture { Painted } translate <-1.5,-.5,-.01> scale <.125,.055,1> translate <0,.2,-.01> }
object { text { ttf "ARIBLK.ttf" "THOUSANDS FT PER MIN" .015,0 } texture { Painted } translate <-6,-.5,-.01> scale <.045,.035,1> translate <0,.1,-.01> }
object { cylinder { <0,0,.051>,<0,0,.052>,.975 } texture { pigment { color rgb 0 } finish { ambient 0 diffuse 0 } } }
translate .05*z }
object { GaugeHousing } }
[/source]
------------------
***-*-