polylib: r2p.c Source File

- Main Page
- Classes
- Files

# r2p.c

Go to the documentation of this file.

    00001 /*       Rays 2 Polyhedron
    00002  */
    00003
    00004 #define WS 0
    00005
    00006 #include <stdio.h>
    00007 #include <stdlib.h>
    00008 #include <polylib/polylib.h>
    00009
    00010 int main() {
    00011
    00012   Matrix *R;
    00013   Polyhedron *P;
    00014
    00015   R = Matrix_Read();
    00016   if(R->NbColumns < 2) {
    00017     printf("Wrong input: %d columns\n", R->NbColumns );
    00018     Matrix_Free(R);
    00019     exit(1);
    00020   }
    00021   P = Rays2Polyhedron(R,WS);
    00022   Matrix_Free(R);
    00023   Polyhedron_Print(stdout,P_VALUE_FMT,P);
    00024   Domain_Free(P);
    00025   return 0;
    00026 }
    00027