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

Home » Public Forums » archive » Re: Don't Extrapolate with GRID3 (or cut off excess)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Don't Extrapolate with GRID3 (or cut off excess) [message #71968] Mon, 02 August 2010 07:50
asdf is currently offline  asdf
Messages: 7
Registered: August 2010
Junior Member
On Jul 30, 11:48 am, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Jul 30, 12:33 pm, asdf <rmc...@gmail.com> wrote:
>
>> First, a little background. I have an irregular grid of 3D volume data
>> that I would like to visualize (currently using iVolume). The volume
>> is basically a wedge piece of a cylinder.
>> I've the placed data onto a regular, cube grid using GRID3, but the
>> result has a large, unrealistic value in an area outside of the
>> original irregular grid. From GRID3 documentation, it doesn't seem
>> like I can force it to ignore points outside the original grid, i.e.
>> don't extrapolate (correct?). I'm wondering if someone knows an
>> efficient way to set to NaN values in the regular grid that are
>> outside the original, irregular grid. It seems I can do a Delaunay
>> triangulation of the irregular grid, and use it somehow to find if a
>> point in the regular grid is inside the irregular grid, but I'm lost
>> on the details of how to do that.
>
> If your distribution is convex, you can get what you want with
> qgrid3(), instead of grid3(), as it allows to set a value for the
> points outside the convex hull.
>
> If it is not convex, things are trickier. If the original points all
> fall into a series of planes, you could make an IDLanROIGroup with
> those, then use the containspoints method to determine which points of
> the grid fall inside it.

Thanks for the reply, that works great:
qhull,x,y,z,tr,/delaunay
result=qgrid3(x,y,z,data,tr,missing=!values.d_nan)

Even faster than grid3 also.
Re: Don't Extrapolate with GRID3 (or cut off excess) [message #71996 is a reply to message #71968] Fri, 30 July 2010 08:48 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Jul 30, 12:33 pm, asdf <rmc...@gmail.com> wrote:
> First, a little background. I have an irregular grid of 3D volume data
> that I would like to visualize (currently using iVolume). The volume
> is basically a wedge piece of a cylinder.
> I've the placed data onto a regular, cube grid using GRID3, but the
> result has a large, unrealistic value in an area outside of the
> original irregular grid. From GRID3 documentation, it doesn't seem
> like I can force it to ignore points outside the original grid, i.e.
> don't extrapolate (correct?). I'm wondering if someone knows an
> efficient way to set to NaN values in the regular grid that are
> outside the original, irregular grid. It seems I can do a Delaunay
> triangulation of the irregular grid, and use it somehow to find if a
> point in the regular grid is inside the irregular grid, but I'm lost
> on the details of how to do that.

If your distribution is convex, you can get what you want with
qgrid3(), instead of grid3(), as it allows to set a value for the
points outside the convex hull.

If it is not convex, things are trickier. If the original points all
fall into a series of planes, you could make an IDLanROIGroup with
those, then use the containspoints method to determine which points of
the grid fall inside it.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Fanning Takes a Hike!
Next Topic: THANKS GOD! I GOT $2000 FROM PAYPAL....

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

Current Time: Wed Oct 08 15:37:47 PDT 2025

Total time taken to generate the page: 0.00488 seconds