POV-Ray : Newsgroups : povray.programming : Ray collision export, spectral rendering, and dispersion at relective grati= : Re: Ray collision export, spectral rendering, and dispersion at relective g= Server Time
24 Apr 2024 00:22:23 EDT (-0400)
  Re: Ray collision export, spectral rendering, and dispersion at relective g=  
From: Bald Eagle
Date: 5 Apr 2018 10:10:01
Message: <web.5ac62dd787838d14c437ac910@news.povray.org>
"Alexander jahn" <jah### [at] gmailcom> wrote:

> a) is it possible to export text of the individual ray collision and
> diffraction?
>
> For example
>
> output.txt:
> From To Source Destination DestinationType FromX FromY ToX ToY DeltaX DeltaY
> Magnitude BeamAngle SurfaceNormalAngle WavelengthNM
> Beam Origin Refraction Origin Ray 1 Dbeam 1 Crown lens Lens -5,0000 0,0000e+00
> -5,0000e-04 -0,2700 4,9995 -0,2700 5,0068 -3,0910 180,0000 650,0000
> Refraction Refraction Crown lens Crown lens Lens -5,0000e-04 -0,2700 0,7497
> -0,2966 0,7502 -0,0267 0,7507 -2,0357 174,3253 650,0000
> ....
> + another 500,000 lines like this
> (this output is 2D and is a normal export of
> https://arachnoid.com/OpticalRayTracer/ )
>
> I am interested in this text output as I will simulate my light-sensor as a
> sphere, the rays that collide with this sphere are "detected".

POV-Ray itself won't do that, but I suppose you might be able to do something
with the trace() function.  Might take a while.

> b) Is it possible to apply the attribute "wavelength" to an individual ray?
> In my setup, the wavelength of the light is very important, but most ray-tracers
> do not include that info afaik.
> The response to this question is important for question c)

If you somehow encode your "wavelength" as an rgb value, then I suppose it could
be possible.  For the moment, POV-Ray doesn't handle light in a realistic sense
like that.   But the following are the closest I can think of off the top of my
head:

http://www.ignorancia.org/en/index.php?page=Lightsys
http://www.lilysoft.org/CGI/SR/Spectral%20Render.htm

> c) Is it possible to simulate a reflective refraction grating?
> Example
> https://www.thorlabs.com/images/TabImages/Littrow_Configuration_D1-780.gif
> The main issue that I see is that it is not a particle effect, but rather an
> interference effect, using a ray-model of light is not the best way I guess.


Mmmmmm.   Dunno - but check out:
https://www.youtube.com/watch?v=xjMjWtntm9k

That might help you decide for yourself, or you could contact the author and see
how he went about it.


Post a reply to this message

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