POV-Ray : Newsgroups : povray.binaries.images : Just dawdling : Re: Just dawdling Server Time
28 Sep 2024 17:03:47 EDT (-0400)
  Re: Just dawdling  
From: Samuel B 
Date: 21 May 2016 14:20:00
Message: <web.5740a5764e13f4859adf830b0@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:
> If anyone - Sam? - has a pointer to the original theory or perhaps
> source code for the strands technique I would appreciate it. I've done
> some searches with the word strands, but come up empty and I don't quite
> see what is being done.
>

Hi Bill.

The basic idea is to create a 2D array (representing a bitmap) initialized with
zero values. Seed it with some non-zero values, then start testing pixels at
random.

If a tested pixel is non-zero, then start moving from that position in some
(possibly meandering) direction and keep moving until either the particle's
lifespan is over, or until another non-zero pixel has been detected. Store every
position the particle traverses during this step into a temporary 1D array. Now
draw the particle's path to the 2D array (and to the screen), interpolating from
the gray scale value found at its starting point to the value found at its
endpoint (black if it never hit anything).

You can also keep track of angles, which is what I did in the program so the
lines wouldn't just shoot off in any random direction (unless you wanted them
to). There was also a gap-filling step you could initiate, since filling up the
entire 2D array by randomly testing points can take a long time.

Hope some of that made sense :)

As for the source code: if it's not in the archive I posted way back, then it's
in my older computer. Also, I chose the name "Strands" for lack of anything else
to call it; it's not a term used with whatever technique my program used.

Sam


Post a reply to this message

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