Re: TRIANGULATE's bug? [message #92311 is a reply to message #92310] |
Mon, 16 November 2015 04:24   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Pachacoti writes:
>
> Hi,
>
> I'm really confused by TRIANGULATE. I got an error message with the following commands:
>
> IDL> theta=dindgen(360L)
> IDL> rad=dindgen(500L)
> IDL> xpol=rad#cos(theta/1.8d2*!dpi)
> IDL> ypol=rad#sin(theta/1.8d2*!dpi)
> IDL> triangulate,xpol,ypol,tri
> % TRIANGULATE: Points are co-linear, no solution.
> % Execution halted at: $MAIN$
>
> However, the following works:
> IDL> xpol=rad#cos(float(theta/1.8d2*!dpi))
> IDL> ypol=rad#sin(float(theta/1.8d2*!dpi))
> IDL> triangulate,xpol,ypol,tri
> IDL> help,tri
> TRI LONG = Array[3, 358920]
>
> My intention is to convert a polar coordinated image to a Cartesian projected one. I'm faced with this when trying to convert float to double. Could anybody shed some light on this? How should I correct? Thx in advance.
There is a discussion of this problem, with a possible solution, in this
article, in The Solution section:
http://www.idlcoyote.com/code_tips/usegriddata.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|