/* * Copyright (C) 1991 By DeepCore Technologies * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 1, or any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * DeepCore Technologies * Att: Søren Schmidt Email: sos@kmd-ac.dk * Tritonvej 36 UUCP: ...uunet!dkuug!kmd-ac!sos * DK9210 Aalborg SO Phone: +45 9814 8076 */ #include #include "dgl.h" main(argc, argv) int argc; char **argv; { if (argc!=2) { printf("usage: tpic \n"); exit(1); } DGLInitMode(atoi(argv[1])); DGLClear(DGLDisplay, 0); /* draw box around screen */ DGLBox(DGLDisplay, 0, 0, DGLXsize-1, DGLYsize-1, 63); Mesh(); CornerCircles(0); ColorBars(); GrayScales(); CenterEllipsesClear(); CenterEllipses(63); while (1) { CornerCircles(rand()%256); sleep(1); CenterEllipses(rand()%256); sleep(1); } DGLEnd(); } Mesh() { int i; for (i=0; i=0; i-=5) { DGLEllipse(DGLDisplay, DGLXsize/2, DGLYsize/2, i, (DGLYsize/4)-1, color); DGLEllipse(DGLDisplay, DGLXsize/2, DGLYsize/2, (DGLYsize/4)-1, i, color); } } ColorBars() { int i; for (i=0; i<256; i++) { DGLLine(DGLDisplay, (DGLXsize/16)+1, i-128+DGLYsize/2, (DGLXsize/8)-1, i-128+DGLYsize/2, i); DGLLine(DGLDisplay, DGLXsize-1-(DGLXsize/16), 128-i+DGLYsize/2, DGLXsize+1-(DGLXsize/8), 128-i+DGLYsize/2, i); } }