Skip to Content.
Sympa Menu

cgal-discuss - Problem with Polynomial

Subject: CGAL users discussion list

List archive

Problem with Polynomial


Chronological Thread 
  • From: Oliver Burghard <>
  • To:
  • Subject: Problem with Polynomial
  • Date: Mon, 26 Feb 2007 22:51:54 +0100

Hello everybody,

first sorry for bothering, maybe with some stupid questions.

I am trying to use CGAL, but I am stuck with some problems. I want to
create the convex hull of some points. Then at the points of the hull I
calculate myself some normals and cut the emerging halfspaces to get a
surrounding polyhedron.

So far I have the Problem, what numbertype to choose. If I take Extended
Homogenous Coordinates I have the problem with the value 0, that seems
to me like is not handled correctly. You can not for example subtract or
multiply two values, of which one has the value 0. (as then the grade
becomes -1, which is asserted to not be).

for example in:
Nef_2/Polynomial.h
------------------------------
template <class NT>
Polynomial<NT> operator + (const Polynomial<NT>& p1,
const Polynomial<NT>& p2)
{
typedef typename Polynomial<NT>::size_type size_type;
CGAL_assertion(p1.degree()>=0 && p2.degree()>=0);
------------------------

Why is this implemented like this ? Why is it not possible to just
ignore this case or write some lines more to handle it, as it evolves
very quickly.

I need the extended coordinates to create the cut of several
halfspaces. Is there a way to change the kernel that I am using for one
object - to convert my polyhedron from one kernel to another ?

And third is, are there any helps for debugging - to show numbers and
array contents better in my debugger. I am using Gmpz not, but am not
able to look at the numbers in my debugger.


Thanks a lot already for any help, somebody might give

Oliver Burghard




  • Problem with Polynomial, Oliver Burghard, 02/26/2007

Archive powered by MHonArc 2.6.16.

Top of Page