POV-Ray : Newsgroups : povray.general : Variable IOR - has the time come? : Re: Variable IOR - has the time come? Server Time
1 Aug 2024 12:25:35 EDT (-0400)
  Re: Variable IOR - has the time come?  
From: Patrick Elliott
Date: 25 Feb 2006 21:39:35
Message: <MPG.1e6ac1b75780d43c989ee9@news.povray.org>
In article <4400447f@news.povray.org>, war### [at] tagpovrayorg says...
> Nekar Xenos <go_### [at] yahoocom> wrote:
> > I meant to replace my intitial suggestion with the second one. Is it not 
> > possible to test intersection of a circle with an object? Please excuse me, 
> > but I (obviosly)don't know how a raytracer is programmed. How is 
> > intersection of a straight ray done? I was thinking of just replacing the 
> > formula for the straight ray with the formula of a circle.
> 
>   How would a ray travelling in a circular path be any feasible way of
> emulating variable ior? I'm not even sure it's physically possible to
> have an object with an ior such that light travels in a circular path
> through it regardless of the direction.
> 
Now... A Spline Path could work though, maybe? I mean your basically just 
doing the same thing you do with any object, make a determination of 
where it is likely to intersect. I am sure you could find some averaging 
function to determine where the bounding box intersection is for a 
"straight" line that would hit the same point. As well as something to 
find the final "direction". If no other objects are intersected, you just 
continue the ray from that final point on the surface of the object. If 
intersection tests of a bounding box for something inside is detected, 
then you calculate along the spline path, until you hit. When it leaves 
the interior of the object you stop doing the extra calculations and 
continue on a normal strait path.

Or something more or less like that. The only real question is, given an 
object, can you determine an averaged IOR for the ray and a final 
direction, allowing you to shortcut the calculations when no 
intersections are possible. Of course, I don't know how media might be 
effected by such a thing...

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

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