i'am a junior in computer graphics , currently i learn how to draw ellipses with rotation .
when i preform rotation with 90deg or 180deg nothing unusual happened , but when i try to rotate with any other value the result will be like this :
here's a pseudo-code of what iam doing , i didn't put the original function because it's huge .
function draw_circle( x_origin , y_origin , width , height ){
// go in scan-line order and try to find intercept x,y around the ellipse
for( y = 0 ; y <= height ; y++ ){
for( x = width ; x >= 0; x-- ){
// when we find point x , y
if( ( x*x / width ) + ( y*y / height ) <= 1 ){
// rotate a copy of x,y
rotate_z( x , y , by_angle );
// draw the rotate x,y copy
set_pixle( x_origin + x , y_origin + y );
/*
then preform reflection in the other side
of the ellipse
*/
}
}
}
}