00001 /* Rays 2 Polyhedron 00002 */ 00003 /* 00004 This file is part of PolyLib. 00005 00006 PolyLib is free software: you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation, either version 3 of the License, or 00009 (at your option) any later version. 00010 00011 PolyLib is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with PolyLib. If not, see <http://www.gnu.org/licenses/>. 00018 */ 00019 00020 00021 #define WS 0 00022 00023 #include <stdio.h> 00024 #include <stdlib.h> 00025 #include <polylib/polylib.h> 00026 00027 int main() { 00028 00029 Matrix *R; 00030 Polyhedron *P; 00031 00032 R = Matrix_Read(); 00033 if(R->NbColumns < 2) { 00034 printf("Wrong input: %d columns\n", R->NbColumns ); 00035 Matrix_Free(R); 00036 exit(1); 00037 } 00038 P = Rays2Polyhedron(R,WS); 00039 Matrix_Free(R); 00040 Polyhedron_Print(stdout,P_VALUE_FMT,P); 00041 Domain_Free(P); 00042 return 0; 00043 } 00044