Li,

So are you saying to use a slice, get a contour, e.g. with get_contour, and
then use grid_points_in_poly()? I suppose that could work for part of the
volume, but I would question its effectiveness for my case (quasi-spherical
surface in 3D cartesian coordinates) in regions where the slice and surface
are close to parallel.  If I could get surfaces that are, say phi=const.
surfaces, that include the origin then that could work, but then that
require an interpolation onto each grid, and to cover all the voxels, I'd
need many surfaces.  A different thought I had was to generate a ray using
methods in yt, for each voxel and find the outermost position along the ray
where the surface value is obtained.  That could also be very slow, but for
my case, I could limit it by only doing that calculation for voxels where
the value (in my case pressure) is below the surface value, since all the
voxels with pressure above that value, are inside the outer surface.

It would be nice to have a more general solution if such a thing exists
(which seems likely).

Regards,
Jon

On Sun, Oct 23, 2016 at 9:15 PM, Lee Chen <lchen...@gmail.com> wrote:

> This is an interesting question. Can you try to use grid_points_in_poly()
> for each slice of 3D. It may be slower.  I think there is a mathematical
> extension on this. But I do not know the actual formula.
>
> Li Chen
> www.udc.edu/prof/chen
>
>
> Does anyone know SciKit work with Spark (Python version)?
>
>
> On Tue, Oct 18, 2016 at 1:57 PM, Slavin, Jonathan <jsla...@cfa.harvard.edu
> > wrote:
>
>> Hi all,
>>
>> I'm wondering if there is some routine that will do in 3D what
>> grid_points_in_poly() does in 2D.  That is, I'd like to use the results of
>> a call to marching_cubes(), i.e. an array of verts, and determine which
>> grid points in the input volume that was provided as input to
>> marching_cubes are inside of the surface defined by those verts.  Any help
>> would be appreciated.
>>
>> ​Regards,
>> Jon​
>>
>> --
>> ________________________________________________________
>> Jonathan D. Slavin                 Harvard-Smithsonian CfA
>> jsla...@cfa.harvard.edu       60 Garden Street, MS 83
>> phone: (617) 496-7981       Cambridge, MA 02138-1516
>> cell: (781) 363-0035             USA
>> ________________________________________________________
>>
>>
>> _______________________________________________
>> scikit-image mailing list
>> scikit-image@python.org
>> https://mail.python.org/mailman/listinfo/scikit-image
>>
>>
>


-- 
________________________________________________________
Jonathan D. Slavin                 Harvard-Smithsonian CfA
jsla...@cfa.harvard.edu       60 Garden Street, MS 83
phone: (617) 496-7981       Cambridge, MA 02138-1516
cell: (781) 363-0035             USA
________________________________________________________
_______________________________________________
scikit-image mailing list
scikit-image@python.org
https://mail.python.org/mailman/listinfo/scikit-image

Reply via email to