POV-Ray : Newsgroups : povray.newusers : Simulating interference of coherent light : Re: Simulating interference of coherent light Server Time
6 May 2024 21:51:56 EDT (-0400)
  Re: Simulating interference of coherent light  
From: Kaveh
Date: 8 Dec 2002 05:45:41
Message: <1fmvm1d.1o3swaj1m7fi12N%kaveh@delete_this.focalimage.com>
Thank you for your detailed reply. It's helped a huge amount. :-)

Mike Williams <mik### [at] econymdemoncouk> wrote:

[...]

> Although you can't use vlength() in a function, you should be able to
> perform the same calculation directly using Pythagarus's Theorem.
> 
> You can alter the transparency by using a colour_map.

[...]

> #declare F1 = function {
>  sin(sqrt(pow(x-X1,2) + pow(y-Y1,2) + pow(z-Z1,2)))
> }
> #declare F2 = function {
>  sin(sqrt(pow(x-X2,2) + pow(y-Y2,2) + pow(z-Z2,2)))
> }
> 
> // Interference function between the waves
> 
> #declare F = function {
>   (A1*F1(x,y,z) + A2*F2(x,y,z))
>   * 0.5/(abs(A1)+abs(A2)) + 0.5
> }

Slightly off topic, but I am not sure this is the correct way to find
the interference pattern. I am still racking my brain. It seems logical
to take the amplitude of each wave, and add them up at each point. But
when I take the path difference first, by subtracting one path from the
other, and then using the sine of that path difference, I get a
different pattern, and one which looks more correct, i.e. continuous
curved lines. I will think more on this.

>                                  
> // The thing itself 
> 
> plane {y, 0
>   pigment { function {F(x,y,z)}
>     color_map { [0.0 rgbt <1,1,1,1>]
>                 [1.0 rgbt <1,1,1,0>]
>     }
>   }
>   no_shadow
> }
> 

Now how would I get this pattern through a volume, e.g. a cube? I want
to see the strata running through an object, i.e. 3D fringes. I now get
the pattern only on the surface. I tried using interior_texture, but it
didn't work. 
-- 
Kaveh


Post a reply to this message

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