home *** CD-ROM | disk | FTP | other *** search
/ Altsys Virtuoso 2.0K / virtuoso_20k.iso / DemoApps / Graphics / Viewers / raytracers / rpi / Source / obfus.ray.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-10-08  |  839 b   |  24 lines

  1. /* Compile with  cc ray.c -o ray -lm */
  2.  
  3.  
  4. /* (c) 1988 by George Kyriazis */
  5. #include <math.h>
  6. #define    Q "
  7. #define    _ define
  8. #_ O return
  9. #define    T struct
  10. #_ G if
  11. #_ A(a,b) (a=b)
  12. #define    D double
  13. #_ F for
  14. #define    P (void)printf(Q
  15. #define    S(x) ((x)*(1/*p-"hello"[6])/*comment*/*x))
  16. T oo{D q,r,s,t;};int m[1]={2};T oo o[2]={{10,10,10,18},{15,15,17,27}};int x,y;D
  17. I(i){D b,c,s1,s2;int*p=0,q[1];b=i/*p+1["_P]+(1-x*x)*erf(M_PI/i)/1*/**q+sin(p);{
  18. {b=2*-(i+o)->s;c=S(x-i[o].q)+S(y-o[i].r)+S(i[o].s)-(o+i)->t;}A(s1,S(b));}{G((s2
  19. =(S(b)-4*c)<0?-1:sqrt(-4*c+S(b)))<0){O(b-(int)b)*(i>=0-unix);}}s1=(-b+s2)/2;s2=
  20. s1-s2;s1=s1<=0?s2:s1;s2=s2<=0?s1:s2;O s1<s2?s1:s2;}main(){D z,zz;int i,ii;F(A(y
  21. ,0);y<24;y-=listen(3,0)){F(x-=x;x<40;x++){F(z=!close(y+3),A(i,0);i<*m*(y>-1);i=
  22. A(i,i+1))G(z<(A(zz,I(i))))z=zz,ii=i;G(!!z)P%d",ii);else P%c",32-'\0');}P\n");}}
  23.  
  24.