POV-Ray : Newsgroups : povray.programming : Making Light... Not act like light.... Server Time
21 Dec 2024 08:49:36 EST (-0500)
  Making Light... Not act like light.... (Message 1 to 9 of 9)  
From: Sword
Subject: Making Light... Not act like light....
Date: 27 Jan 2010 16:45:00
Message: <web.4b60b2eeb47724fb7c20afef0@news.povray.org>
Hello Everyone,

A math teacher at my college wishes to run experiments in which he can see how
light behaves under unusual circumstances. I assume it has something to do with
quantum mechanics, string theory, and a slew of other things that I do not
understand.
He wants to be able to enter a mathematical formula into a
ray-tracing program, but make each ray of light behave according to the formula.
While the math of the subject is beyond me, I am a semi-decent programmer.  As
such, I have two questions.

1. Is POV-Ray even capable of something like this?
2. If it is, where should I start in the code? Which class controls how a ray of
light moves?

Thanks for any answers!


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Making Light... Not act like light....
Date: 27 Jan 2010 17:27:24
Message: <4b60bdcc$1@news.povray.org>
You might take a look at the modification done by
Leo Brevin for an older version (3.5) to adapt the
ray calculations for special relativity:

http://users.monash.edu.au/~leo/research/movies/sr/sr-wmv.html


Post a reply to this message

From: nemesis
Subject: Re: Making Light... Not act like light....
Date: 27 Jan 2010 18:45:00
Message: <web.4b60cfdaab4ee311c2cad8f80@news.povray.org>
"Sword" <swo### [at] hotmailcom> wrote:
> 2. If it is, where should I start in the code? Which class controls how a ray of
> light moves?

rays don't move in povray, they're just traced.  I'd look into
source/backend/render/trace.cpp first.


Post a reply to this message

From: scott
Subject: Re: Making Light... Not act like light....
Date: 28 Jan 2010 04:02:02
Message: <4b61528a$1@news.povray.org>
> He wants to be able to enter a mathematical formula into a
> ray-tracing program, but make each ray of light behave according to the 
> formula.

If you want the "light rays" to travel in anything other than straight lines 
then you're going to have a *really* big job, as pretty much everything in 
POV assumes this.  You would have to rewrite all the intersection code to 
test for intersections between the shape and an arbitrary curved ray!  Plus, 
AIUI, POV applies the inverse of any shape transforms (scale, rotate, move 
etc) to the ray and then does the intersection, you'd need to work out how 
to apply the inverse transforms to your curved ray.

TBH it might be easier to start from scratch without assuming straight rays!


Post a reply to this message

From: Patrick Elliott
Subject: Re: Making Light... Not act like light....
Date: 29 Jan 2010 00:16:56
Message: <4b626f48$1@news.povray.org>
On 1/28/2010 2:02 AM, scott wrote:
>> He wants to be able to enter a mathematical formula into a
>> ray-tracing program, but make each ray of light behave according to
>> the formula.
>
> If you want the "light rays" to travel in anything other than straight
> lines then you're going to have a *really* big job, as pretty much
> everything in POV assumes this. You would have to rewrite all the
> intersection code to test for intersections between the shape and an
> arbitrary curved ray! Plus, AIUI, POV applies the inverse of any shape
> transforms (scale, rotate, move etc) to the ray and then does the
> intersection, you'd need to work out how to apply the inverse transforms
> to your curved ray.
>
> TBH it might be easier to start from scratch without assuming straight
> rays!
>
>
Hmm. Actually, I had an odd thought a while back. Not variable 
"internal" ior, like some people would love to see, but variable surface 
ior. Use a map, just like a texture, bozo, etc., and perturb the angle 
of entry and exit, based on the variability of the pattern. Yeah, yeah, 
you could "sort of" do this by changing the shape of the object, but 
that isn't always optimal for some applications I can think of (such as 
if you where making a texture to use in something else, maybe). But, I 
do wonder what the result would end up looking like.

-- 
void main () {

     if version = "Vista" {
       call slow_by_half();
       call DRM_everything();
     }
     call functional_code();
   }
   else
     call crash_windows();
}

<A HREF='http://www.daz3d.com/index.php?refid=16130551'>Get 3D Models, 
3D Content, and 3D Software at DAZ3D!</A>


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Making Light... Not act like light....
Date: 31 Jan 2010 13:02:20
Message: <4b65c5ac@news.povray.org>
Patrick Elliott wrote:
> Hmm. Actually, I had an odd thought a while back. Not variable
> "internal" ior, like some people would love to see, but variable surface
> ior. Use a map, just like a texture, bozo, etc., and perturb the angle
> of entry and exit, based on the variability of the pattern. Yeah, yeah,
> you could "sort of" do this by changing the shape of the object, but
> that isn't always optimal for some applications I can think of (such as
> if you where making a texture to use in something else, maybe). But, I
> do wonder what the result would end up looking like.

I believe that was already possible, back when ior was part of the texture 
block. Then POV-Ray added the new "interior" block which cannot be used in a 
pattern.


Post a reply to this message

From: Sword
Subject: Re: Making Light... Not act like light....
Date: 10 Feb 2010 16:35:01
Message: <web.4b73258dab4ee311568aa1010@news.povray.org>
Thanks to everybody for their input. I will have to think on this some more.


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Making Light... Not act like light....
Date: 13 Feb 2010 16:30:48
Message: <4b771a08$1@news.povray.org>
Nicolas Alvarez wrote:
> Patrick Elliott wrote:
>> Hmm. Actually, I had an odd thought a while back. Not variable
>> "internal" ior, like some people would love to see, but variable surface
>> ior. Use a map, just like a texture, bozo, etc., and perturb the angle
>> of entry and exit, based on the variability of the pattern. Yeah, yeah,
>> you could "sort of" do this by changing the shape of the object, but
>> that isn't always optimal for some applications I can think of (such as
>> if you where making a texture to use in something else, maybe). But, I
>> do wonder what the result would end up looking like.
> 
> I believe that was already possible, back when ior was part of the texture
> block. Then POV-Ray added the new "interior" block which cannot be used in
> a pattern.

http://wiki.povray.org/content/Knowledgebase:Language_Questions_and_Tips#Topic_30


Post a reply to this message

From: Patrick Elliott
Subject: Re: Making Light... Not act like light....
Date: 13 Feb 2010 21:12:45
Message: <4b775c1d$1@news.povray.org>
On 2/13/2010 2:30 PM, Nicolas Alvarez wrote:
> Nicolas Alvarez wrote:
>> Patrick Elliott wrote:
>>> Hmm. Actually, I had an odd thought a while back. Not variable
>>> "internal" ior, like some people would love to see, but variable surface
>>> ior. Use a map, just like a texture, bozo, etc., and perturb the angle
>>> of entry and exit, based on the variability of the pattern. Yeah, yeah,
>>> you could "sort of" do this by changing the shape of the object, but
>>> that isn't always optimal for some applications I can think of (such as
>>> if you where making a texture to use in something else, maybe). But, I
>>> do wonder what the result would end up looking like.
>>
>> I believe that was already possible, back when ior was part of the texture
>> block. Then POV-Ray added the new "interior" block which cannot be used in
>> a pattern.
>
> http://wiki.povray.org/content/Knowledgebase:Language_Questions_and_Tips#Topic_30
Hmm. Couldn't you do a limited sort of this. Like.. use a pattern with a 
known mathematical "shape", for the density, then computer where the ray 
should end up, based on a computed curve, based on that pattern? It 
wouldn't be perfect, obviously, but... for those patterns that could be 
calculated in such a manner, it could come close. Mind, this is just 
guessing...

-- 
void main () {

     if version = "Vista" {
       call slow_by_half();
       call DRM_everything();
     }
     call functional_code();
   }
   else
     call crash_windows();
}

<A HREF='http://www.daz3d.com/index.php?refid=16130551'>Get 3D Models, 
3D Content, and 3D Software at DAZ3D!</A>


Post a reply to this message

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