POV-Ray : Newsgroups : povray.binaries.images : blob words : Re: blob words Server Time21 Mar 2023 22:35:52 EDT (-0400)
 Re: blob words
 From: Alain Martel Date: 31 Jan 2022 10:55:02 Message: <61f80656@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#61f80656%40news.povray.org",
"dateCreated": "2022-01-31T15:55:02+00:00",
"datePublished": "2022-01-31T15:55:02+00:00",
"author": {
"@type": "Person",
"name": "Alain Martel"
}
}
Le 2022-01-30 à 11:01, jr a écrit :
> hi,
>
> I started playing with some code that uses (English) dictionary words + phrases,
> the character ASCII values, to create points used to make the blob components.
> while it's early days, I post this topical image (in anticipation), each blob
> represents one word, no points for guessing them :-).  enjoy.
>
> 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.
>
>
> regards, jr.

Start by creating your shapes around the Y axis if possible.

Try using max_extent(Object) and min_extent(Object) like this :

#declare Centre = (max_extent(Object) + min_extent(Object) ) / 2;
//This will find the opposing corners of the bounding box, then find
//their average. That average value is the centre of your object.

#declare Object = object{Object translate -Centre rotate Some_Rotation
translate Centre}