POV-Ray : Newsgroups : povray.advanced-users : Finding an object=B4s location : Re: Finding an object=B4s location Server Time
28 Jul 2024 22:24:25 EDT (-0400)
  Re: Finding an object=B4s location  
From: Christopher James Huff
Date: 18 Nov 2003 10:10:32
Message: <cjameshuff-71CABF.10071718112003@netplex.aussie.org>
In article <web.3fb9705e4b0664231e2d84430@news.povray.org>,
 "Steely" <Rob### [at] hamburgde> wrote:

> Is there any way to ask POV-Ray where exactly the last object is located? I
> can find its location of course drawing triangles on paper ;-) but I am
> looking for some "magic" feature that writes the location directly to the
> message window or something else.

What's the location of an object? There is no such thing.


> I thought of vtransform{} and also I thought of min_extent/max_extent as the
> doc says in both cases it will return values, but I cannot figure out to

> (means, I have no clue how to get it to work correctly).

The min_extent() function returns the lower-left-front corner of the 
bounding box of the object, the max_extent() function returns the 
upper-right-back corner. The documentation explains this fully, I 
suggest you read it again. The vtransform() macro (parentheses, not 
curly brackets...it's a macro) transforms a point with a given 
transformation. Pick the point you want to treat as the "center" of the 
object and transform it with the same transformation you used on the 
object.

-- 
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

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