POV-Ray : Newsgroups : povray.newusers : Shoot a ray at a mesh : Re: Shoot a ray at a mesh Server Time
28 Jul 2024 22:26:55 EDT (-0400)
  Re: Shoot a ray at a mesh  
From: Kenneth
Date: 8 Jun 2008 01:50:00
Message: <web.484b7212784caf0d78dcad930@news.povray.org>
Alain <ele### [at] netscapenet> wrote:

>
> The proposed solution allows you to shoot the ray from some arbitrary location
> toward an object centered around the origin.

That's true--but the example given in the docs does not make that clear or
explain what's going on; a new user would, IMO, have to "read between the
lines" to understand that the example *is* shooting toward the origin.

> There is nothing in the original
> post that even remotely suggest that the mesh may be planar.

Well, he doesn't say where it is, how big it is OR what shape it is (*all* of
which have a bearing on how to trace it--and how successful the trace will be,
especially if there are undercuts in the mesh object.)  But I admit that when I
think of a 'mesh', I think of an open 'planar'-like object, like a height_field.
That was a bad assumption on my part. Meshes can be any shape, open or closed.

> If the mesh is NOT around the origin, you can use max_extend(Object) and
> min_extent(object) to get the location of it's bounding box. You can then shoot
> your tracing ray at that bounding box.

That's a good idea, I agree. And should probably be mentioned as part of the
trace definition in the docs, if only briefly. (I don't believe a new user
would think of that, yet it's a useful and easy trick.)

KW


Post a reply to this message

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