POV-Ray : Newsgroups : povray.general : string interpretation : Re: string interpretation Server Time
31 Jul 2024 06:23:34 EDT (-0400)
  Re: string interpretation  
From: Sherry Shaw
Date: 22 Sep 2007 12:58:00
Message: <46f54998@news.povray.org>
Jim wrote:
> 
> #declare textString = concat ("T_Wood",str(frame_number,2,0));
> 

Tried sending that to #debug and got "T_Wood 0"; try this instead:

    #declare textString = concat ("T_Wood",str(frame_number,1,0));

The "L" parameter (the 1 in the middle) is the *minimum* length of the 
formatted number, so it doesn't truncate the value.  Didn't try it in a 
scene, and didn't use frame_number but rather just a loop index, but it 
looks right in the Messages pane.

--Sherry Shaw



-- 
#macro T(E,N)sphere{x,.4rotate z*E*60translate y*N pigment{wrinkles scale
.3}finish{ambient 1}}#end#local I=0;#while(I<5)T(I,1)T(1-I,-1)#local I=I+
1;#end camera{location-5*z}plane{z,37 pigment{granite color_map{[.7rgb 0]
[1rgb 1]}}finish{ambient 2}}//                                   TenMoons


Post a reply to this message

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