POV-Ray : Newsgroups : povray.general : Thought for future pattern type - array : Re: Thought for future pattern type - array Server Time
29 Jul 2024 14:24:44 EDT (-0400)
  Re: Thought for future pattern type - array  
From: Trevor G Quayle
Date: 18 Mar 2011 16:15:00
Message: <web.4d83bcc7f8aa102581c811d20@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 18.03.2011 17:59, schrieb Trevor G Quayle:
> > With some of the experiments I have been working on lately I though of a
> > potential pattern type that could be developed for future consideration:
> >
> > array
> >
> > You would basically create a 1D,2D or 3D array with as many elements as you
> > would like and assign values to each element, then the pattern would fill a 1
> > unit cube space, similar to density_file pattern.
> >
> > I came across this idea as I am currently doing this the long way: export array
> > to df3, then read as density_file.  Would be much easier to cut out the middle
> > step somehow.
>
> Your prior postings already had me thinking about that, too. Should be
> pretty straightforward to implement - I guess the biggest problem would
> be to decide on a syntax ;-)

array MyArray

Would likely be simple enough.  The means are already there to poll the array to
check the number of dimensions and size if needed.  Would just require MyArray
to be pre-defined and filled with numerical floats.

Would there be a need to declare the array on-the-fly?  I.e. in the array
pattern statement, rather than being pre-declared?  This may require declaring
of array dimensions and sizes much like mesh2, or it could be declared similar
to splines.

Another item of thought would be is there any need to have it a) appear only
once, with a value of 0 (or 1) outside the <0,0,0><1,1,1> cube, similar to
density_file pattern behaviour, or have it repeat on each axes, similar to other
patterns like checker, image_map.  Either way it isn't difficult to manipulate
the pattern in POV to replicate the other.  A general intuitive or easy
implementation may be similar to image_map, where it repeats endlessly, but the
keyword 'once' can be specified.

-tgq


Post a reply to this message

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