[Paraview] Slicing a sphere based on longitudes and latitudes

Moreland, Kenneth kmorel at sandia.gov
Thu Aug 11 12:01:52 EDT 2016


Lester,

Once again, this problem can be solved with some basic geometry. Basically you want to slice by a plane that goes through the origin (0, 0, 0) and the two points defined by the 2 lat/lon coordiantes. Finding the plane that goes through 3 non-collinear points is straightforward (in Cartesian space).

The first step would be to convert your two lat/lon points to Cartesian coordinate (X,Y,Z).

Once you have that, you can define the slice plane by an origin point (0, 0, 0 works just fine) and a normal (perpendicular) vector. The normal can be computed by taking the cross product of the vectors going from the origin to these two points. Just plug that into the normal for the slice plane and you are good to go.

If you need more information on finding the plane defined by three points, there are many resources on the web to do so. Here is one descriptive video I found with a simple Google search: https://www.youtube.com/watch?v=0qYJfKG-3l8. There are many others. Most of these instructions find the plane equation, but the plane equation is constructed with the point and normal, which are all you need in ParaView.

-Ken

-----Original Message-----
From: Lester Anderson [mailto:arctica1963 at gmail.com] 
Sent: Tuesday, August 9, 2016 1:39 AM
To: Moreland, Kenneth <kmorel at sandia.gov>
Cc: paraview at paraview.org
Subject: [EXTERNAL] Re: [Paraview] Slicing a sphere based on longitudes and latitudes

Hi Ken,

Thanks for the info, that all worked fine. Sorry bit of a late response.

On a similar theme, is it easy to make a great circle slice (with the origin at 000) that plots through two long-lat points? I'm guessing that this scenario would be a rotation about x, y and z ?

Thanks
Lester


More information about the ParaView mailing list