POV-Ray : Newsgroups : povray.general : string code to load consecutive image_maps into array : Re: string code to load consecutive image_maps into array Server Time
24 Apr 2024 22:10:20 EDT (-0400)
  Re: string code to load consecutive image_maps into array  
From: jr
Date: 10 Oct 2020 07:05:00
Message: <web.5f81944f29a401cca8a81eb0@news.povray.org>
hi,

"Kenneth" <kdw### [at] gmailcom> wrote:
> For my recent and continuing 'city buildings' scene, I needed a way to load a
> bunch of consecutively-numbered image_maps into an array. ...
> Of course, you could further simplify the #for loop by inserting the entire
> concat(...) string into the pigment itself, eliminating the
> #declare MY_STRING = ...

or use a macro and dispense with the array altogether?!  eg.

#macro mkPigment(i_)
  pigment {image_map {jpeg concat("my image ",str(i_,0,0)," example.jpg")
interpolate 2}}
#end

(hopefully no typos)


regards, jr.


Post a reply to this message

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