POV-Ray : Newsgroups : povray.binaries.images : Markov Chain : Re: Markov Chain Server Time
28 Sep 2022 05:50:42 EDT (-0400)
  Re: Markov Chain  
From: ingo
Date: 1 Jul 2021 14:00:45
Message: <XnsAD5ACB91B6306seed7@news.povray.org>
in news:web.60ddaa903c46af395e0fed26cde94f1@news.povray.org jr wrote:

> hi,
> ingo <ing### [at] tagpovrayorg> wrote:
>> The result of an attempt to create Markov Chains.
> thanks, interesting.  like PG I've not seen Markov Chains used to
> generate graphics/patterns, only knew of an application which
> generates "gibberish" text. 
Oh, they are used for all kinds of things, page rankings, weather 
prediction (in a simple way). In generative music they are used for 
(beat)pattern generation and chord progression.

Here's an other one. Although I didn't feel like hand filling the chances 
in a 256 point transition matrix so I condensed it a bit.

I used a simple kind of domino like shape. Square with cutouts, 5 shapes, 
with rotations resulting in 16 shapes. 
Placed in a grid with random choise of shape but within rule set:
   - start bottom left, then progress row by row
   - left side of next shape is same as right side of left neighbour.
   - bottom side of a next shape is same as top side of neighbour below.
   - if the last piece is within the range of possible pieces, given the
     neighbours shapes increase its chance (in a naive way)

The Markov chains can also be used for texture generation. Instead of the 
simple shapes I used you can use square of textures with very simmilar 

An other application is adding vegetation to a landscape. Use some rules 
to select a range of vegetation types. Then use markov to select a tree 
from the bunch. A rule can be to have a look at the trees in the 
neighbourhood and then increase the chance on the same tree. The higher 
the order of the transition matrix the more "clumping" of the same type 
you get. 


Post a reply to this message

Download 'domino2.pov.txt' (10 KB) Download 'domino2.png' (274 KB)

Preview of image 'domino2.png'


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