[Paraview] Calculate the distance between many xyz points and a non-uniform 2D plane?
Ian Leslie
lesl4685 at vandals.uidaho.edu
Wed Nov 30 02:58:16 EST 2011
I guess I didn't explain myself very well with the first post, and may have confused things with my limited knowledge of paraview. Your solution may work and I am just misinterpreting it.
I have a Delaunay2D plane that represents a hillslope, in which some parts are somewhat convex, and some concave. Under the plane there are point data that do not correlate in their xy coordinates with any of the points used to create the Delauanay2D plane above the points (see attached screen shot). I would like to find the difference in Z, elevation, along the Z axis between the points below the plane and the surface of the plane itself.
I used Subdivide on the Delaunay2D plane as you suggested, and I think there are enough corresponding xy coordinate in the plane to determine the diffrence in Z for everypoint, which I will do in Matlab or Excel. If you have a better method, I am still interested.
Thanks
________________________________________
From: pat marion [pat.marion at kitware.com]
Sent: Tuesday, November 29, 2011 8:31 PM
To: Ian Leslie
Cc: paraview
Subject: Re: [Paraview] Calculate the distance between many xyz points and a non-uniform 2D plane?
I guess I don't quite understand what you're after. But if you'd like
more triangles in your dataset, you can use the Subdivide filter.
Pat
On Tue, Nov 29, 2011 at 7:48 PM, Ian Leslie <lesl4685 at vandals.uidaho.edu> wrote:
> Pat,
> Thanks, I think I see were you are going with this, except that the normals from 'Generate Surface Normals' for the Delaunay2D are not all the same, except that they are very similar in the Z direction. The Delaunay2D plane is not a plane with uniform topography.
>
> Is there someway to get the xyz coordinate of the intersection between an linear extruded line and a Delaunay2D plane? Then I could just find the difference in the Z direction of the coordinates.
>
> Thanks for your help, its given me a few more ideas.
>
> Ian
>
> ________________________________________
> From: pat marion [pat.marion at kitware.com]
> Sent: Sunday, November 27, 2011 6:10 PM
> To: Ian Leslie
> Cc: paraview
> Subject: Re: [Paraview] Calculate the distance between many xyz points and a non-uniform 2D plane?
>
> You can apply the 'Generate Surface Normals' filter to your Delaunay2D
> output to compute normals for each point in the dataset. If you look
> at the output of 'Generate Surface Normals' in the Spreadsheet view,
> you can see the computed normal values. I'd expect each point to have
> the same normal, right? Using the normal, and the position of one of
> the points, you can define a plane. Now you can compute the distance
> to the plane using the paraview python console:
>
> from paraview import vtk
>
> plane = vtk.vtkPlane()
> plane.SetOrigin(origin)
> plane.SetNormal(normal)
> print plane.DistanceToPlane(myPoint)
>
> Hope this helps!
>
> Pat
>
>
> On Sat, Nov 26, 2011 at 9:37 PM, Ian Leslie <lesl4685 at vandals.uidaho.edu> wrote:
>> Hi All,
>> I would like to calculate the distance between a xyz point and a
>> non-uniform 2D plane within ParaView 3.12.0. The 2d plane was generated
>> using xyz point data and the Delaunay2D filter. The problem is that I need
>> the difference in z normal between the plane and the point.
>>
>> When I examine the plane from the 2D filter the xyz point information is the
>> same as that of the points used to make the plane.
>>
>> Is there any way make the plane have nearly continuous or at least a whole
>> lot more points so that there would exist a point in the plane very close to
>> normal above the individual point I want to measure from?
>>
>> Using the Ruler tool would work, but there are about a thousand points I
>> would like to measure from, so it would also be very time consuming, tedious
>> and potentially impossible to reproduce the same exact results.
>> I also have an 3D unstructured grid that could be manipulated, it has the
>> same topology as the 2D plane, the same xyz points went into creating it
>> using an outside program.
>>
>> Open to any ideas and suggestions on ways to approach the problem.
>>
>> Ian
>>
>>
>>
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at:
>> http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
>>
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plan_with_points.png
Type: image/png
Size: 17392 bytes
Desc: plan_with_points.png
URL: <http://www.paraview.org/pipermail/paraview/attachments/20111130/f686b06d/attachment-0001.png>
More information about the ParaView
mailing list