POV-Ray : Newsgroups : povray.general : Text String to Vector. : Re: Text String to Vector. Server Time
28 Jul 2024 22:32:16 EDT (-0400)
  Re: Text String to Vector.  
From: clipka
Date: 4 Jan 2014 17:03:53
Message: <52c88549$1@news.povray.org>
Am 04.01.2014 22:15, schrieb Stephen:
> I've looked but cannot find the answer. :-)
>
> How can I convert a text string in the form of "<x,y,z>" to a vector
> that I can use as a camera position?

#include "strings.inc"
#declare MyString = "<3.3, 6, 2>";
#declare MyVector = Parse_String(MyString);

Alternatively you could write the string to a temporary file (using the 
#fopen, #write and #fclose directives) and include it, but as a matter 
of fact that's exactly what Parse_String does.


Post a reply to this message

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