[jugglemaster] Dynamic scaling?

Chunky Kibbles chunky at icculus.org
Thu Sep 7 16:06:09 EDT 2006

On Thu, Sep 07, 2006 at 12:13:03PM +0900, Per Johan Groland wrote:
> On 9/6/06, Chunky Kibbles <chunky at icculus.org> wrote:
> >What I'm looking for is kind of a normalised pattern, where the hands are
> >always moving over the same area, and the height of the balls just goes
> >up as there are more of them. The head would *always* be in the same
> >place and the same size.
> >
> >I guess the simplest way to look at it is this; currently, I have a
> >little guy in a 3d world. I can't just scale the pattern and slap it in
> >front of him - and I'm lazy, and want to be able to :-)
> Well, scaling the pattern so that the head is always the same size is easy.
> Just keep the internal window size constant and calculate the x and y 
> scaling
> factor required to resize the head to your required dimensions. To keep the
> head in a constant position, just calculate a x and y offset based on the
> position of the head after scaling. Making the center of the head (0,0) 
> sounds
> reasonable.

Aye, that's what I'm doing right now. Works well enough, just feels

> The Juggler class would support turning different types of transformations
> on and off, such as "flip y axis," "keep head size constant," "set origin
> to center of head," "set origin to middle of screen," "scale x by this 
> factor,"
> "scale y by this factor" etc etc...

All because I'm pretty much using JMLib as it wasn't intended to be used

Gary (-;

More information about the Jugglemaster mailing list