|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi everyone,
First of all, I would like to say that I'm just getting started in learning
programming. I can do alright figuring the stuff out, but just go easy on
me (don't laugh if I ask stupid questions).
So here is what I'm trying to do: I'm currently working with a physics
group, and I'm trying to use povray to simulate a detector we're building
for dark matter (cool huh). So far, it's doing alright, there's just a few
things that povray doesn't quite do for which I was hoping to be able to
tweak the source code. I need to add some parameters to the Rayleigh
Scattering function, and I also need to modify the absorption function to
match liquid xenon. And if I get really ambitious, I might try to make
something that will intake a wavelength that is not necesarily in the
visible light spectrum (i.e. gamma rays), and change the functions that
depend on the type of light to account for the different wavelength.
So what I need help with: I need to figure out how povray sends input from
the user to the source code. For example, I can't quite find the
scattering function, so that makes it hard to change what input it can
take. So far, I've found stuff in parstxtr.cpp on line 3149, stuff in
media.cpp on line 1219, and the bit of stuff in media.h. So I just need to
find whatever comes between those files and povray (I think...). I'll get
to the absorption stuff when I finish with Rayleigh.
And to whoever created this/is in charge of making povray: I would be very
interested in working with you to make some sort of physics package for
future physicists. Povray could be a really, really valuable resource for
this sort of thing, it would only take a few adaptations, and some extra
functions to make a dynamite package.
Thanks to whoever helps me!
Mary
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <web.40accb037d3391438f8b3f470@news.povray.org>,
"" <nomail@nomail> wrote:
> So here is what I'm trying to do: I'm currently working with a physics
> group, and I'm trying to use povray to simulate a detector we're building
> for dark matter (cool huh). So far, it's doing alright, there's just a few
> things that povray doesn't quite do for which I was hoping to be able to
> tweak the source code. I need to add some parameters to the Rayleigh
> Scattering function, and I also need to modify the absorption function to
> match liquid xenon. And if I get really ambitious, I might try to make
> something that will intake a wavelength that is not necesarily in the
> visible light spectrum (i.e. gamma rays), and change the functions that
> depend on the type of light to account for the different wavelength.
Doing so would essentially require rewriting or bypassing almost all the
rendering code. To POV-Ray, colors are RGB triples, sometimes with
filter and transmit as well. It doesn't know anything about wavelengths.
> So what I need help with: I need to figure out how povray sends input from
> the user to the source code. For example, I can't quite find the
> scattering function, so that makes it hard to change what input it can
> take. So far, I've found stuff in parstxtr.cpp on line 3149, stuff in
> media.cpp on line 1219, and the bit of stuff in media.h. So I just need to
> find whatever comes between those files and povray (I think...). I'll get
> to the absorption stuff when I finish with Rayleigh.
The scattering function itself will be in media.cpp. The code for
parsing it will be in parstxtr.cpp...just look at the other stuff there
to see what to do. The data structure the parameters are stored in is
Media_Struct in frame.h. You'll need to add parameters there, then add
initialization and rendering code in media.cpp and parsing code in
parstxtr.cpp. The code for Raleigh scattering is in
scattering_attenuation() in media.cpp.
> And to whoever created this/is in charge of making povray: I would be very
> interested in working with you to make some sort of physics package for
> future physicists. Povray could be a really, really valuable resource for
> this sort of thing, it would only take a few adaptations, and some extra
> functions to make a dynamite package.
It would take more than a few adaptations, unfortunately. The POV-Ray
code is complex, it does many things you don't need and a few you won't
want. It's result is generally just a pretty picture...it does simulate
many optical effects, but with the goal of generating something to look
at. It's good for visualizations, but is only useful for very simple
optical simulations.
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Doing so would essentially require rewriting or bypassing almost all the
> rendering code. To POV-Ray, colors are RGB triples, sometimes with
> filter and transmit as well. It doesn't know anything about wavelengths.
She's not asking about that. The different "wavelengths" she seems to be
refering to does not mean that POV-ray needs to be coded to actually
understand wavelengths, but the surface reflectivity of a certain
wavelength could be modeled on one pass, and then you could change the
model each pass for each different wavelength. It's not like she needs to
model non-linear optical effects.
In fact, a good example of POV-ray actually pretending to understand
wavelengths is when colored diffraction with photons is used. How many
different "colors" you want to smoothly portrait the spectrum can be set.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|