Article View: comp.sys.mac
Article #18681Re: Rotation Algorithm needed
From: Spencer W. Thomas
Date: Tue, 01 Sep 1987 15:50
Date: Tue, 01 Sep 1987 15:50
42 lines
2232 bytes
2232 bytes
Summary:
Expires:
Sender:
Followup-To:
Distribution:
There are several algorithms for doing this, all based on a "scanline"
method. The basic idea is to skew the image first in the X direction,
then in the Y direction. You can accomplish a rotation up to 45deg
with this technique. To get rotations > 45 degrees, you first rotate
by a multiple of 90 (easily accomplished). Some references:
Catmull, E. and Smith, A.R., "3-D Transformations of Images in
Scanline Order", Computer Graphics, Vol 14, No 3, July 1980
(SIGGRAPH '80 Conference Proceedings).
Fant, K., "A Nonaliasing, Real-Time Spatial Transform
Technique", IEEE Computer Graphics and Applications, January
1986, (See also Letters to the Editor, IEEE CG&A, March 1986
and July 1986.)
Paeth, A., "A Fast Algorithm for General Raster Rotation",
Graphics Interface '86 Proceedings, May 1986.
I will attempt a picture demonstrating the technique:
.............. .............. ....
. . . . . ...
. . X skew . . Y skew .. ...
. . ------> . . -----> . ...
. . . . ... ..
. . . . ... ..
.............. .............. ... .
... ..
..
=Spencer ({ihnp4,decvax}!utah-cs!thomas, thomas@cs.utah.edu)
Technical Details
Message-ID:
<2129@utah-gr.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!ut-sally!utah-cs!utah-gr!spline!thomasReferences:
<2180@mulga.oz>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!ut-sally!utah-cs!utah-gr!spline!thomas From: thomas%spline.uucp@utah-gr.UUCP (Spencer W. Thomas) Newsgroups: comp.sys.mac Subject: Re: Rotation Algorithm needed Message-ID: <2129@utah-gr.UUCP> Date: Tue, 1-Sep-87 11:50:47 EDT Article-I.D.: utah-gr.2129 Posted: Tue Sep 1 11:50:47 1987 Date-Received: Sat, 5-Sep-87 03:54:38 EDT References: <2180@mulga.oz> Sender: news@utah-gr.UUCP Reply-To: thomas%spline.UUCP@utah-gr.UUCP (Spencer W. Thomas) Organization: Univ of Utah CS Dept Lines: 31 Keywords: Rotation, Mac