/* This file is part of Bolixo. Bolixo 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 3 of the License, or (at your option) any later version. Bolixo 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 Bolixo. If not, see . */ /* Generate a background image for bolixo. It uses a random generator to create a mesh. It generates openscad language used to render the mesh. */ #include #include #include #include #include #include using namespace std; struct POINT{ unsigned x; unsigned y; bool connected; POINT(){ x=0; y=0; connected = false; } POINT (unsigned _x, unsigned _y){ x = _x; y = _y; connected = false; } }; int main (int argc, char *argv[]) { glocal int ret = -1; glocal unsigned count = 50; glocal.ret = (argc,argv); setproginfo ("","0.0","..."); setarg ('c',"count","Number of points",glocal.count,false); int ret = -1; printf ("include \n"); FILE *fin = fopen ("/dev/urandom","r"); if (fin != NULL){ vector points; for (unsigned i=0; i return glocal.ret; }