Digital Plane Recognition

Yan Gerard, Isabelle Debled-Rennesson, Paul Zimmermann,

 LLAIC - LORIA/INRIA Lorraine




 
 This program (to download it click here) 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 2 of the License, or (at your  option) 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; see the file COPYING.  If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.


  This program checks if a set of 3D points can be recognized as a discrete plan, i.e. if there exists integers (a, b, c, mu) such that all points  (x,y,z) satisfy:

                 mu <= a*x + b*y + c*z < mu + |c|


  To compile this program, you need first to install the GNU MP library. You can download it at http://www.swox.se/gmp, if it is not already installed on your computer. Then type:

  gcc -O2 -g -I <gmpdir>/include -L <gmpdir>/lib reco.c -o reco -lgmp -lm

  where <gmpdir> is the directory when GNU is installed (/usr or /usr/local in most cases).

  To use the program, type "./reco nnn" where nnn is the number of vertices  you want to generate at random. The program then prints the maximal and average time per try, and the maximal/average number of loops in the  algorithm. For example:

  % ./reco 1000
  Using double-precision floating-point numbers
  max. time =0 aver. time =0.000000
  max. loops=9 aver. loops=9.000000

  By default the program does only one random generation. Type
  "./reco nnn kkk"if you want kkk random tries:

  % ./reco 1000 1000
  Using double-precision floating-point numbers
  max. time =10 aver. time =0.670000
  max. loops=15 aver. loops=10.855000

  By default the program uses double precision floating-point numbers. If you want to use GNU MP integers, compile the program with -DGMPZ:

  % ./reco 1000 100
  Using GNU MP integers
  max. time =20 aver. time =12.300000
  max. loops=15 aver. loops=10.800000