POV-Ray : Newsgroups : povray.bugreports : feature request: diffraction Server Time
31 Oct 2024 10:23:48 EDT (-0400)
  feature request: diffraction (Message 1 to 3 of 3)  
From: jmichae3
Subject: feature request: diffraction
Date: 20 Aug 2011 21:20:01
Message: <web.4e505c13ec15bb7c379c87210@news.povray.org>
diffraction grating can be studied at
http://en.wikipedia.org/wiki/Diffraction_grating
it can be either transmissive or reflective.

the effects that come from it are rainbows and other interesting effects.

there are clear camera lenses which are diffraction grating and when you look at
sun rays through them, they form rainbows around that item.

different effects can be obtained by rotating the diffraction grating (which
could be useful for videos).

I should think it could be implemented as a plane of VERY TINY [clear or highly
reflective] bars. I don't know whether to use square rods or triangle rods or
circle rods.  I should think square would make a more plane-like reflective
surface, while the circle rod would reduce the light, but work in any direction.
 triangle rods would switch images depending upon point of view (they use larger
ones in plastic kind of layer with an image on the back on kids toys).

so maybe having a choice is a good thing.  with the diffraction grating, the
rods are so small you cannot see them with the eye.  so working with floating
point may or may not present a problem - so use exponents for the
diameter/radius?


Post a reply to this message

From: clipka
Subject: Re: feature request: diffraction
Date: 20 Aug 2011 21:45:53
Message: <4e506351$1@news.povray.org>
Am 21.08.2011 03:14, schrieb jmichae3:
> diffraction grating can be studied at
> http://en.wikipedia.org/wiki/Diffraction_grating
> it can be either transmissive or reflective.
...
> I should think it could be implemented as a plane of VERY TINY [clear or highly
> reflective] bars. I don't know whether to use square rods or triangle rods or
> circle rods.  I should think square would make a more plane-like reflective
> surface, while the circle rod would reduce the light, but work in any direction.
>   triangle rods would switch images depending upon point of view (they use larger
> ones in plastic kind of layer with an image on the back on kids toys).
>
> so maybe having a choice is a good thing.  with the diffraction grating, the
> rods are so small you cannot see them with the eye.  so working with floating
> point may or may not present a problem - so use exponents for the
> diameter/radius?

No, the only feasible approach would be to model the effects at the 
macroscopic level; they're quite easy to put into a formula though (and 
other people have done that already), and should also be pretty easy to 
integrate into POV-Ray.

Proper implementation should also allow to realistically simulate 
materials such as CD/DVD surfaces. However, this will require a 
mechanism to control the orientation of the grating, which may also 
require adding more pattern types; that would need to be evaluated.

Diffraction would also eat a lot of render time, comparable to 
dispersion (if you limit yourself to grates made of all-parallel 
elements) or worse (if you also want to do "criss-cross" grates with two 
or more optical axes).


Post a reply to this message

From: jmichae3
Subject: Re: feature request: diffraction
Date: 20 Aug 2011 22:10:00
Message: <web.4e5068361f19ae0a379c87210@news.povray.org>
"jmichae3" <jmi### [at] yahoocom> wrote:
> diffraction grating can be studied at
> http://en.wikipedia.org/wiki/Diffraction_grating
> it can be either transmissive or reflective.
>
> the effects that come from it are rainbows and other interesting effects.
>
> there are clear camera lenses which are diffraction grating and when you look at
> sun rays through them, they form rainbows around that item.
>
> different effects can be obtained by rotating the diffraction grating (which
> could be useful for videos).
>
> I should think it could be implemented as a plane of VERY TINY [clear or highly
> reflective] bars. I don't know whether to use square rods or triangle rods or
> circle rods.  I should think square would make a more plane-like reflective
> surface, while the circle rod would reduce the light, but work in any direction.
>  triangle rods would switch images depending upon point of view (they use larger
> ones in plastic kind of layer with an image on the back on kids toys).
>
> so maybe having a choice is a good thing.  with the diffraction grating, the
> rods are so small you cannot see them with the eye.  so working with floating
> point may or may not present a problem - so use exponents for the
> diameter/radius?

I would like to add that spacing is also a critical property.  you could have
interesting effects if you could warp the grating or map it to a surface, but I
am unsure if this is possible (for instance, a bump map or map to sphere or box.
I would especially like that!

some sort of guide or way to calculate diameter of grating would be needed based
on size of the world or size of object, whichever is more appropriate, probably
size of object.

imagine a house window that is made of diffration grating!

another possibility is that the diffraction grating covers the entire image area
of the camera, to hide edges.


Post a reply to this message

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