|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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.
Help! What am I doing wrong?
- How
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Fri, 5 Apr 2002 18:12:23 -0600, "How Camp" <kro### [at] hotmailcom> wrote:
> Help! What am I doing wrong?
As I understand You are making something like this (in shortcut):
#local MySphere=sphere{ Center Radius }
object{MySphere translate <3,3,3>}
#local Intersection = trace( MySphere , ...);
while you should do rather:
#local MySphere=sphere{ Center Radius }
#local MyNewSphere=object{MySphere translate <3,3,3>}
#local Intersection = trace( MyNewSphere , ...);
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Then, trace() tends to return
> results based on where the object was #defined, not where it actually sits
> in the scene.
That's because trace() tends to return results based on where the object was
#defined, not where it actually sits in the scene. :-)
Anders
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Christopher James Huff" <chr### [at] maccom> wrote in message
news:chr### [at] netplexaussieorg...
> 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.
Ah, thank you all. This makes much more sense. And, of course, it works
beautifully.
- How
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I use trace that way:
I use it on my_object BEFORE transformation
I group my_object and object added by trace in a union object
THEN I apply any transformation to the union
Marc
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|