POV-Ray : Newsgroups : povray.binaries.images : Alley Sunflower WIP : Re: Alley Sunflower WIP Server Time
2 Nov 2024 18:48:23 EDT (-0400)
  Re: Alley Sunflower WIP  
From: Dave Blandston
Date: 28 Apr 2010 04:35:00
Message: <web.4bd7f307f8dc137bcba3fb0f0@news.povray.org>
"Nekar Xenos" <nek### [at] gmailcom> wrote:
> I still get 3 of the same bricks in a row. Any ideas on how to get it more
> random?

Besides not having the same brick appear twice in a row, you probably don't want
the same brick appearing directly above or below. One possible method (although
not as cool as the previous suggestion) could be to create a two-dimensional
array (or three-dimensional, if you also want to worry about the corners of the
wall). Assign a number to each brick type, and store that number in the
corresponding array location as the bricks are placed in the wall. As you add a
new brick, compare the new brick type to the two bricks below and the one
already placed on the same row. If the new brick matches any of the already
created bricks, select a different type and compare again.

Regards,
Dave Blandston


Post a reply to this message

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