On 1/30/22 15:48, Cousin Ricky wrote:
> On 2022-01-30 12:01 (-4), jr wrote:
>> I had wanted to make an animation of the shapes rotating above the podium, but
>> they .. orbit. because the bounding box "method" doesn't work too well, I need
>> to calculate the geometric centre (?) of a given 'blob'. did some googling on
>> the subject but have only found 2D solutions so far. help please.
> I have a couple of suggestions. If you know the surface radius of each
> component, you can create a union of spheres, and take the center of the
> union. Function RE_fn_Blob_surface_radius() in roundedge.inc can
> calculate the surface radii.
> Alternatively, you can go brute force with trace() or inside(), and take
> the center of all the successful hits. inside() would take longer than
> trace(), due to being volumetric, but it would allow you to compute a
> rough center of gravity, rather than just computing the center of the
I'll toss a couple more ideas on the table.
You can still manually bound objects but you have to turn the automatic
bounding strip off. -ur (IIRC). Not sure any advantage over the union of
The blob object is one of two objects supporting a potential pattern for
itself. Further I think is uses effectively 'raw_wave' internally though
it's not brought all the way out to an official keyword in v3,8/v4.0 as
it is in povr. It should be you can sample actual blob internal values
too though unsure if any better than trace/inside testing. The greatest
inside value (most positive IIRC with blobs) won't necessarily be the
center of mass depending on the shape and construction.
The still image looks cool! :-)
Post a reply to this message