POV-Ray : Newsgroups : povray.newusers : ?? Parse Error: Keyword 'point_at' cannot be used with standard light sourc= Server Time
24 Nov 2024 07:46:30 EST (-0500)
  ?? Parse Error: Keyword 'point_at' cannot be used with standard light sourc= (Message 1 to 3 of 3)  
From: Marco
Subject: ?? Parse Error: Keyword 'point_at' cannot be used with standard light sourc=
Date: 18 Nov 2010 16:10:00
Message: <web.4ce595936e6e92f6731f09e0@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:

Parse Error: Keyword 'point_at' cannot be used with standard light source.

aI don't know how to solve this, so I'd like some help please.

Source:
#while (counter<12)
  object
 {
  hourmark
  rotate z*(counter*30)
 }
 #declare counter=counter+1;
#end

#declare fourmark=light_source
{
 <0,3.7,0>, rgb <0,0,0>
 point_at <0,0,0> SPOTLIGHT_ITEM
looks_like
{
cone
{
 <0,3.7,0>,2, <0,4.5,0>,0.5
}
}
#declare counter=0;
#while counter<4
 #declare counter=counter+1;
 object
{
 fourmark
 rotate z*(counter*30)
}
#end


Post a reply to this message

From: Hugo Arnaut
Subject: Re: ?? Parse Error: Keyword 'point_at' cannot be used with standard light sourc=
Date: 18 Nov 2010 17:41:31
Message: <op.vmd1bomkq4w9ih@whitebishop>
On Thu, 18 Nov 2010 19:07:31 -0200, Marco <rpo### [at] gmailcom> wrote:

>  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:
>
> Parse Error: Keyword 'point_at' cannot be used with standard light  
> source.
>
> aI don't know how to solve this, so I'd like some help please.

You are using a point light; a point light source irradiates equally in  
all directions and therefore the point_at keyword makes no sense. Either  
remove the point_at statement or add the spotlight keyword before it.

Regards,
Hugo.
-- 
 From a certain point onward there is no longer any turning back.
That is the point that must be reached.
Franz Kafka


Post a reply to this message

From: Alain
Subject: Re: ?? Parse Error: Keyword 'point_at' cannot be used with standard light sourc=
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.