POV-Ray : Newsgroups : povray.newusers : ?? Parse Error: Keyword 'point_at' cannot be used with standard light sourc= : Re: ?? Parse Error: Keyword 'point_at' cannot be used with standard light sourc= Server Time
4 Jul 2024 14:35:07 EDT (-0400)
  Re: ?? Parse Error: Keyword 'point_at' cannot be used with standard light sourc=  
From: Alain
Date: 18 Nov 2010 22:17:27
Message: <4ce5ec47$1@news.povray.org>

>   So I'm making a free-floating clock (without face-background surface) And I
> wanted to have the 4 big hour markers shine light to the centre of the object,
> so I used point_at. But this yields this weird error:
>

point_at only make sense when using a spot_light, a parallel light or a 
cylindrical light.

When applyed to a point_light, it just don't make any sense.

You can use a spot_light.

You can remove the looks_like and use a regular cone with the open 
keyword to remove it's end cap and place the light_source inside it 
slightly off the summit. Or, in the case of a truncated cone, clip one 
end using clipped_by{object}

#declare Fourmark=
union{
cone{<0,3.70001,0>,2, <0,4.5,0>,0.5
//Extend the cone very slightly...
  clipped_by{box{<2,3.7,2>,<-2,4.501,-2>}}
//...and clip off the extended part
}
light_source{<0,4.4,0> rgb 1}
}
#while(Counter < 12)
object{
//use the modulo function to switch between the two marks
#if(mod(Counter/3)=0)
  Fourmark
#else
  Hourmark
#end
rotate z*(Counter*30)
}
#declare Counter = Counter +1;
#end

Some advises:

Don't #declare tour Fourmark inside the loop but before the #while.

A light_source with rgb 0, rgb<0,0,0>, is useless as it don't illuminate 
anything at all.

Good practice: Always begin user identifiers with an UPPER CASE letter.
All reserved keywords start with a lower case letter. Using an upper 
case as the first character ensure that you'll never have a conflict 
with those reserved keywords.


Alain


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.