POV-Ray : Newsgroups : povray.unofficial.patches : Feasibility of features for 0.6 : Re: Feasibility of features for 0.6 Server Time
2 Sep 2024 04:13:00 EDT (-0400)
  Re: Feasibility of features for 0.6  
From: Chris Huff
Date: 17 May 2000 17:14:03
Message: <chrishuff_99-B86A09.16173417052000@news.povray.org>
In article <39229375.C496478E@my-dejanews.com>, 
gre### [at] my-dejanewscom wrote:

> I wrote my own which calls 2500 trace functions in a grid bounded by 
> min & max extent.  Seems a bit brutish. If mega did this, it would 
> just do the same thing, you're saying?

It is the only way I can think of to calculate the bounding box of an 
arbitrary object fairly accurately with the available data. A built-in 
function to do this would be faster, but would most likely have to do 
the same thing.
On the other hand, improving the blob bounding_box calculation would do 
the job with min_ and max_extent(), and would also make blob rendering 
faster.


> In my world, esoteric math thingies are more fun than photorealism. 
> My applications may be a bit eclectic and not worth the effort of the 
> whole pov team's development activity:
> A)    Seeing just how much space is in the noise3d function. (I'm 
> already working in my head on a way to do this metallographically).
> B)    I wanted to make physics-accurate (not merely physically 
> accurate) motion of a blob character, and I was thinking that knowing 
> its mass distribution would help.
> C)    In making advanced flocking algorithms, I was starting to 
> wonder if it's possible to use the 'mass' of the landscape within a 
> certain radius that it's about to collide with to guide its direction 
> for graceful, smooth, near-collisions.
> D)    If you build it, they will find it useful.

Some interesting uses for it...but it still might be done better as a 
macro. You could do it in several ways:
1: You can do an inside-outside test on any object by using the 
eval_pattern() function with the object pattern, doing this on many 
points in the object's bounding box could give a fairly good estimate.
2: You could use the trace function...trace until you hit the object, 
trace again, use the resulting distance from many of these done in a 
grid to calculate the volume. Not as reliable, but probably faster. You 
could probably combine the two methods in some way.

Oh, and for "B", you have to consider that volume is not a good 
indication of mass...the chest cavity wouldn't compare well with the 
upper leg, for example.
And for "C", have you considered using eval_pattern() with the proximity 
pattern?

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

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