POV-Ray : Newsgroups : povray.newusers : getting some existing value as a variable : Re: getting some existing value as a variable Server Time
5 Oct 2024 15:36:06 EDT (-0400)
  Re: getting some existing value as a variable  
From: clipka
Date: 3 Sep 2009 10:03:15
Message: <4a9fcca3$1@news.povray.org>
Mr schrieb:
> Say I have a light
> light_source { <x,y,z> rgb <1,1,1>*3 spotlight point_at
> <-0.281606,0.960535,-0.0901413> falloff 15 radius 12.75 fade_distance 30}
> 
> is there anything like
> #declare
> lpos = light_source.position
> that would evaluate to lpos=<x,y,z> ?

No, querying the properties of scene elements is generally not supported 
by POV-Ray's SDL.

For objects, you can get the approximate position via the min_extent() 
and max_extent() functions, which return the corners of the bounding 
box; I never tried whether this works with light sources as well, but I 
wouldn't bank on it.


Post a reply to this message

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