RURIKO.C   

<

^

>


                                                      #include\
                                                  <time.h>     /*
                                                01               \\
                                               20                  X
                                              01                    */
                                             #                      include<math.h>
                                             #                       include <stdlib.h>
                                            #                        define P0(_)void _(void)
                                        float                        c=CLOCKS_PER_SEC,PI,g,h,m;;
                                     #ifdef/*                        -_-                    */_WIN32
                                   #define/*                        ;   */                    __LOSE32
                                #include/**/                             <windows.h>              /*X_X*/
                      #endif  /*=_Don_Yang_=                                (((_24Jan2001_8:18:56p_{{{{{{*/
                #define     P1(_)void _(int*                                 Q,float/**/N,float O,int/**/P){
             #/*                  ***/include                                 <GL/.././GL/glut.h>/*   *float*/
          int                        i,j,H,  Y,                               J,L,A,B,C,D,E,F,k,l,K;    float PI
         ,n                             ,o    ,r                             ,a,b,d,s,q,p,u,v,w,x,y,     z,M,e,f;
        /*                              =)     */                           clock_t/**/t,nt;P0(A0){if     (t==nt){
       nt                               =(      t=                         clock())+c;}s=(!L)?(clock(     )-t)/c:(L
       #                                /*      */                       define RE()glutPostRedisplay(     );H+=01;}
       ==                                3)     ?(                     nt-clock()) /c:1;if(s>1)s=1 ;if     (s<0)s=0;
        #                                 /*   !*/                 define/**/MD(_)  ;;glMatrixMode (+(     GL_##_));;
        if                                  (+nt  <=clock()){t=clock(); nt=c+t;if(   L==1){if (M<=0)M=     999.0/H;p=
          #                                 /*      */define/*?*/  L0(_   )gl## _##   List/*X  @_@          */(/*^^*/
           1;{;                             }}      else/* */if(L   ==3){if(Y==  10   *30)Y=   H;H          =0;p=0;e=(
               rand                         ()      %K)*PI  /l;f=(rand(    )%K)   *    PI/l    ;m=  64      +(rand()%k
                  );                        g=      (rand(   )%l)           *(         PI)/    K-PI/8;h=(    rand()%l
                  )                         *(      PI)/K-  PI/8             ;         }L=    (L+ 1)%4;  }   n=(( f-e
                 )*                        H)       /Y+e;q          =(float            )(     (J   ++)%+     360) ;if
                  (p                     >0)p       +=M;o=       ((h-g)*H  )/Y         +      g;v=m*sin(    o);u  =m
                    #                  define       F0(GK)     gl   ##GK##                     Func(/*GL    FUNC */
                     *(             cos (o))*       sin (n)  ;w=m   *cos(o)                     *cos(n)     +p
                     /2;x=     u/-9;     y=v/       -9;  z= w/-9+p/3;RE()P0                       (R)       {;
                     glColor4d(1,    1,1,1);}       P0(S  )    {glColor4d(                                  .5
                    #define/**/G(   _)     /*       ^_^;   \    X*/GL_##_                                  /**/
                    ,1,1,.9);}P0(T  ){ double       _[]={          .12                                     ,.6,
                    .8,.6};glColor4dv(_   );}       P1(CP)                                                b=0;*
                   Q=glGenLists(01);   L0(New       )*Q,G(                                               COMPILE
                   ));for(i=0;i<11;i++      )       {d=(PI*                                              2*(i+1)
                   )/11;glColor4d(1,1,1,0.7);      glVertex3d                                          (0.,0,P);
                   glBegin(G(TRIANGLE_STRIP))       ;;    for(                                        j=00;j<8;j
                  ++){r=j/7.;r*=r;glColor4d(1       -r      ,+1-                                    .7*r,1-.5*r,
                  .3);glVertex3d(N*j*cos(b),N        *j*      sin                                 (b),P-O*j*j);;
                  glVertex3d(N*j*cos(d),N*j*         + sin(                                      d),P-O*(j*j));}
                 #define V(c,x,y)c();r=(O-N)         *    (y)+                                 N;a=(d-b)*(x)+b;\
                 glVertex3d(r*cos(a),r*sin(a         )        ,0);                          /**_E!!_**_SY!!_***/
                 #define U(O,m,o,i,k,a,n,e,_         )            V(O,m                   ,o);V(i,k,a);V(n,e,_);
                #define X(K,A,r,u,i,k,a,n,e          ,                _,I,o)U(      K,A,r,u,i,k,a,n,e);V(_,I,o);
                glEnd();b=d;};glEndList();;          }                    P1(CR)b=i=0;L0(New)*Q=glGenLists(1),G(
                COMPILE));for(;i<P;i++){d=0          +(                   float)((PI*2*(i+1))/P);glBegin(G(QUADS
                ));X(S,0,.62,S,0.01,0.62,S,          0.01,               .38,S,0,.38)X(S,.01,.38,S,.01,.62,R,.02
               ,.62,R,.02,.38)X(R,.02,.38,R          ,.02,.62,R,         .05,1,R,.05,0)X(R,.05,0,R,.05,1,R,.08,1
               ,R,.08,0)X(R,.08,0,R,.08,1,R          ,.14,1,R,.14,0)X(R  ,.14,0,R,.14,1,R,0.22,0.62,R,0.22,0.38)
               #define I(k,u,s,A,w,a,_R,U,r          ,i,K,o)X(k,u,s,A,w,a,_R,U,r,i,K,o);X(k,u,(1.0-s),A,w,(1.0-\
               a),_R,U,(1.0-r),i,K,(1.0-o))          ;/*_KinouKaraKyouE_KyouKaraAsuE_BokuTachiWa_AruiteYukoYo_*/
              #define W(O,m,o,i,k,a,n,e,__)          U(O,m,o,i,k,a,n,e,__);U(O,m,(1.0-o),i,k,(1.-a),n,e,(1-__));
              I(S,0,.38,S,.01,.38,T,.01,0,T          ,0,.16)I(S,0.01,0.38,R,     .02,.38,R,.05,0,T,.01,0)I(S,.22
              ,0,R,.22,.38,R,.3,.5,S,.3,.38          )I(S,.3,.38,R,.3,.5,     S,0.36,     .5,S,.36,.38)I(T,.3,0,
              S,.3,.38,S,.36,.38,T,.36,.16)          X(S,.36,.38,S,.36,    .62,S             ,.4,.62,S,.4,.38)I(
              S,.36,.38,S,.4,.38,T,.4,.16,T          ,.36,.16)I(T,.36    ,.16,                  T,.4,.16,T,.4,0,
             T,.36,0)for(j=8;j<20;j++){I(T,           (j/20.),0,T,(     (j)/                      20.),.16,T,((j
             +1)/20.),.16,T,((j+1)/20.),0)I           (S,(j/20.0),     .38,                         S,((j+1.0)/
             20),.38,T,((j+1)/20.),.16,T,(j           /20.),.16)    X(S,(                             j/(20.)),
             .38,S,(j/20.),.62,S,((j+1)/20.           ),.62,S,(    (j+1                                )/20.0),
            .38)}glEnd();glBegin(G(TRIANGLES          ));W(T,    0,0,T                                   ,0,.16
            ,T,.01,0)W(R,.14,0,R,.22,.38,S,           .22,0)    U((R)                                     ,.22,
            .38,R,.22,.62,R,.3,.5)W(S,0.22,           0,S,    0.30,                                        .38,
            T,.3,0)W(T,.3,0,T,.36,.16,T,.36           ,0    )glEnd                                          ()
            ;b=d;}L0(End));}P0(R0){b=(float           ) glutGet(                                            0|
            GLUT_WINDOW_WIDTH);d=0.+(float)           glutGet(                                               0|
           GLUT_WINDOW_HEIGHT);glDrawBuffer           (G(BACK                                                 ))
           ;MD(PROJECTION)glLoadIdentity(/*             X                                                     */
           );if(i>j){b/=d;d=1;}else{d/=b;b=             1                                                      ;}
         glClear(G(COLOR_BUFFER_BIT));r=-b*             9                                                       ;
        a= d*9;glFrustum(r,-r,-a,a,5,10000)            /*                                                       XX
       X   */MD(MODELVIEW)glLoadIdentity();            /*                                                        X
     */   glScalef(4,4,4);gluLookAt(u,v,w,x            ,y                                                        ,z
    ,0    ,1,0);glPushMatrix();glScalef(s,s            ,s                                                         )
   ;{;}   glPushMatrix();glRotatef(q,0.0,0.            ,1                                                         );
  /*X*/   glScalef(-1,1,1);glCallList(A);/*            */                                               L0(Call)C)/*
  (((*/; glPopMatrix();glRotatef(q,0,0,-1);            L0                                       (Call)B);glPopMatrix
   ();if (p>0){glTranslatef(0,0,p);L0(Call)             D                                  );L0(Call)(H&1)?E:F);}{;}
    glutSwapBuffers();glFlush();}void/**/K0             (                             unsigned char c,int   u,int v)
     {glFinish();exit(0);}int main(int/*XX*/            GK         ,              char**Q){glutInit(&GK,    Q);;srand
      (time(NULL));PI=atan2(0,-1);K=2*(l=2*(k=1         <<         8          ));glutInitDisplayMode(+      GLUT_RGBA
       |GLUT_DOUBLE);glutInitWindowSize(640,480);       {;          }     glutSetWindow(/*==*Ikusawa         Ruriko
        */glutCreateWindow("Ruriko"));F0(utDisplay)     R0          ); t=L=nt=H=J=0;F0(utIdle)A0);            s=q=
       p=M=0;F0(utKeyboard)K0);F0(Blend)G(SRC_ALPHA),G(ONE           ));glEnable(G(BLEND                      ))
      ;Y =3000;L0(New)D=glGenLists(1),G(COMPILE));/**/               glColor4d(.5,.8,                         .9
      ,  .3);glutSolidSphere(26,14,7);L0(End));e=f=g=h               =u=v=x=y=z=0;m=                           w=
     k;  CR(&A,60,75,2);CR(&B,100,110,3);CR(&C,155,165                ,8);CP(&E,20,8,                          28
     )   ;CP(&F,18,4,30);  glutMainLoop();return(0);}

  NFO RAR ZIP DETAILS SAMPLE /
2016-11-24