[vox-tech] Success with fltk and SDL_image

Bill Kendrick vox-tech@lists.lugod.org
Wed, 12 May 2004 13:47:01 -0700


On Wed, May 12, 2004 at 01:36:23PM -0700, Peter Jay Salzman wrote:
> Even for pi/2 rotations, it takes a little trig.   :-)

Hrm?

Nah!

for (y = height - 1; y >= 0; y--)
{
  for (x = width - 1; x >= 0; x++)
  {
    src_x = width - x - 1;
    src_y = height - y - 1;

    ... copy pixel from src surface @ (src_x,src_y) to
        dest surface @ (x,y)
  }
}

;^)

Or am I totally confused?


> therefore, a rotation in 2-space only has a single degree of freedom yet
> the rotation tensor has 4 components.  a rotation in 3-space has 6
> degrees of freedom yet the tensor has 9 components.
> 
> this means your rotations are inefficient if you chose this method to
> rotate pixels, since you're carrying around a lot of extra baggage in
> your calculations.
> 
> if you do a google search on "rotation quaternions" you'll find a much
> more efficient routine for rotations at the price of being much more
> abstract.

Well now I >am< totally confused! ;)

-bill!