RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Page "ColourTrans/versions/2" does not exist. Please create it now, or hit the "back" button in your browser.

Transformation Examples

Programmer's Reference Manuals

Transformation Examples

Notes

Rotation can be performed by using:
a = cos(angle)
b = sin(angle)
c = sin(angle)
d = cos(angle)

Scaling can be performed by using:
a = scale
b = 0
c = 0
d = scale

Translation can be performed by using:
e = x translation
f = y translation

So to render a non-rotated 1:1 Draw file at (x,y)1 , the transformation matrix is:

1 << 16 0 0
0 1 << 16 0
256x 256y 1

And thus:

a = 1 << 16 b = 0
c = 0 d = 1 << 16
e = 256x f = 256y

See also

  • Transformation Matrix
Created on October 3, 2009 18:20:58 by Alan Robertson (52)? (127.0.0.1)
Edit | Views: Print | Source | Linked from: Transformation Matrix

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys