public class Miniball extends Object
If interested in Bounding Sphere algorithms read also published work of
Emo Welzl "Smallest enclosing disks (balls and Ellipsoid)" and
the work of Jack Ritter on "Efficient Bounding Spheres" at
http://tog.acm.org/GraphicsGems/gems/BoundSphere.c?searchterm=calc
For Licencing Info report to Bernd Gaertner's one reported below:
Copright (C) 1999-2006, Bernd Gaertner
$Revision: 1.3 $
$Date: 2006/11/16 08:01:52 $
This program 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.
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. If not, see
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA,
or download the License terms from prep.ai.mit.edu/pub/gnu/COPYING-2.0.
Contact:
--------
Bernd Gaertner
Institute of Theoretical Computer Science
ETH Zuerich
CAB G32.2
CH-8092 Zuerich, Switzerland
http://www.inf.ethz.ch/personal/gaertner
Original Java port from Paolo Perissinotto for Jpatch Project by Sascha Ledinsky
found at http://forum.jpatch.com/viewtopic.php?f=3&t=919
Constructor and Description |
---|
Miniball(int dim) |
Modifier and Type | Method and Description |
---|---|
void |
build()
Recalculate Miniball parameter Center and Radius
|
double[] |
center()
Return the center of the Miniball
|
void |
check_in(double[] p)
Adds a point to the list.
Skip action on null parameter. |
void |
clear()
Method clear: clears the ArrayList of the selection points.
Use it for starting a new selection list to calculate Bounding Sphere on or to clear memory references to the list of objects. Always use at the end of a Miniball use if you want to reuse later the Miniball object |
int |
nr_points()
Return the actual number of points in the list
|
int |
nr_support_points()
Return the number of support points (used to calculate the miniball).
It's and internal info |
double |
radius()
Return the Radius of the miniball
|
double |
squared_radius()
Return the sqaured Radius of the miniball
|
public void clear()
public void check_in(double[] p)
p
- The object to be added to the listpublic void build()
public double[] center()
public double squared_radius()
public double radius()
public int nr_points()
public int nr_support_points()
Copyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.