Re: TRIANGULATE says "Points are co-linear, no solution" [message #17750 is a reply to message #17747] |
Thu, 11 November 1999 00:00  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
Jonathan Joseph <jj@scorpio.tn.cornell.edu> writes:
>
> TRIANGULATE says "Points are co-linear, no solution"
>
You didn't say what version of IDL you were running, but my guess is
IDL 5.0. When I try it on a few different versions I get the
following results:
IDL 5.0 fails
IDL 5.1 succeeds
IDL 5.2 succeeds, etc...
> Is the IDL triangulate code just really weak?
The answer is, triangulate *was* weak, but improved in later versions.
However, I think the following fudge will work for what you need, even
under IDL 5.0.
x1 = x + randomn(seed, 9853) * 0.0001
y1 = y + randomn(seed, 9853) * 0.0001
triangulate,x1,y1,tr,b
Adding a random component disturbs the points just enough so they are
non co-linear, but below your precision level.
Now in return, and to satisfy my curiosity, you have to describe what
your data represents... some coastal area? What are you doing with
it? Buried treasure? New shipping lanes?
Craig
P.S. You could have avoid the byte-ordering problems (which I *did*
have on an Intel machine) by posting an IDL "save" file. That solves
the byte ordering problem and makes it easier to read in for others.
Also, your transcript of the IDL session didn't seem to add up. I
understood how to fix it, but it wasn't ready to run. Doing these
things will encourage the user community to help you. Dammit. :-)
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|