Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1993
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1993

[Date Index] [Thread Index] [Author Index]

Search the Archive

Serious problem with DelaunayTriangulation package?

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Serious problem with DelaunayTriangulation package?
  • From: llefton at math.uno.edu
  • Date: Wed, 29 Sep 93 10:32:45 CDT

Hello mathgroupers, 


I've been using the built in DelaunayTriangulation routine in the   
ComputationalGeometry package to generate some finite element meshes.
I recently ran into a disturbing example. Two apparently identical  
sets of datapoints yield different behavior from the package.  One  
set works fine, but the other gives division by zero errors and gets  
stuck!  I have tried this on both a NeXTstation and an IBM RS6000.   
Both machines are running Mathematica Version 2.0

Any help would be appreciated.

 ----------------------------------------------------------------
| Lew Lefton                 | Phone:     (504) 286-7441         |
| Department of Mathematics  | FAX:       (504) 286-5516         |
| University of New Orleans  | e-mail:    llefton at math.uno.edu   |
| New Orleans, LA  70148     |             (NeXT mail welcome)   |
 ----------------------------------------------------------------

*-*-*-*-*-*-*-*-*-*-*- BEGINNING OF SESSION -*-*-*-*-*-*-*-*-*-

Mathematica 2.0 for NeXT
Copyright 1988-91 Wolfram Research, Inc.
 -- NeXT graphics initialized -- 


(* Load the package *)

In[1]:= <<DiscreteMath`ComputationalGeometry`;

(* Here is the bad dataset *)

In[2]:= badpoints = {{-0.1571348402636773, -3.111111111111111}, 

  {-0.1863389981249825, -2.666666666666666}, 

  {-0.2078698548207746, -2.222222222222221}, 

  {-0.2239516041194042, -1.777777777777777}, 

  {-0.2357022603955158, -1.333333333333333}, 

  {-0.2437490107608923, -0.888888888888888}, 

  {-0.2484519974999766, -0.4444444444444438}, {-0.25, 0}, 

  {-0.2484519974999766, 0.4444444444444451}, 

  {-0.2437490107608923, 0.888888888888889}, 

  {-0.2357022603955158, 1.333333333333334}, 

  {-0.2239516041194042, 1.777777777777778}, 

  {-0.2078698548207745, 2.222222222222223}, 

  {-0.1863389981249824, 2.666666666666667}, 

  {-0.1571348402636772, 3.111111111111112}, {0, -4.}, 

  {0., -3.555555555555555}, {0., -3.111111111111111}, 

  {0., -2.666666666666667}, {0., -2.222222222222222}, 

  {0., -1.777777777777778}, {0., -1.333333333333333}, 

  {0., -0.888888888888889}, {0., -0.4444444444444447}, 

  {0., 0.}, {0., 0.4444444444444447}, 

  {0., 0.888888888888888}, {0., 1.333333333333333}, 

  {0., 1.777777777777778}, {0., 2.222222222222221}, 

  {0., 2.666666666666666}, {0., 3.111111111111111}, 

  {0., 3.555555555555555}, {0., 4.}, 

  {0.1571348402636773, -3.111111111111111}, 

  {0.1863389981249825, -2.666666666666666}, 

  {0.2078698548207746, -2.222222222222221}, 

  {0.2239516041194042, -1.777777777777777}, 

  {0.2357022603955158, -1.333333333333333}, 

  {0.2437490107608923, -0.888888888888888}, 

  {0.2484519974999766, -0.4444444444444438}, {0.25, 0}, 

  {0.2484519974999766, 0.4444444444444451}, 

  {0.2437490107608923, 0.888888888888889}, 

  {0.2357022603955158, 1.333333333333334}, 

  {0.2239516041194042, 1.777777777777778}, 

  {0.2078698548207745, 2.222222222222223}, 

  {0.1863389981249824, 2.666666666666667}, 

  {0.1571348402636772, 3.111111111111112}};                                                                                


(* Here is the good dataset *)

In[3]:= goodpoints = {{-0.1571348402636773, -3.111111111111111},
{-0.1863389981249825, -2.666666666666666},
{-0.2078698548207746, -2.222222222222221},
{-0.2239516041194042, -1.777777777777777},
{-0.2357022603955158, -1.333333333333333},
{-0.2437490107608923, -0.888888888888888},
{-0.2484519974999766, -0.4444444444444438},
{-0.25, 0},
{-0.2484519974999766, 0.4444444444444451},
{-0.2437490107608923, 0.888888888888889},
{-0.2357022603955158, 1.333333333333334},
{-0.2239516041194042, 1.777777777777778},
{-0.2078698548207745, 2.222222222222223},
{-0.1863389981249824, 2.666666666666667},
{-0.1571348402636772, 3.111111111111112},
{0, -4.},
{0, -3.555555555555555},
{0, -3.111111111111111},
{0, -2.666666666666667},
{0, -2.222222222222222},
{0, -1.777777777777778},
{0, -1.333333333333333},
{0, -0.888888888888889},
{0, -0.4444444444444447},
{0, 0},
{0, 0.4444444444444447},
{0, 0.888888888888888},
{0, 1.333333333333333},
{0, 1.777777777777778},
{0, 2.222222222222221},
{0, 2.666666666666666},
{0, 3.111111111111111},
{0, 3.555555555555555},
{0, 4.},
{0.1571348402636773, -3.111111111111111},
{0.1863389981249825, -2.666666666666666},
{0.2078698548207746, -2.222222222222221},
{0.2239516041194042, -1.777777777777777},
{0.2357022603955158, -1.333333333333333},
{0.2437490107608923, -0.888888888888888},
{0.2484519974999766, -0.4444444444444438},
{0.25, 0},
{0.2484519974999766, 0.4444444444444451},
{0.2437490107608923, 0.888888888888889},
{0.2357022603955158, 1.333333333333334},
{0.2239516041194042, 1.777777777777778},
{0.2078698548207745, 2.222222222222223},
{0.1863389981249824, 2.666666666666667},
{0.1571348402636772, 3.111111111111112}};                                                


(* No apparent differences, even after careful inspection... *)

In[4]:= N[goodpoints - badpoints, 16]

Out[4]= {{0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, 

 

>    {0., 0.}, {0., 0}, {0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0.,  
0.}, 

 

>    {0., 0.}, {0., 0.}, {0, 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0.,  
0.}, 

 

>    {0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0.,  
0.}, 

 

>    {0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0.,  
0.}, 

 

>    {0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0.,  
0.}, 

 

>    {0., 0}, {0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0., 0.}, {0.,  
0.}, 

 

>    {0., 0.}}

(* The good guy works fine *)

In[5]:= Short[Timing[DelaunayTriangulation[goodpoints]]]


Out[5]//Short= {25.95 Second, {{1, {16, 17, 18, 19, 2}}, <<47>>, {49,  
<<1>>}}}

In[6]:= Short[Timing[DelaunayTriangulation[badpoints]]]

General::dbyz: Division by zero.

Infinity::indet: Indeterminate expression 0 ComplexInfinity  
encountered.

Infinity::indet: 

   Indeterminate expression -0.5625 0. ComplexInfinity encountered.

General::dbyz: Division by zero.

Infinity::indet: Indeterminate expression 0 ComplexInfinity  
encountered.

General::stop: Further output of Infinity::indet
     will be suppressed during this calculation.

General::dbyz: Division by zero.

General::stop: Further output of General::dbyz
     will be suppressed during this calculation.

(*   After waiting for a long time *)
^C
Interrupt> a

Out[6]= $Aborted


*-*-*-*-*-*-*-*-*-*-*- END OF SESSION -*-*-*-*-*-*-*-*-*-*-*





  • Prev by Date: Re: Matrix Operations in Mma
  • Previous by thread: Re: Matrix Operations in Mma