POV-Ray : Newsgroups : povray.binaries.images : tiling pattern challenge : Re: tiling pattern challenge Server Time
2 Nov 2024 08:24:25 EDT (-0400)
  Re: tiling pattern challenge  
From: stbenge
Date: 4 Mar 2011 16:03:14
Message: <4d715392@news.povray.org>
On 3/4/2011 12:33 PM, stbenge wrote:
> An extra array for referencing the pattern types /could/ be added to
> make the TileTypes variable obsolete, but it would lengthen the code.

This snippit probably won't make it in, but it might make your scene 
file easier to use. Here's what it would look like:

// Code

#declare TilingPattern = 17;

#declare TileReference =
   array[24]{
    1, 1, 2,
    1, 3, 2,
    2, 3, 3,
    1, 3, 3,
    3, 5, 2,
    3, 6, 2,
    3, 3, 6,
    3, 3, 5
   }

// automatically get the value for TileTypes
#declare TileTypes = TileReference[TilingPattern-1];

// ~Code

It's not compatible with my other code, but it could be with a couple of 
small alterations...

Also, you might want to clip TilingPattern:

#declare TilingPattern = clip(TilingPattern,1,24);

Sam


Post a reply to this message

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