Article View: comp.sys.mac
Article #18551Rotation Algorithm needed
From: J.T. Teh
Date: Fri, 28 Aug 1987 02:46
Date: Fri, 28 Aug 1987 02:46
26 lines
1633 bytes
1633 bytes
I need a rotation algorithm that will allow me to rotate the contents of
a bounding rectangle at a given angle. Currently, I am using the standard
algorithm of rotating the point around the origin with
[ cosX -sinX ][ x ]
[ sinX cosX ][ y ]
but this causes the resultant image to have "holes" in it if I am rotating
a filled image (with black). Each set pixel in the bounding rectangle is
rotated in this fashion and is very tedious as each row of pixels has to
be scanned. I know that this is a very slow method but I am currently stuck
with it for want of a better method.
The free rotation method used in SuperPaint does not have this problem and
I would like to know how those guys did it.
I am using the rotation as part of an Honours Project application in visual
recognition and would appreciate it greatly if somebody could mail me a
better algorithm. If there is anyone else who would be interested in such
an algorithm, I will post the suggested algorithms on the news.
Thanks in advance.
J.T. Teh
===========================
UUCP: {seismo,mcvax,ukc,ubc-vision}!mulga!jteh
ARPA: jteh%mulga.oz@seismo.css.gov
CSNET: jteh%mulga.oz@australia
Technical Details
Message-ID:
<2180@mulga.oz>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!munnari!mulga!jtehShow 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!munnari!mulga!jteh From: jteh@mulga.oz (J.T. Teh) Newsgroups: comp.sys.mac Subject: Rotation Algorithm needed Message-ID: <2180@mulga.oz> Date: Thu, 27-Aug-87 22:46:10 EDT Article-I.D.: mulga.2180 Posted: Thu Aug 27 22:46:10 1987 Date-Received: Sat, 29-Aug-87 17:23:05 EDT Organization: Comp Sci, Melbourne Uni, Australia Lines: 26 Keywords: Rotation, Mac