POV-Ray : Newsgroups : povray.binaries.images : the Utah teapot is older than you think! Server Time
14 Nov 2024 20:30:24 EST (-0500)
  the Utah teapot is older than you think! (Message 1 to 10 of 19)  
Goto Latest 10 Messages Next 9 Messages >>>
From: Bill Pragnell
Subject: the Utah teapot is older than you think!
Date: 4 Feb 2009 19:10:01
Message: <web.498a2d248d7f70a2219167190@news.povray.org>
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...

I haven't tested it thoroughly yet, but I think it should work on everything -
csg, meshes, open meshes, patches, the lot.

:)


Post a reply to this message


Attachments:
Download 'utah10000bc.jpg' (98 KB)

Preview of image 'utah10000bc.jpg'
utah10000bc.jpg


 

From: Kenneth
Subject: Re: the Utah teapot is older than you think!
Date: 5 Feb 2009 02:35:01
Message: <web.498a964c2cee23eef50167bc0@news.povray.org>
"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.

Ken W.


Post a reply to this message

From: Paolo Gibellini
Subject: Re: the Utah teapot is older than you think!
Date: 5 Feb 2009 04:41:22
Message: <498ab442@news.povray.org>
Very nice!
How did you treat the placing of the objects inner the cavities?
;-)
Paolo

 >Bill Pragnell  on date 05/02/2009 01:04 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...
> 
> I haven't tested it thoroughly yet, but I think it should work on everything -
> csg, meshes, open meshes, patches, the lot.
> 
> :)
> 
> 
> ------------------------------------------------------------------------
>


Post a reply to this message

From: Carlo C 
Subject: Re: the Utah teapot is older than you think!
Date: 5 Feb 2009 05:15:01
Message: <web.498abb122cee23eeeaeb67c40@news.povray.org>
"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...
>
> I haven't tested it thoroughly yet, but I think it should work on everything -
> csg, meshes, open meshes, patches, the lot.
>
> :)

Really interesting!

--
Carlo


Post a reply to this message

From: Bill Pragnell
Subject: Re: the Utah teapot is older than you think!
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

From: Kenneth
Subject: Re: the Utah teapot is older than you think!
Date: 5 Feb 2009 15:00:06
Message: <web.498b43d72cee23eef50167bc0@news.povray.org>
"Bill Pragnell" <bil### [at] hotmailcom> wrote:

>
> 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.

'Voxels', as in, all the points (the 'resolution') that are linearly
stepped-though in the bounding box, to cover its total volume? And shooting a
few trace rays from each point? If I have that right, that's cool. (It's cool
in any case, of course!) Or by 'resolution,' do you mean the number of rays
that are traced from each voxel point? I'm getting a good overall mental
picture of the process, and seeing its intrinsic simplicity.

KW


Post a reply to this message

From: Bill Pragnell
Subject: Re: the Utah teapot is older than you think!
Date: 5 Feb 2009 16:05:06
Message: <web.498b53d52cee23ee7da89d350@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
> 'Voxels', as in, all the points (the 'resolution') that are linearly
> stepped-though in the bounding box, to cover its total volume?

Yup, voxels is probably the wrong word, it's just a 3d grid through the bounding
box.

> And shooting a
> few trace rays from each point?

Aye. I fill an array with 6 vectors (currently x, -x, y, -y, z, -z) before
starting, and loop through them for each point visited. If I get a hit within
the step distance from the grid point (or some multiple thereof), I place a
secondary object there.

> Or by 'resolution,' do you mean the number of rays
> that are traced from each voxel point?

I give the macro a step distance to specify the resolution of the grid on each
axis, and just ignore the fact that it probably doesn't divide exactly into the
dimensions of the bounding box.

It's remarkably simple, I'm amazed I never thought of it before. On the other
hand, I don't have a specific use for this at the moment, I'm just larking
around! :-) If there's definite interest I'll post the code at some point...

Bill


Post a reply to this message

From: Jim Charter
Subject: Re: the Utah teapot is older than you think!
Date: 5 Feb 2009 16:08:47
Message: <498b555f$1@news.povray.org>
Bill Pragnell 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...
> 
> I haven't tested it thoroughly yet, but I think it should work on everything -
> csg, meshes, open meshes, patches, the lot.
> 
> :)
> 
> 
> ------------------------------------------------------------------------
> 
Oh Baby!


Post a reply to this message

From: Bill Pragnell
Subject: Re: the Utah teapot is older than you think!
Date: 5 Feb 2009 17:00:04
Message: <web.498b604b2cee23ee7da89d350@news.povray.org>
These images illustrate the distribution of placed objects. The top one randomly
rotates the direction vectors before looking for surfaces, the bottom one just
uses +- x, y, z.


Post a reply to this message


Attachments:
Download 'spiky.jpg' (256 KB)

Preview of image 'spiky.jpg'
spiky.jpg


 

From: Thomas de Groot
Subject: Re: the Utah teapot is older than you think!
Date: 6 Feb 2009 03:20:57
Message: <498bf2e9@news.povray.org>
"Bill Pragnell" <bil### [at] hotmailcom> schreef in bericht 
news:web.498a2d248d7f70a2219167190@news.povray.org...
> 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...
>
> I haven't tested it thoroughly yet, but I think it should work on 
> everything -
> csg, meshes, open meshes, patches, the lot.
>
> :)
>

Nice work!

Interestingly, Tim Attwood posted something similar in povray.advanced-users 
on January 22nd, 2007, 
http://news.povray.org/povray.advanced-users/thread/%3C45b52eed%241%40news.povray.org%3E/?ttop=299803&toff=100

and which I have used a couple of times. Would be interesting to compare 
methods...

Thomas


Post a reply to this message

Goto Latest 10 Messages Next 9 Messages >>>

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