POV-Ray : Newsgroups : povray.newusers : How can I print a vector to the screen? : Re: How can I print a vector to the screen? Server Time
5 Nov 2024 05:20:13 EST (-0500)
  Re: How can I print a vector to the screen?  
From: Christopher James Huff
Date: 14 Apr 2002 21:54:34
Message: <chrishuff-9C2955.20563414042002@netplex.aussie.org>
In article <slr### [at] zero-ppslocaldomain>,
 Steve <ste### [at] zeroppsuklinuxnet> wrote:

> Is there a way to print a vector using #debug?  And if so could someone
> please give an example?

The #debug statement only takes strings, so you will need to convert the 
vector to a string first. Since you seem to be using POV-Ray 3.5, look 
up the documentation for the vstr() function.


> This is only part of my current problem, I'm trying to center text but 
> there is NO documentation on this, though in both the POV docs and in the
> VFAQ this is listed as a question that is answered - but the question is 
> not answered it just says use min and max_extent.  

The answer is to use min_extent() and max_extent(). ;-)
Once you have the coordinates of each corner of the bounding box, it is 
very simple to translate it so it is centered over the origin or any 
other desired point. Just find the center and translate by -CenterPos.
Or you could use the standard macro for this: Center_Trans() in 
transforms.inc.

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

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