Hi All!

Help me please

the problem with 3d and 2d graphics

i have Rectangle and i need rotate it

i'll do it from the rotation matrix

TForm1::P3d __fastcall TForm1::R(TForm1::P3d thk,double angel)

{

P3d t;

t.x=thk.x*cos(angel)-thk.x*sin(angel)+thk.x;

t.y=thk.y;

t.z=thk.z*sin(angel)+thk.z*cos(angel)+thk.z;

return t;

and then translate it to the 2d byQuote:}

TForm1::P3d __fastcall TForm1::DD(TForm1::P3d thk,TForm1::P3d c)

{

P3d t;

t.x=c.x+thk.x+thk.z/1.4;

t.y=c.y+thk.y-thk.z/1.4;

t.z=thk.z;

return t;

//c.x and c.y is the center

where P3d isQuote:}

struct P3d

{

double x,y,z;

and where angel is angleQuote:};

i v rotate it by the timer

when it begin's at first it stand begear then smaler but a little it rotate

and then it fly away

i don't know what to do please help me!

if need i can give full code

with best regards Arkan.