MathGroup Archive 2012

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

Search the Archive

Re: FindCurvePath has a problem

  • To: mathgroup at
  • Subject: [mg127382] Re: FindCurvePath has a problem
  • From: Bill Rowe <readnews at>
  • Date: Fri, 20 Jul 2012 23:40:20 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:

On 7/20/12 at 3:50 AM, ralph.dratman at (Ralph Dratman) wrote:

>The following input to FindCurvePath produces the output shown below


>FindCurvePath::ntri:    The data generates an inconsistent
>triangulation. You can perturb the data to make it valid. >> Fail

>If you restore the commented-out list elements (beginning with
>(*{306,148}...), then evaluate, you get an apparently never-ending
>silent hangup, which is of course far worse than an error message.

If the problem truly is a "hangup", i.e., Mathematica has gone
into an endless loop for a problem that should terminate, this
is indeed worse. But, it is far more likely the computation
FindCurvePath is simply more complex than you realize for this
data set and it simply takes longer to compute the answer or
determine it isn't possible to get an answer than you (or I for
that matter) are willing to wait.

Mathematica provides you with some very powerful tools and
generally doesn't give you a lot of insight into the algorithms
used or how execution time can depend on the data set you want
to apply the tools to.

If uncomment your data set and assign it to a variable dataList
and do


I see the data set has multiple y values for a single x value
and the general trend is a portion of a bell shaped curve. The
multiple y values are certain to be the issue. If there were at
most 2 y values for any x value, this data set could be
interpreted as a closed curve. But with 3 and 4 y values for a
given x value, I don't know how to interpret the data set as a
smooth curve and don't see how any automated algorithm could be successful.

Another way to view the plot produced by ListPlot is a simple
curve rather than a closed curve. If this is what the data is
intended to represent then reducing the data set by either

Mean/@GatherBy[dataSet, First]


Median/@GatherBy[dataSet, First]

will reduce the problem complexity to something FindCurvePath
can very rapidly deal with. In fact, simply sorting the reduced
data set will order the points correctly.

  • Prev by Date: Re: Help with Reduce and ForAll
  • Next by Date: Re: How to Scale and vary plot for a Differential Equation
  • Previous by thread: Re: FindCurvePath has a problem
  • Next by thread: Re: FindCurvePath has a problem