comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: speher keyword of qhull
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: speher keyword of qhull [message #51174 is a reply to message #51173] Wed, 08 November 2006 08:12 Go to previous messageGo to previous message
Andy Heaps is currently offline  Andy Heaps
Messages: 22
Registered: March 2006
Junior Member
Hello Sebinjapan,
an interesting question for me as I was puzzling over the
same point last week. I don't have any real answers but the following
should maybe provide some illumination on the subject:

I have a strange grid of points in longitude and latitude on a globe:
LATS FLOAT = Array[722, 511]
LONGS FLOAT = Array[722, 511]
TEMPERATURE FLOAT = Array[722,511]
The longitudes (LONGS) go from -179.997 to 179.999 and the latitudes
(LATS) go from -77.0105 to 89.8854. TEMPERATURE is the ocean surface
temperature on this grid.

The location of the longitudes and latitudes are very irregular so
triangulation data is needed to pass to the CONTOUR command. The
TRIANGULATE procedure works and CONTOUR produces a pretty decent plot.
There is a wrapping problem, however, at the dateline seen as a
line from the north to south poles. Adding the /SPHERE to the
TRANGULATE call produces:
% TRIANGULATE: Points are co-linear, no solution.

No hope here then so I then used QHULL on the suggestion of a colleague:
If I use QHULL, longs, lats, tri, /DELAUNAY, SPHERE =1
I get:
% QHULL: Expression must be named variable in this context: <INT
( 1)>.

Okay, let's used a named variable:
QHULL, longs, lats, tri, SPHERE = s
HELP, s, tri
S DOUBLE = Array[3, 368943]
TRI LONG = Array[3, 733642]

Using the triangulation data TRI with CONTOUR produces a perfect plot
with no dateline missing data.

So we're back to your original question - what is returned by
SPHERE=s? THE IDL reference guide for version 6.0 QHULL says:
DELAUNAY Performs a Delaunay triangulation and returns the vertex
indicies of the resulting polyhedra; otherwise, the convex hull of the
data are returned.
SPHERE Computes the Delaunay triangulation of the points which lie on
the surface of a sphere. The V0 argument contains the longitude, in
degrees, and V1 contains the latitude, in degrees, of each point.

It looks like the IDL documentation could be better just here. Does
SPHERE=s imply a Delaunay triangulation and that s is the convex hull
of the data? Printing off some values of s I get:
PRINT, s(*, 0:3)
PRINT, 'min, max of s are', MIN(s), MAX(s)
0.066654513 0.21466261 -0.97441118
0.064778714 0.21523610 -0.97441118
0.062897982 0.21579320 -0.97441118
0.061012460 0.21633386 -0.97441118
min, max of s are -0.99999048 0.99999800


Is this the sort of thing you're trying to work out as well?


Cheers
Andy




David Fanning wrote:
> sebinjapan writes:
>
>> Does anyone knows was is returned in the sphere variable when using:
>> qhull, v0, v1, tr, /delaunay, sphere = s
>
> As I read the documentation, it seems to me SPHERE is
> an input variable, with a value of 0 or 1. :-)
>
> Cheers,
>
> David
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Plot 3-D markers in iPlot
Next Topic: speher keyword of qhull

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 02:53:14 PDT 2025

Total time taken to generate the page: 0.56065 seconds