POV-Ray : Newsgroups : povray.binaries.images : the Utah teapot is older than you think! : Re: the Utah teapot is older than you think! Server Time
1 Aug 2024 02:21:45 EDT (-0400)
  Re: the Utah teapot is older than you think!  
From: Bill Pragnell
Date: 5 Feb 2009 07:35:01
Message: <web.498adcb62cee23ee6dd25f0b0@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
> "Bill Pragnell" <bil### [at] hotmailcom> wrote:
> > Taking a break from Lego, I thought of a nice efficient method of placing
> > objects relatively evenly over the surface of another object. This only took
> > about 10-15 seconds to parse, and a good deal of that was building the rock
> > mesh...
>
> What a great trick!  It sure beats a 'random' tracing operation, especially on
> the inside of the handle. *That's* magical. If you feel so inclined...PLEASE
> post the details. I can think of many uses for it, even revamping some of my
> old scenes.

I will eventually, I only threw it together the other night so I want to make
sure it works properly, and maybe improve its performance and options a little.

It's basically just a macro that loops over voxels in the target object's
bounding box, testing each one for proximity to a surface by firing a few rays
around. If it finds a surface close by, it puts a component object there.
Simple. Of course, halving the size of the resolution parameter causes an
eightfold rise in parsing time, but it's still tolerable even at very high
resolutions.

Naturally, there's no direction bias, so it finds all surfaces, even interior
ones and open ones (my original idea was to test for inside() first, but it's
not necessary to make it work).

Bill


Post a reply to this message

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