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:16:46 EDT (-0400)
  Re: How can I print a vector to the screen?  
From: Sebastian H 
Date: 15 Apr 2002 01:11:37
Message: <3CBA6181.40902@web.de>
Steve wrote:
> Is there a way to print a vector using #debug?  And if so could someone
> please give an example?
> 

Try this:

// ----------
//
// Simply "returns" a vector in a string in POV-Ray notation
//
#macro v_string (V)
  concat ("<", str (V.x, 0, 4),", ", str (V.y, 0, 4),", ", str (V.z, 0, 
4),">")
#end


#declare Wanna_see_this_vector = <2, 0.1, 12.5>;

// Should print <2, 0.1, 12.5> to the debug output
#debug v_string (Wanna_see_this_vector)
// ----------


Post a reply to this message

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