Pixel Separated Rotation - ( SDL C++ )

Channel:
Subscribers:
403
Published on ● Video Link: https://www.youtube.com/watch?v=p97TX7kDND8



Duration: 0:36
1,572 views
7


Rotating a square shape of pixels with a lovely red gradient for experimental purposes.
"I don't have the source code for this anymore sorry"

Used:
SDL 1.2
C++

Rotation :

unsigned int nx = x * cos(test_value * M_PI/180) - y * sin(test_value * M_PI/180);

unsigned int ny = x * sin(test_value * M_PI/180) + y * cos(test_value * M_PI/180);

^^ that's apparently a matrix in c++ lol....







Tags:
C++
Matrix
Rotation
Affine
Transformation
Pixels
red
gradient
sin
cos
M_PI
180
Radians
SDL
WIN32
win32
rose
Linear Algebra (Field Of Study)