TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: ADAM MAJER
from: RICHARD VAN BERKUM
date: 1998-05-11 20:51:00
subject: Rotate

 -=> Quoting Adam Majer to Richard van Berkum <=-
 AM> This is all wrong so far. In order to rotate a matrix (or a bitmap),
 AM> you must use the following:
 AM> NewX = x * cos(angle) + y * sin(angle);
 AM> NewY = -x * sin(angle) + y * cos(angle);
 AM> The x and y are the distances from the fixed rotation point (or
 AM> origin). You have to add offsets yourself. And angle must be defined in
 AM> radians. To convert degrees to radians
 AM> Rads = Degrees/180*M_PI;
 AM> That's all there's to it!
 
Thanx, I will give this a try.
                              
 AM> PS. You can check if I'm right :) Just rotate a point 360 degrees and
 AM> you'll see a circle :) Happy coding.
                              
Thank you and have a nice day.  
mzzl's Richard van Berkum
___ Blue Wave/386 v2.30 [NR]
                                                                              
             
--- GEcho1.11+/Intermail
---------------
* Origin: C-System, +31-70-3670598/3080494, Points & QWK, (2:281/400)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.