POV-Ray : Newsgroups : povray.general : Glories, POV-Ray, and diffraction Server Time
10 Mar 2025 08:43:41 EDT (-0400)
  Glories, POV-Ray, and diffraction (Message 3 to 12 of 22)  
<<< Previous 2 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Bald Eagle
Subject: Re: Glories, POV-Ray, and diffraction
Date: 9 Feb 2025 11:45:00
Message: <web.67a8da99dc4a579e1f9dae3025979125@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> Why not define a full-color pigment function that uses average {} and some kind
> of function related to the distance from some point from the camera?
> Then you could assign wavelengths and phase shifts, and get the overlapping
> color effect?

So, this jogged my memory of when i was playing with some optical effect
patterns.
Do we think this might be a way forward?

http://news.povray.org/povray.binaries.images/thread/%3Cweb.66a046cea7254f9e1f9dae3025979125%40news.povray.org%3E/


Post a reply to this message

From: Bald Eagle
Subject: Re: Glories, POV-Ray, and diffraction
Date: 9 Feb 2025 16:05:00
Message: <web.67a9178cdc4a579e1f9dae3025979125@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> Do we think this might be a way forward?
>
http://news.povray.org/povray.binaries.images/thread/%3Cweb.66a046cea7254f9e1f9dae3025979125%40news.povray.org%3E/

Yep, I think we're on to something:

"Using the standard assumptions of diffraction theory, he formulated the local

renamed the Airy integral in his honor; it is related to the now familiar Airy
function. It is analogous to the Fresnel integrals which also arise in
diffraction theory."

https://digitalcommons.odu.edu/cgi/viewcontent.cgi?article=1157&context=mathstat_fac_pubs


Post a reply to this message

From: Bald Eagle
Subject: Re: Glories, POV-Ray, and diffraction
Date: 10 Feb 2025 09:50:00
Message: <web.67aa1176dc4a579e25b4de9225979125@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:

> Unless someone can think of some clever way to simulate diffractive
> effects.  I won't say it can't be done; that would only ensure that it
> *won't* be done.  Perhaps some clever (ab)use of irid?  Or finding a way
> to accurately fake it with regular ior and dispersion?

I took an initial stab at this using the interference model, and that was
probably too complicated an approach (for now).

My current experiment is trying to implement this:

We know that the effect is angle-dependent.  "The rainbow isn't at any distance
from you - it's simply coming from a _direction."

So I played a bit with calculating the angle on an image plane, using only the
2-4 degree angle of the glory, and then trying to remap those angles to
0-(approx) 280 so that I could just apply an HSV color gradient across it.

Sleep and coffee let my brain see that using something *like* a sky_sphere would
be the way to go.  Then it's just a matter of daisy-chaining functions together
to get the rgb 1 emissive inner circle, the Alexander's dark band, and whatever
other higher order rainbows the user decides to include.

Maybe there's somehow something that can be done with an actual cone {} spanning
the desired angles, and some kind of intersection {} with a hollow sphere could
be used?  Media with a df3?

I like the irid idea - I'll have to take a look at the source for that to see if
something can be implemented using that code.

With regard to my earlier recognition that the glory resembled the Fresnel
diffraction pattern in shadows:  What if one used an emissive light source that
had the ROYGBIV HSV gradient, and it cast a penumbral shadow?


Post a reply to this message

From: Bald Eagle
Subject: Re: Glories, POV-Ray, and diffraction
Date: 10 Feb 2025 12:20:00
Message: <web.67aa34fcdc4a579e25b4de9225979125@news.povray.org>
There are also thousands of shaders to use as inspiration.

https://www.shadertoy.com/view/WtGyW1

https://www.shadertoy.com/view/Wsj3zh

https://www.shadertoy.com/view/3dj3zh

https://www.shadertoy.com/view/WsS3Rz

https://www.shadertoy.com/view/WlfXzB

https://www.shadertoy.com/view/wtsyDl


Post a reply to this message

From: Cousin Ricky
Subject: Re: Glories, POV-Ray, and diffraction
Date: 10 Feb 2025 15:33:12
Message: <67aa6288$1@news.povray.org>
On 2025-02-10 10:47 )-4), Bald Eagle wrote:
> 
> With regard to my earlier recognition that the glory resembled the Fresnel
> diffraction pattern in shadows:  What if one used an emissive light source that
> had the ROYGBIV HSV gradient, and it cast a penumbral shadow?

How does one put a hue gradient on a light source?  Are you thinking
about a filter in front of the light source?  And how would you convert
ROYGBIV into an interference pattern?

It just occurred to me that I have played with diffraction interference:

  https://news.povray.org/55719ced%40news.povray.org

I did these images using layers of emissive media with a density
function.  For the RGB image, I stacked separate layers for red, green,
and blue respectively.  For the spectral image, I rendered an
intermediate EXR image for each of 36 wavelengths, then combined them.


Post a reply to this message

From: Bald Eagle
Subject: Re: Glories, POV-Ray, and diffraction
Date: 10 Feb 2025 16:05:00
Message: <web.67aa690ddc4a579e25b4de9225979125@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:

> How does one put a hue gradient on a light source?  Are you thinking
> about a filter in front of the light source?

Put a hue gradient on an object and give it an emission 1 finish?
Use projected_through?

  And how would you convert
> ROYGBIV into an interference pattern?

Look at the rainbow pages.  They have interference patterns for different
colors.  Then they sum them up.  Write a macro that creates the functions for
the wavelengths and sums them up.  Have the number of discrete wavelengths that
you want to use in the visible spectrum be the argument for the macro.

Something with a Fourier transform?

- or -

I don't think we would.  I think we'd diagram out what would happen if the
interference pattern was the originating mechanism of the result - but then see
if there's just some overall function that describes the HSV result.

Or just fake the hell out of it with something that for all intents and purposes
looks good enough.

My Fresnel diffraction pattern was rendered with a simple equation describing
the end result.  I didn't model the interference in any way whatsoever.

I think the key here is to not get all tangled up in trying to work _through_
all of the physically-based processes - but rather summarize the overall result.
Like writing out the big intermediate equation - and then canceling out a bunch
of terms.  Physicists apparently do intermediate calculations with imaginary
numbers and negative temperatures - but that's only the procedural path to the
answer.

I posted a lot of stuff that doesn't try to calculate an infinite number of
wavelengths.  Let those be the guide.

How do we calculate integrals?  Those can be considered the sum of an infinite
number of thin strips underneath the curve - but we don't actually process those
infinite number of strips, do we?  We just "do the math", and the result pops
out the end.

So we just find a way to "do the math" and get something that works.

- BW


Post a reply to this message

From: Bald Eagle
Subject: Re: Glories, POV-Ray, and diffraction
Date: 10 Feb 2025 16:15:00
Message: <web.67aa6b99dc4a579e25b4de9225979125@news.povray.org>
https://earthsky.org/space/glory-on-an-exoplanet-wasp-76b-exoplanets-glories/

relevant image:
https://earthsky.org/upl/2024/04/Glories-Earth-Venus-simulated-views-March-11-2014.jpg

"This is a _simulated_ comparison of a glory on Venus (left) and Earth (right)."

So people are actually simulating the effect - which means that we can do it in
POV-Ray.

Hell - even if we just scanned straight across the middle with eval_pigment ()
and made a spline function or a color_map directly, then there you go.
Instant glory to be used as a layered texture, a screen.inc object, or however
else you might decide to implement it.

K.I.S.S.    :*


Post a reply to this message

From: Alain Martel
Subject: Re: Glories, POV-Ray, and diffraction
Date: 11 Feb 2025 09:15:54
Message: <67ab5b9a$1@news.povray.org>
Le 2025-02-10 à 16:01, Bald Eagle a écrit :
> Cousin Ricky <ric### [at] yahoocom> wrote:
> 
>> How does one put a hue gradient on a light source?  Are you thinking
>> about a filter in front of the light source?
> 
> Put a hue gradient on an object and give it an emission 1 finish?
> Use projected_through?
> 
>  
Tried projected_through with a filtering pattern creating a gradient. It 
don't work. You get a warning about projected_through requiring a 
texture-less object, and the pigment or pattern is ignored.


Post a reply to this message

From: Bald Eagle
Subject: Re: Glories, POV-Ray, and diffraction
Date: 11 Feb 2025 09:45:00
Message: <web.67ab61a2dc4a579ea911b6e125979125@news.povray.org>
Alain Martel <kua### [at] videotronca> wrote:

> Tried projected_through with a filtering pattern creating a gradient. It
> don't work. You get a warning about projected_through requiring a
> texture-less object, and the pigment or pattern is ignored.

Yeah - RTFM shows that it doesn't do what I had thought it did.

https://wiki.povray.org/content/Reference:Light_Source#Projected_Through

Projected Through
You can use projected_through with any type of light source. Any object can be
used, provided it has been declared beforehand. Projecting a light through an
object can be thought of as the opposite of shadowing, in that only the light
rays that hit the projected through object will contribute to the scene. This
also works with area lights producing spots of light with soft edges. Any
objects between the light and the projected through object will not cast
shadows, additionally any surface within the projected through object will not
cast shadows. Any textures or interiors on the object will be stripped and the
object will not show up in the scene.

The syntax is as follows:

light_source {
  LOCATION_VECTOR, COLOR
  [LIGHT_SOURCE_ITEMS...]
  projected_through { OBJECT }
  }


Maybe use a disk with a cylindrical pattern and a gradient, or a sphere with an
onion and a gradient.

We don't actually have any inbuilt pattern that would give a conical gradient,
do we?

Maybe use a cylindrical gradient with a spherical warp.
Put the camera in the center of it.

Then just write a function that limits the locus of the gradient and gives the
right color-mapping for the glory effect.


Post a reply to this message

From: Bald Eagle
Subject: Re: Glories, POV-Ray, and diffraction
Date: 11 Feb 2025 13:00:00
Message: <web.67ab8f00dc4a579ea911b6e125979125@news.povray.org>
And here you go:

http://www.philiplaven.com/Publications/AO-42-03-p436.pdf

http://www.philiplaven.com/mieplot.htm


Post a reply to this message

<<< Previous 2 Messages Goto Latest 10 Messages Next 10 Messages >>>

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