POV-Ray : Newsgroups : povray.binaries.images : Muchos Huevos : Re: Muchos Huevos Server Time
11 Aug 2024 13:18:26 EDT (-0400)
  Re: Muchos Huevos  
From: SunTzu2
Date: 16 Apr 2004 09:45:00
Message: <web.407fe295f43298e8eba257cf0@news.povray.org>
"Tim Nikias v2.0" <#macro timnikias (@) #local = "gmx.net" #end> wrote:

*snip*

> Another fast method (though I don't have the script for that right now) is
> to use functions. Similiar to the approach of saving all positions and
> checking those, you could use a function to keep track where the posititions
> are. In this manner, all positions get added to that function via
> redeclaration, and to check, you just have to do one call to the function.
> But this is just a speed-enhancement, the method is essentially the same.

I don't understand this at all.  I understand 'macros' in SDL (I think)and I
just looked at the POV documentation on functions, but don't see how one
can be used in this way.  If anyone can dig up a simple example I'd
appreciate it.

>
> You could also divide the space in which you place the eggs into cubes.
> Determine in which cube the new position is and only check that cube and the
> neighbourig cubes. Thus you don't check with positions which are too far
> away anyway.

Yea, I thought of this afterward too.  It just seemed more laborious to code
than I wanted to get into.  heh.

>
> Another method, which works in many cases, is just calculate a grid of
> positions with enough distance to each other, and then randomize those
> points slightly. If done correctly, the observer won't notice the underlying
> pattern and it will seem random. There no checking with other positions
> done, which is a major speed up.

I like this idea!  As you say, if the initial spacing and magnitude of
subsequent randomization are selected correctly, there is no need to check
anything.  Very nice.  Thanks.


Post a reply to this message

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