[R] Plotting a cloud/fog of variable density in rgl

JiHO jo.lists at gmail.com
Mon Nov 29 00:30:33 CET 2010


Thanks for both the replies.

>> I think you can come closest to what you want within rgl by using
>> sprites rather than rendering transparent spheres. See
>> examples(sprites3d).

Sprites helps a lot indeed. With enough transparency I am close to what I want.

> If you only have 2 things with simple properties, namely point emitters
> as your organisms and a uniform concsntration of transparent scatters ( the
> fog) you can probably derive geometrical optics expressions for the ray trace
> results and just integrate those over your source distribution. This should
> be reasonably easy in R. I haven't been to siggraph since 1983 so can't help
> much but you can probably find analyitcal solutions for fog on google
> and just sum up your source distribution. I guess you could even do some
> wave optics etc as presumably the fog could be done as a function
> of wavelength just as easily. In any case, if you only have two basic things
> with simple disto should be reasonably easy to do in R with your own code.

I am afraid this is a bit too advanced for me. I know next to nothing
regarding digital 3D imaging and, even if I could compute this, I am
not sure how I would plot the result. My goal is really to add this to
my R-plotting arsenal and use it in routine, not to develop something
very specific for this particular application. But thank you for
taking the time to reply, maybe I'll come back to this when I know
more.

JiHO
---
http://maururu.net



More information about the R-help mailing list