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 Sep 2024 00:18:03 EDT (-0400)
  Re: How can I print a vector to the screen?  
From: Steve
Date: 15 Apr 2002 08:43:56
Message: <slrnable71.vmr.steve@zero-pps.localdomain>
On Sun, 14 Apr 2002 20:56:34 -0500, Christopher James Huff wrote:
> 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.

Thanks Chris, I'm suffereing severely as there isn't a text version of the 
3.5 docs available yet (or wasn't last night).  

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

Thanks, I'll have a go at this.  Now that I can #debug vectors I'll be 
able to sort something out. 

-- 
sphere{z*5,1pigment{rgb.5}finish{reflection.3specular.5}}box{<-50,-3,-50>
<50,-2,50>pigment{checker/*\__\\__/  * \_\\__*/scale 2}finish{ambient.7}}
light_source/*__\\__\\__\\__\\__\(    ~ )\__\\__\\__\\__\\*/{<2,5,1>*4,1} 
/*\\__\\__\\__\\__\\__\\__\\__\\__\~  -/__\\__\\__\\__\\__\\*//* Steve */


Post a reply to this message

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