|
|
In article <3cae3d85@news.povray.org>,
"How Camp" <kro### [at] hotmailcom> wrote:
> Hmm. I don't seem to understand how to use trace() correctly. Being a
> dutiful user, I went back to the manual, and found a nifty example involving
> a simple sphere and a cylinder. It works great...
>
> ...unless I translate the sphere around. Then, trace() tends to return
> results based on where the object was #defined, not where it actually sits
> in the scene. Multiple placements of the object don't seem to get hit,
> either as I would (incorrectly?) expect them to.
>
> For example, if I #declare MySphere at the origin, and then place it in my
> scene via object{MySphere translate <3,3,3>}, my use of trace() seems to
> return results as if the sphere were actually sitting at the origin instead
> of at my translated position.
The trace() function only traces against the shape you give it. By
declaring it and then using "object{MySphere translate <3,3,3>}" you are
putting a copy of it into the scene and translating the copy...trace()
knows nothing about this and only tests the version you passed to it.
If you want to test multiple objects, you need to put them in a union
and pass that union to the trace() function.
--
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/
Post a reply to this message
|
|