POV-Ray : Newsgroups : povray.binaries.images : blob words : Re: blob words Server Time
28 May 2024 08:55:58 EDT (-0400)
  Re: blob words  
From: Alain Martel
Date: 31 Jan 2022 10:55:02
Message: <61f80656@news.povray.org>
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}
//This translate your object by minus the found value, apply your 
//rotation, then translate your object back to it's original location.

Post a reply to this message

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