00001 //---------------------------------------------------------------------- 00002 // The Motion Strategy Library (MSL) 00003 //---------------------------------------------------------------------- 00004 // 00005 // Copyright (c) 1998-2000 Iowa State University and Steve LaValle. 00006 // All Rights Reserved. 00007 // 00008 // Permission to use, copy, and distribute this software and its 00009 // documentation is hereby granted free of charge, provided that 00010 // (1) it is not a component of a commercial product, and 00011 // (2) this notice appears in all copies of the software and 00012 // related documentation. 00013 // 00014 // Iowa State University and the author make no representations 00015 // about the suitability or fitness of this software for any purpose. 00016 // It is provided "as is" without express or implied warranty. 00017 //---------------------------------------------------------------------- 00018 00019 #include <stdlib.h> 00020 #include <stream.h> 00021 00022 main(int argc, char **argv) 00023 { 00024 if (argc < 7) { 00025 cout << "Usage: rectangle x1 y1 z1 x2 y2 z2 \n"; 00026 exit(-1); 00027 } 00028 00029 double x0=atof(argv[1]); 00030 double y0=atof(argv[2]); 00031 double z0=atof(argv[3]); 00032 double x1=atof(argv[4]); 00033 double y1=atof(argv[5]); 00034 double z1=atof(argv[6]); 00035 00036 cout << "(" << x0 << "," << y0 << "," << z1 << ") "; 00037 cout << "(" << x0 << "," << y0 << "," << z0 << ") "; 00038 cout << "(" << x1 << "," << y0 << "," << z0 << ") "; 00039 cout << '\n'; 00040 cout << "(" << x1 << "," << y0 << "," << z0 << ") "; 00041 cout << "(" << x1 << "," << y0 << "," << z1 << ") "; 00042 cout << "(" << x0 << "," << y0 << "," << z1 << ") "; 00043 cout << '\n'; 00044 00045 cout << "(" << x1 << "," << y0 << "," << z0 << ") "; 00046 cout << "(" << x0 << "," << y0 << "," << z0 << ") "; 00047 cout << "(" << x0 << "," << y1 << "," << z0 << ") "; 00048 cout << '\n'; 00049 cout << "(" << x0 << "," << y1 << "," << z0 << ") "; 00050 cout << "(" << x1 << "," << y1 << "," << z0 << ") "; 00051 cout << "(" << x1 << "," << y0 << "," << z0 << ") "; 00052 cout << '\n'; 00053 00054 cout << "(" << x0 << "," << y1 << "," << z0 << ") "; 00055 cout << "(" << x0 << "," << y0 << "," << z0 << ") "; 00056 cout << "(" << x0 << "," << y0 << "," << z1 << ") "; 00057 cout << '\n'; 00058 cout << "(" << x0 << "," << y0 << "," << z1 << ") "; 00059 cout << "(" << x0 << "," << y1 << "," << z1 << ") "; 00060 cout << "(" << x0 << "," << y1 << "," << z0 << ") "; 00061 cout << '\n'; 00062 00063 cout << "(" << x1 << "," << y1 << "," << z0 << ") "; 00064 cout << "(" << x1 << "," << y1 << "," << z1 << ") "; 00065 cout << "(" << x1 << "," << y0 << "," << z1 << ") "; 00066 cout << '\n'; 00067 cout << "(" << x1 << "," << y0 << "," << z1 << ") "; 00068 cout << "(" << x1 << "," << y0 << "," << z0 << ") "; 00069 cout << "(" << x1 << "," << y1 << "," << z0 << ") "; 00070 cout << '\n'; 00071 00072 cout << "(" << x0 << "," << y1 << "," << z1 << ") "; 00073 cout << "(" << x1 << "," << y0 << "," << z1 << ") "; 00074 cout << "(" << x1 << "," << y1 << "," << z1 << ") "; 00075 cout << '\n'; 00076 cout << "(" << x1 << "," << y0 << "," << z1 << ") "; 00077 cout << "(" << x0 << "," << y1 << "," << z1 << ") "; 00078 cout << "(" << x0 << "," << y0 << "," << z1 << ") "; 00079 cout << '\n'; 00080 00081 cout << "(" << x1 << "," << y1 << "," << z0 << ") "; 00082 cout << "(" << x0 << "," << y1 << "," << z1 << ") "; 00083 cout << "(" << x1 << "," << y1 << "," << z1 << ") "; 00084 cout << '\n'; 00085 cout << "(" << x0 << "," << y1 << "," << z1 << ") "; 00086 cout << "(" << x1 << "," << y1 << "," << z0 << ") "; 00087 cout << "(" << x0 << "," << y1 << "," << z0 << ") "; 00088 cout << '\n'; 00089 00090 00091 } 00092 00093 00094 00095 00096