|
|
I'm making a lamp post with a light_source but cannot get past the error...
"light source must be defined using new syntax" Any tips?
// Persistence of Vision Ray Tracer Scene Description File
// File: ?.pov
// Vers: 3.5
// Desc: Basic Scene Example
// Date: mm/dd/yy
// Auth: ?
//
#version 3.5;
#include "colors.inc"
#include "golds.inc"
#include "metals.inc"
#include "math.inc"
#include "textures.inc"
global_settings {
assumed_gamma 1.0
}
// ----------------------------------------
camera {
location <0.0, 80, -25>
look_at <0.0,72, 0.0>
}
sky_sphere {
pigment {
gradient y
color_map {
[0.3 rgb <1,1,1>]
[0.7 rgb <0,0,0>]
}
}
}
plane {
y, -1
pigment { color rgb <0.7,0.5,0.3> }
}
#declare postradius=2;
#declare postheight=60;
#declare crossradius=.5;
#declare crosslength=12;
#declare crossheight=48;
#declare crossballradius=1;
#declare headsidewidthtop=10;
#declare headsidewidthbottom=6;
#declare headheight=12;
#declare headbasewidth=5;
#declare headtopwidth=9;
#declare headbasethickness=.25;
#declare glassthickness=.25;
#declare sideframewidth=.5;
#declare sideframethickness=.06;
#declare crossball=sphere {<0,0,0>,crossballradius
texture {T_Brass_1A }
}
#declare post=cylinder{<0,0,0><0,postheight,0>postradius
texture {
pigment {color Black}
finish {F_MetalA }
}
}
#declare cross=cylinder
{<-crosslength/2,crossheight,0><crosslength/2,crossheight,0>crossradius
texture {
pigment {color Black}
finish {F_MetalA }
}
}
#declare Lightbulb = union {
merge {
sphere { <0,0,0>,1 }
cylinder {
<0,0,1>, <0,0,0>, 1
scale <0.35, 0.35, 1.0>
translate 0.5*z
}
texture {
pigment {color rgb <1, 1, 1>}
finish {ambient .8 diffuse .6}
}
}
cylinder {
<0,0,1>, <0,0,0>, 1
scale <0.4, 0.4, 0.5>
texture { Brass_Texture }
translate 1.5*z
}
rotate -90*x
scale .5
}
#declare headside=union{
#declare a=(headtopwidth-headbasewidth)/2;
#declare b=headheight;
polygon { 10
<-headbasewidth/2,0><headbasewidth/2,0><headtopwidth/2,headheight><-headtopwidth/2,headheight><-headbasewidth/2,0>
<(-headbasewidth/2)+sideframewidth,sideframewidth><(headbasewidth/2)-sideframewidth,sideframewidth>
<(headtopwidth/2)-sideframewidth,headheight-sideframewidth><(-headtopwidth/2)+sideframewidth,headheight-sideframewidth>
<(-headbasewidth/2)+sideframewidth,sideframewidth>
}
rotate x*atan2d(a,b)
}
#declare lamphead=union{
box
{<-headbasewidth/2,0,-headbasewidth/2><headbasewidth/2,headbasethickness,headbasewidth/2>}
//base
object {headside rotate y*0 translate z*headbasewidth/2}
object {headside rotate y*90 translate x*headbasewidth/2}
object {headside rotate y*180 translate z*-headbasewidth/2}
object {headside rotate y*270 translate x*-headbasewidth/2}
texture {
pigment {color Black}
finish {F_MetalA }
}
light_source {
<0, 0, 0>
color White
looks_like { Lightbulb }
}
}
#declare lamppost=union {
object {post}
object {lamphead translate y*postheight}
object {cross}
object {crossball translate <-crosslength/2,crossheight,0>}
object {crossball translate <crosslength/2,crossheight,0>}
}
object {lamppost}
Post a reply to this message
|
|