LTCD_060719.ISO
This commit is contained in:
commit
f86e69648b
156 files changed
+49537
No files matched your search
@@ -0,0 +1,60 @@
|
||||
GrBitMap *base=GrNew(grbase2);
|
||||
|
||||
void DrawIt()
|
||||
{
|
||||
ClearWindowText;
|
||||
base->pen_width=2;
|
||||
base->color=GR_RED;
|
||||
GrLine3(base,-100,-100,-100, -100, 100,-100);
|
||||
GrLine3(base,-100, 100,-100, 100, 100,-100);
|
||||
GrLine3(base, 100, 100,-100, 100,-100,-100);
|
||||
GrLine3(base, 100,-100,-100, -100,-100,-100);
|
||||
|
||||
GrLine3(base,-100,-100, 100, -100, 100, 100);
|
||||
GrLine3(base,-100, 100, 100, 100, 100, 100);
|
||||
GrLine3(base, 100, 100, 100, 100,-100, 100);
|
||||
GrLine3(base, 100,-100, 100, -100,-100, 100);
|
||||
|
||||
GrLine3(base,-100,-100, 100, -100,-100,-100);
|
||||
GrLine3(base,-100, 100, 100, -100, 100,-100);
|
||||
GrLine3(base, 100, 100, 100, 100, 100,-100);
|
||||
GrLine3(base, 100,-100, 100, 100,-100,-100);
|
||||
}
|
||||
|
||||
void Box()
|
||||
{
|
||||
double theta=0,phi=0,zeta=0,s=1,s1=1.05;
|
||||
I8 *r1,*r2,*r3,*r4,*r5;
|
||||
U8 sc,ch;
|
||||
U4 *old_update_window=Fs->update_window;
|
||||
Fs->update_window=&DrawIt;
|
||||
|
||||
base->x=200;
|
||||
base->y=200;
|
||||
base->flags|=BMF_TRANSFORMATION;
|
||||
while (TRUE) {
|
||||
if (ScanChar(&sc,&ch)) break;
|
||||
r1=GrTheta(theta);
|
||||
r2=GrPhi(phi);
|
||||
r3=GrTheta(zeta);
|
||||
r4=GrMulMat(r1,r2);
|
||||
r5=GrMulMat(r4,r3);
|
||||
Free(base->r);
|
||||
base->r=GrScaleMat(r5,s);
|
||||
Free(r1);
|
||||
Free(r2);
|
||||
Free(r3);
|
||||
Free(r4);
|
||||
Free(r5);
|
||||
|
||||
Sleep(60);
|
||||
theta+=pi2/70;
|
||||
phi +=pi2/90;
|
||||
zeta +=pi2/110;
|
||||
s *=s1;
|
||||
if (s<0.2|| s>1.4) s1=1/s1;
|
||||
}
|
||||
Fs->update_window=old_update_window;
|
||||
}
|
||||
|
||||
Box;
|
||||
Reference in new issue
Block a user