POV-Ray : Newsgroups : povray.text.scene-files : Can I use variables for string value in text object? Server Time
1 Nov 2024 01:24:53 EDT (-0400)
  Can I use variables for string value in text object? (Message 1 to 1 of 1)  
From: Andy Woodfin
Subject: Can I use variables for string value in text object?
Date: 15 Sep 1998 14:00:02
Message: <35FE9D04.B3BEC092@uncc.edu>
I am using a while loop nested in another to create an array of objects
(as quoted below), and I'd like to make text labels for the rows and
columns giving the numerical value for each. I only know how to make
text objects with literal strings, though. Is there a way to use
variables for the string values, i.e., I would like to make a text
object at the beginning of each iteration using the values of "Row" and
"Column".

Thanks,
Andy

#declare ROWS =
#declare COLUMNS =
#declare Row=0
#while (Row<ROWS)
#declare Column=0
#declare Row=Row+1
#while (Column<COLUMNS)
 #declare Column=Column+1
  superellipsoid { <Row/ROWS, Column/COLUMNS>
        texture {
                pigment { Blue }
                }
                finish { phong 1 }
        }
        scale <Xscale, Yscale, Zscale>
        rotate <-10,35,0>
       translate <Xspace*Xscale*Column, Yspace*Yscale*Row, -2>
       }

#end

#end



--
--------------------
Andrew Woodfin
UNC Charlotte Center for Precision Metrology
adw### [at] unccedu
--------------------


Post a reply to this message

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