POV-Ray : Newsgroups : povray.binaries.images : Tilemap patch for Megapov 1.2 : Re: Tilemap patch for Megapov 1.2 Server Time
5 Nov 2024 12:36:50 EST (-0500)
  Re: Tilemap patch for Megapov 1.2  
From: Rune
Date: 12 Sep 2006 08:31:13
Message: <4506a891$1@news.povray.org>
Chris Jeppesen wrote:
> A sample image for a patch I made to Megapov 1.2, which I hope to have
> incorporated into the next version. Read about it in
> povray.unofficial.patches .

Well, that's nice, but couldn't the same thing have been made with a macro 
using nested gradient patterns? The syntax wouldn't be as neat, but it could 
still be made rather easy (if a bit clumsy):

#declare tile_map = array[13][2] {
{array[2]{0,0},array[2]{"png","1test.png"}},
{array[2]{0,2},array[2]{"png","1test.png"}},
{array[2]{0,4},array[2]{"png","1test.png"}},
{array[2]{1,1},array[2]{"png","2test.png"}},
...
}

Or a different approach:

#declare tile_map = array[13][2] {
{"0,0","1test.png"},
{"0,2","1test.png"},
{"0,4","1test.png"},
{"1,1","2test.png"},
...
}

And the macro could then be invoked with something like this:

pigment {MakeTileMap(6,6,tile_map)}

Rune
-- 
http://runevision.com


Post a reply to this message

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