POV-Ray : Newsgroups : povray.programming : negative index of refraction : Re: negative index of refraction Server Time
5 May 2024 06:53:44 EDT (-0400)
  Re: negative index of refraction  
From: Le Forgeron
Date: 25 Aug 2005 09:17:21
Message: <430dc4e1$1@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thank you.

wolfman wrote:
> Now, if you replace material 2 by a "metamaterial" with n2<0, the refracted
> beam propagates "on the same side" of the surface normal as the incident
> beam. That's what would be weird to look at!

With a little more google, I start to see... the ray go thru the
surface, but instead of crossing the normal, it reflect on it.

> 
> If you don't believe me, google "metamaterials", there is lot's of stuff.

Best so far: http://www.answers.com/topic/metamaterial

> 
> So, back to my problem, has anybody any idea of where the IOR is implemented
> in POV-ray? Or what can I do to be able to have a negative sign for the
> IOR?

Yep! you want to play with the computation of refracted rays.
That should be a small patch... I leave you tweaking the parser to
accept the negative ior (but notice that ABS(IOR) should still =>1, even
with metamaterial, no revolution of physics)

Then a few explanation for povray: a ray keep its current ior value, and
it get updated by the ratio of the leaving/entering thru an interface.
So far, so good, you only have to be able to handle the computation of
the direction of the refracted ray.

You want to change BacktraceRefract in lighting.cpp,
in particular the test of line 3056 (reference of 3.6.1)  (testing that
change is nearly irrelevant, may be that test is ok)
and mainly the relevant ELSE block

Looking at it, it seems (but YOU check!) that a change in Refract_Guts
(same file) could be enough. (you need to trap the ior<0, because it use
the square root a loot..., that's only a small function to update...)

Good luck.

I wonder if such strange things could make it so late in 3.7 ?





- --
Eifersucht ist die Leidenschaft, die mit Eifer sucht, was Leiden schafft.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDDcTgs/YJ43cSjHIRAjKuAJ94g17tBHfxTQdUoyEZitVm0O1joQCghre4
jeJUh3QT7KPUgEAixHZgSgM=
=geg0
-----END PGP SIGNATURE-----


Post a reply to this message

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