POV-Ray : Newsgroups : povray.general : Getting the intensity of light at a point. Server Time
28 Nov 2024 09:01:40 EST (-0500)
  Getting the intensity of light at a point. (Message 1 to 9 of 9)  
From: MustardMan
Subject: Getting the intensity of light at a point.
Date: 1 May 2007 19:20:02
Message: <web.4637ca7db503a31c2a4e95f40@news.povray.org>
Hi,

I am using POVray to simulate the energy produced by solar panels at
different orientations on a roof. My simulation includes the horizon, so
the shadowing difference between summer & winter is realistic (as well as
throughout the day).

I can calculate the power generated by the panels by simply using some maths
and the Az & Al variables generated by SUNPOS. However, this does not
include shadowing caused by objects (horizon, trees, etc) - the value is
what the panels would produce if they were always illuminated.

Am I able to specify a point in the scene and get POVray to report the
amount of light reaching that point?

Cheers,
MM.


Post a reply to this message

From: William Tracy
Subject: Re: Getting the intensity of light at a point.
Date: 1 May 2007 19:50:57
Message: <4637d261$1@news.povray.org>
That would be an interesting patch to write.

As far as I know, though, that feature does not exist.

-- 
William Tracy
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|a|f|i|s|h|i|o|n|a|d|o|@|g|m|a|i|l|.|c|o|m|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|w|t|r|a|c|y|@|c|a|l|p|o|l|y|.|e|d|u|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

You know you've been raytracing too long when you think these quotes 
constitutes a violation of privacy.


Post a reply to this message

From: Samuel Benge
Subject: Re: Getting the intensity of light at a point.
Date: 1 May 2007 20:13:53
Message: <4637d7c1$1@news.povray.org>
MustardMan wrote:
> Hi,
> 
> I am using POVray to simulate the energy produced by solar panels at
> different orientations on a roof. My simulation includes the horizon, so
> the shadowing difference between summer & winter is realistic (as well as
> throughout the day).
> 
> I can calculate the power generated by the panels by simply using some maths
> and the Az & Al variables generated by SUNPOS. However, this does not
> include shadowing caused by objects (horizon, trees, etc) - the value is
> what the panels would produce if they were always illuminated.
> 
> Am I able to specify a point in the scene and get POVray to report the
> amount of light reaching that point?
> 
> Cheers,
> MM.


MustardMan,

How efficient does the panel absorb light? At what angles? How many 
points of reference will you use for your calculations? I can think of 
two ways to do what you want.

First way. You can shoot several rays (using trace()) from the camera, 
to see if a shadow is cast onto parts of the panel or not. From there 
you can get the normal of the panel's surface and calculate how much 
light would be absorbed.

The second option uses MegaPov's projection pattern. You make the 
pattern utilize a copy of the sun, and test the resulting pigment with 
eval_pigment. These tests would be averaged together to achieve an 
approximation of how much solar energy is absorbed per-panel. This won't 
take surface normals into consideration, though.

Just some ideas. With any luck they made sense. Hope you succeed!

~Sam


Post a reply to this message

From: MustardMan
Subject: Re: Getting the intensity of light at a point.
Date: 2 May 2007 20:10:02
Message: <web.4639276d1bad02ca2a4e95f40@news.povray.org>
Samuel Benge <stb### [at] hotmailcom> wrote:
>
> MustardMan,
>
> How efficient does the panel absorb light? At what angles? How many
> points of reference will you use for your calculations? I can think of
> two ways to do what you want.
>
> First way. You can shoot several rays (using trace()) from the camera,
> to see if a shadow is cast onto parts of the panel or not. From there
> you can get the normal of the panel's surface and calculate how much
> light would be absorbed.
>
> The second option uses MegaPov's projection pattern. You make the
> pattern utilize a copy of the sun, and test the resulting pigment with
> eval_pigment. These tests would be averaged together to achieve an
> approximation of how much solar energy is absorbed per-panel. This won't
> take surface normals into consideration, though.
>
> Just some ideas. With any luck they made sense. Hope you succeed!
>
> ~Sam

Hi Sam,
Solar panels conversion ability is about 17% best case. What I have done for
my simulation is to specify an orientation angle (Pt) and using Az and Al
from SUNPOS, use the (simplified) calculation cos(Al-Pt)*cos(Az). This
gives the efficiency as a 'percentage' of the maximum available power [ie.
0 to 1].

The result can be negative (the sun is behind the panels for a short time in
the summer). I am outputting the percentage to a file for later integration,
but the "problem" I have is that the calculation I am doing does not take
the shadowing of objects into consideration, hence I have to manually look
at the scene, decide if the panels are in shade, and make sure I only
integrate over the corresponding time period. If a shadow from a tree (for
example) passes in front of the panels, I have to note this time and make
sure these times are excluded from calculation.

What I would like to do is to get POVray to output another variable to the
file which tells me if a point (on one or more panels) is in shade. Then
the integrating program can calculate merrily away, and I don't have to
worry about shadowing at inconvienient times!

Thanks,
MM.


Post a reply to this message

From: Charles C
Subject: Re: Getting the intensity of light at a point.
Date: 2 May 2007 20:55:01
Message: <web.463932731bad02ca704594a90@news.povray.org>
"MustardMan" <nomail@nomail> wrote:
> Samuel Benge <stb### [at] hotmailcom> wrote:
> >
> > MustardMan,
> >
> > How efficient does the panel absorb light? At what angles? How many
> > points of reference will you use for your calculations? I can think of
> > two ways to do what you want.
> >
> > First way. You can shoot several rays (using trace()) from the camera,
> > to see if a shadow is cast onto parts of the panel or not. From there
> > you can get the normal of the panel's surface and calculate how much
> > light would be absorbed.
> >
> > The second option uses MegaPov's projection pattern. You make the
> > pattern utilize a copy of the sun, and test the resulting pigment with
> > eval_pigment. These tests would be averaged together to achieve an
> > approximation of how much solar energy is absorbed per-panel. This won't
> > take surface normals into consideration, though.
> >
> > Just some ideas. With any luck they made sense. Hope you succeed!
> >
> > ~Sam
>
> Hi Sam,
> Solar panels conversion ability is about 17% best case. What I have done for
> my simulation is to specify an orientation angle (Pt) and using Az and Al
> from SUNPOS, use the (simplified) calculation cos(Al-Pt)*cos(Az). This
> gives the efficiency as a 'percentage' of the maximum available power [ie.
> 0 to 1].
>
> The result can be negative (the sun is behind the panels for a short time in
> the summer). I am outputting the percentage to a file for later integration,
> but the "problem" I have is that the calculation I am doing does not take
> the shadowing of objects into consideration, hence I have to manually look
> at the scene, decide if the panels are in shade, and make sure I only
> integrate over the corresponding time period. If a shadow from a tree (for
> example) passes in front of the panels, I have to note this time and make
> sure these times are excluded from calculation.
>
> What I would like to do is to get POVray to output another variable to the
> file which tells me if a point (on one or more panels) is in shade. Then
> the integrating program can calculate merrily away, and I don't have to
> worry about shadowing at inconvienient times!
>
> Thanks,
> MM.


Here are a couple more ideas:

Align orthographic cameras up to all-white, ambient 0 versions of each of
the panels.  Animate over time for each panel.  Pull those images back in
by frame number to define a pigment in another animation* and then use
eval_pigment to sample.  Be carefull about gamma.  With the correct finish
settings, I wonder if this might even work to get each panel's average
intensity and then sum it all up inside SDL.


Define an array of points on the surface of each panel.   From each of these
points shoot a ray towards the sun, with the [OBJECT_IDENTIFIER] being a
union of everything that might cast a shadow on the panel.

*no real output intended for this one...  This anim would be for your file
i/o.

Charles


Post a reply to this message

From: Grassblade
Subject: Re: Getting the intensity of light at a point.
Date: 3 May 2007 06:40:02
Message: <web.4639bbc01bad02ca6955f970@news.povray.org>
"MustardMan" <nomail@nomail> wrote:
> Hi,
>
> I am using POVray to simulate the energy produced by solar panels at
> different orientations on a roof. My simulation includes the horizon, so
> the shadowing difference between summer & winter is realistic (as well as
> throughout the day).
>
> I can calculate the power generated by the panels by simply using some maths
> and the Az & Al variables generated by SUNPOS. However, this does not
> include shadowing caused by objects (horizon, trees, etc) - the value is
> what the panels would produce if they were always illuminated.
>
> Am I able to specify a point in the scene and get POVray to report the
> amount of light reaching that point?
>
> Cheers,
> MM.
In six months the sun appears to move at dawn from south to north. The area
covered by the sun in those six months is more or less an inclined band
that you can simulate by intersecting a sphere with an equivalently
inclined cylinder. You can get the cylinder thickness in Sunpos.inc, by
determining the hour of dawn on winter's solstice, and then sun's position
at the same hour on summer's solstice. The only shadows that can possibly
fall on the panel (apart from clouds, that is) are the objects that lay on
the band's path. So I would reverse the perspective: put the camera on the
panel and point at the horizon; remove all textures from the potentially
shading objects, make the band white, and make background transparent with
+ua. Render and check in the Gimp (histogram) how much white you have
compared to the sum of black and white. Repeat for other horizon, if
necessary. Don't forget to add the rest of the sunpath not covered by
shadows. ;) And then double the value, since this is valid for six months.


Post a reply to this message

From: Rarius
Subject: Re: Getting the intensity of light at a point.
Date: 3 May 2007 12:29:27
Message: <463a0de7$1@news.povray.org>
In general I like your idea of putting the camera in the position of the 
solar panel, but I am afraid that this would only give a first approximation 
to the true value.

It would be OK if the sun's position (declination) moved in a linear 
fashion, but it doesn't. It is much more like a sine wave. It starts off 
moving slowly at the southernmost point (23.5 S) and accellerates northwards 
until it crosses the equator when it starts to slow down until it stops at 
its northernmost position (23.5 N)...  The band 0 to 1 deg will have the sun 
in it a lot less than the band +20 to +21 deg!

To correct for this you could either pigment the sky band, or position 
several thousand "suns" along it to simulate the differing light "density" 
coming from the different bands of the sky.

Another point, you'd need a camera with more than 180deg field to do this in 
one pass... Although it shouldn't be too difficult to do it in segments.

Rarius

"Grassblade" <nomail@nomail> wrote in message 
news:web.4639bbc01bad02ca6955f970@news.povray.org...
> "MustardMan" <nomail@nomail> wrote:
>> Hi,
>>
>> I am using POVray to simulate the energy produced by solar panels at
>> different orientations on a roof. My simulation includes the horizon, so
>> the shadowing difference between summer & winter is realistic (as well as
>> throughout the day).
>>
>> I can calculate the power generated by the panels by simply using some 
>> maths
>> and the Az & Al variables generated by SUNPOS. However, this does not
>> include shadowing caused by objects (horizon, trees, etc) - the value is
>> what the panels would produce if they were always illuminated.
>>
>> Am I able to specify a point in the scene and get POVray to report the
>> amount of light reaching that point?
>>
>> Cheers,
>> MM.
> In six months the sun appears to move at dawn from south to north. The 
> area
> covered by the sun in those six months is more or less an inclined band
> that you can simulate by intersecting a sphere with an equivalently
> inclined cylinder. You can get the cylinder thickness in Sunpos.inc, by
> determining the hour of dawn on winter's solstice, and then sun's position
> at the same hour on summer's solstice. The only shadows that can possibly
> fall on the panel (apart from clouds, that is) are the objects that lay on
> the band's path. So I would reverse the perspective: put the camera on the
> panel and point at the horizon; remove all textures from the potentially
> shading objects, make the band white, and make background transparent with
> +ua. Render and check in the Gimp (histogram) how much white you have
> compared to the sum of black and white. Repeat for other horizon, if
> necessary. Don't forget to add the rest of the sunpath not covered by
> shadows. ;) And then double the value, since this is valid for six months.
>
>
>
>


Post a reply to this message

From: Samuel Benge
Subject: Re: Getting the intensity of light at a point.
Date: 3 May 2007 13:51:34
Message: <463a2126@news.povray.org>
MustardMan wrote:
> What I would like to do is to get POVray to output another variable to the
> file which tells me if a point (on one or more panels) is in shade. Then
> the integrating program can calculate merrily away, and I don't have to
> worry about shadowing at inconvienient times!
> 
> Thanks,
> MM.

This would be easy to do with MegaPov's projection pattern. The pattern 
simulates a light_source and takes that information and returns it as a 
pigment. This includes any shadows which may affect your scene. From 
there you can call eval_pigment to test if a point is in a shadow or 
not. Since all you need is a yes or no concerning the sun's occlusion, 
this method should work just fine. Try it out! You'll need MegaPov 
(http://megapov.inetart.net/), of course :)

~Sam


Post a reply to this message

From: Alain
Subject: Re: Getting the intensity of light at a point.
Date: 3 May 2007 17:48:03
Message: <463a5893$1@news.povray.org>
Rarius nous apporta ses lumieres en ce 03-05-2007 12:29:
> In general I like your idea of putting the camera in the position of the 
> solar panel, but I am afraid that this would only give a first approximation 
> to the true value.
> 
> It would be OK if the sun's position (declination) moved in a linear 
> fashion, but it doesn't. It is much more like a sine wave. It starts off 
> moving slowly at the southernmost point (23.5 S) and accellerates northwards 
> until it crosses the equator when it starts to slow down until it stops at 
> its northernmost position (23.5 N)...  The band 0 to 1 deg will have the sun 
> in it a lot less than the band +20 to +21 deg!
You can use a gradient patern using sin_wave, darker in the middle, brighter at 
the edges.
> 
> To correct for this you could either pigment the sky band, or position 
> several thousand "suns" along it to simulate the differing light "density" 
> coming from the different bands of the sky.
> 
> Another point, you'd need a camera with more than 180deg field to do this in 
> one pass... Although it shouldn't be too difficult to do it in segments.
In POV-Ray, the camera can have a 360 degrees field. In fact, you can make the 
field any thing you want, 720 degrees is OK!
Want a fish eye view of 200 degrees?

   camera
{
   fisheye
   up y // default, optional
   right x // to make a circular image
   location 0 // start at the origin to get a simpler rotation, default 
location, optional
   angle 200 // a 200 degrees field of view
   look_at z // default direction, optional
   rotate -90*x //look up
   translate Your_Location // To place the camera where you want it
}

> 
> Rarius
> 
> "Grassblade" <nomail@nomail> wrote in message 
> news:web.4639bbc01bad02ca6955f970@news.povray.org...
>> "MustardMan" <nomail@nomail> wrote:
>>> Hi,
>>>
>>> I am using POVray to simulate the energy produced by solar panels at
>>> different orientations on a roof. My simulation includes the horizon, so
>>> the shadowing difference between summer & winter is realistic (as well as
>>> throughout the day).
>>>
>>> I can calculate the power generated by the panels by simply using some 
>>> maths
>>> and the Az & Al variables generated by SUNPOS. However, this does not
>>> include shadowing caused by objects (horizon, trees, etc) - the value is
>>> what the panels would produce if they were always illuminated.
>>>
>>> Am I able to specify a point in the scene and get POVray to report the
>>> amount of light reaching that point?
>>>
>>> Cheers,
>>> MM.
>> In six months the sun appears to move at dawn from south to north. The 
>> area
>> covered by the sun in those six months is more or less an inclined band
>> that you can simulate by intersecting a sphere with an equivalently
>> inclined cylinder. You can get the cylinder thickness in Sunpos.inc, by
>> determining the hour of dawn on winter's solstice, and then sun's position
>> at the same hour on summer's solstice. The only shadows that can possibly
>> fall on the panel (apart from clouds, that is) are the objects that lay on
>> the band's path. So I would reverse the perspective: put the camera on the
>> panel and point at the horizon; remove all textures from the potentially
>> shading objects, make the band white, and make background transparent with
>> +ua. Render and check in the Gimp (histogram) how much white you have
>> compared to the sum of black and white. Repeat for other horizon, if
>> necessary. Don't forget to add the rest of the sunpath not covered by
>> shadows. ;) And then double the value, since this is valid for six months.
>>
>>
>>
>>
> 
> 


-- 
Alain
-------------------------------------------------
Just remember - if the world didn't suck, we would all fall off.


Post a reply to this message

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