RegionMember does not work with RandomPolyhedron or Polyhedron objectHow can I decide whether a closed surface is intersected by a triangle?Region Intersection for MeshRegion objects embedded in 3DThrough does not work with SubtractFitting does not workHandling Self-Intersecting RegionsDetermine whether points lie within a cowVolumes and moments of inertia of meshes in 3DParametricPlot3D coloring based on whether function located inside/outside of another parametric functionBooleanRegion with .stl files does not workInconsistent mesh generation from BoundaryDiscretizeRegion and ToBoundaryMesh at creases

Why is Google approaching my VPS machine?

How to not confuse readers with simultaneous events?

Detecting existence of a class member

Operation Unzalgo

What is this green alien supposed to be on the American covers of the "Hitchhiker's Guide to the Galaxy"?

Last-minute canceled work-trip mean I'll lose thousands of dollars on planned vacation

"This used to be my phone number"

Proof that every field is perfect???

How did Jayne know when to shoot?

How did J. J. Thomson establish the particle nature of the electron?

When designing an adventure, how can I ensure a continuous player experience in a setting that's likely to favor TPKs?

Why doesn't Venus have a magnetic field? How does the speed of rotation affect the magnetic field of a planet?

Should I have shared a document with a former employee?

How to belay quickly ascending top-rope climbers?

Should I have one hand on the throttle during engine ignition?

Wait or be waiting?

What is a Romeo Word™?

Random piece of plastic

Do Australia and New Zealand have a travel ban on Somalis (like Wikipedia says)?

Will the internet speed decrease on second router if there are multiple devices connected to primary router?

I have found a mistake on someone's code published online: what is the protocol?

Why do space operations use "nominal" to mean "working correctly"?

Apex Legends stuck at 60 FPS (G-Sync 144hz monitor)

How do you send money when you're not sure it's not a scam?



RegionMember does not work with RandomPolyhedron or Polyhedron object


How can I decide whether a closed surface is intersected by a triangle?Region Intersection for MeshRegion objects embedded in 3DThrough does not work with SubtractFitting does not workHandling Self-Intersecting RegionsDetermine whether points lie within a cowVolumes and moments of inertia of meshes in 3DParametricPlot3D coloring based on whether function located inside/outside of another parametric functionBooleanRegion with .stl files does not workInconsistent mesh generation from BoundaryDiscretizeRegion and ToBoundaryMesh at creases






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3












$begingroup$


According to the documentation RegionMember should work with regions that are true for ConstantRegionQ. However, the function does not work with simple polyhedra.



Consider:



ConstantRegionQ@RandomPolyhedron[5]
(*True*)
RegionMember@RandomPolyhedron[5]
(* *)


I am using version 12.0. Is this a bug?



And since RegionMember is not working, is there a way to test whether a point lies inside or outside a user defined polyhedra?



An example for a user defined polyhedron (here i have triangulated the individual faces because the vertices of a face does not have to be coplanar):



data = 0.9000000000, 9.803074361, -0.2788974201, 0.6750000000, 
10.19278579, -0.2270388454, 0.4500000000,
9.803074361, -0.2935999100, 0.6750000000,
10.19278579, -0.2270388454, 0.2250000000,
10.19278579, -0.2379129589, 0.4500000000,
9.803074361, -0.2935999100, 0.2250000000,
10.19278579, -0.2379129589, 0,
9.803074361, -0.3066046725, 0.4500000000,
9.803074361, -0.2935999100, 0,
9.803074361, -0.3066046725, 0.2250000000,
9.413362929, -0.3638887807, 0.4500000000,
9.803074361, -0.2935999100, 0.2250000000,
9.413362929, -0.3638887807, 0.6750000000,
9.413362929, -0.3472567826, 0.4500000000,
9.803074361, -0.2935999100, 0.6750000000,
9.413362929, -0.3472567826, 0.9000000000,
9.803074361, -0.2788974201, 0.4500000000,
9.803074361, -0.2935999100, 0.9000000000,
9.803074361, -1.278897420, 0.6750000000,
10.19278579, -1.227038845, 0.4500000000,
9.803074361, -1.293599910, 0.6750000000,
10.19278579, -1.227038845, 0.2250000000,
10.19278579, -1.237912959, 0.4500000000,
9.803074361, -1.293599910, 0.2250000000,
10.19278579, -1.237912959, 0,
9.803074361, -1.306604673, 0.4500000000,
9.803074361, -1.293599910, 0,
9.803074361, -1.306604673, 0.2250000000,
9.413362929, -1.363888781, 0.4500000000,
9.803074361, -1.293599910, 0.2250000000,
9.413362929, -1.363888781, 0.6750000000,
9.413362929, -1.347256783, 0.4500000000,
9.803074361, -1.293599910, 0.6750000000,
9.413362929, -1.347256783, 0.9000000000,
9.803074361, -1.278897420, 0.4500000000,
9.803074361, -1.293599910, 0.9000000000,
9.803074361, -0.2788974201, 0.9000000000,
9.803074361, -1.278897420, 0.7875000000,
9.997930077, -0.7529681327, 0.9000000000,
9.803074361, -1.278897420, 0.6750000000,
10.19278579, -1.227038845, 0.7875000000,
9.997930077, -0.7529681327, 0.6750000000,
10.19278579, -1.227038845, 0.6750000000,
10.19278579, -0.2270388454, 0.7875000000,
9.997930077, -0.7529681327, 0.6750000000,
10.19278579, -0.2270388454, 0.9000000000,
9.803074361, -0.2788974201, 0.7875000000,
9.997930077, -0.7529681327, 0.6750000000,
10.19278579, -0.2270388454, 0.6750000000,
10.19278579, -1.227038845, 0.4500000000,
10.19278579, -0.7324759022, 0.6750000000,
10.19278579, -1.227038845, 0.2250000000,
10.19278579, -1.237912959, 0.4500000000,
10.19278579, -0.7324759022, 0.2250000000,
10.19278579, -1.237912959, 0.2250000000,
10.19278579, -0.2379129589, 0.4500000000,
10.19278579, -0.7324759022, 0.2250000000,
10.19278579, -0.2379129589, 0.6750000000,
10.19278579, -0.2270388454, 0.4500000000,
10.19278579, -0.7324759022, 0.2250000000,
10.19278579, -0.2379129589, 0.2250000000,
10.19278579, -1.237912959, 0.1125000000,
9.997930077, -0.7722588157, 0.2250000000,
10.19278579, -1.237912959, 0,
9.803074361, -1.306604673, 0.1125000000,
9.997930077, -0.7722588157, 0, 9.803074361, -1.306604673, 0,
9.803074361, -0.3066046725, 0.1125000000,
9.997930077, -0.7722588157, 0,
9.803074361, -0.3066046725, 0.2250000000,
10.19278579, -0.2379129589, 0.1125000000,
9.997930077, -0.7722588157, 0, 9.803074361, -0.3066046725, 0,
9.803074361, -1.306604673, 0.1125000000,
9.608218645, -0.8352467266, 0,
9.803074361, -1.306604673, 0.2250000000,
9.413362929, -1.363888781, 0.1125000000,
9.608218645, -0.8352467266, 0.2250000000,
9.413362929, -1.363888781, 0.2250000000,
9.413362929, -0.3638887807, 0.1125000000,
9.608218645, -0.8352467266, 0.2250000000,
9.413362929, -0.3638887807, 0,
9.803074361, -0.3066046725, 0.1125000000,
9.608218645, -0.8352467266, 0.2250000000,
9.413362929, -0.3638887807, 0.2250000000,
9.413362929, -1.363888781, 0.4500000000,
9.413362929, -0.8555727816, 0.2250000000,
9.413362929, -1.363888781, 0.6750000000,
9.413362929, -1.347256783, 0.4500000000,
9.413362929, -0.8555727816, 0.6750000000,
9.413362929, -1.347256783, 0.6750000000,
9.413362929, -0.3472567826, 0.4500000000,
9.413362929, -0.8555727816, 0.6750000000,
9.413362929, -0.3472567826, 0.2250000000,
9.413362929, -0.3638887807, 0.4500000000,
9.413362929, -0.8555727816, 0.6750000000,
9.413362929, -0.3472567826, 0.6750000000,
9.413362929, -1.347256783, 0.7875000000,
9.608218645, -0.8130771013, 0.6750000000,
9.413362929, -1.347256783, 0.9000000000,
9.803074361, -1.278897420, 0.7875000000,
9.608218645, -0.8130771013, 0.9000000000,
9.803074361, -1.278897420, 0.9000000000,
9.803074361, -0.2788974201, 0.7875000000,
9.608218645, -0.8130771013, 0.9000000000,
9.803074361, -0.2788974201, 0.6750000000,
9.413362929, -0.3472567826, 0.7875000000,
9.608218645, -0.8130771013;


Polyhedron@data










share|improve this question











$endgroup$


















    3












    $begingroup$


    According to the documentation RegionMember should work with regions that are true for ConstantRegionQ. However, the function does not work with simple polyhedra.



    Consider:



    ConstantRegionQ@RandomPolyhedron[5]
    (*True*)
    RegionMember@RandomPolyhedron[5]
    (* *)


    I am using version 12.0. Is this a bug?



    And since RegionMember is not working, is there a way to test whether a point lies inside or outside a user defined polyhedra?



    An example for a user defined polyhedron (here i have triangulated the individual faces because the vertices of a face does not have to be coplanar):



    data = 0.9000000000, 9.803074361, -0.2788974201, 0.6750000000, 
    10.19278579, -0.2270388454, 0.4500000000,
    9.803074361, -0.2935999100, 0.6750000000,
    10.19278579, -0.2270388454, 0.2250000000,
    10.19278579, -0.2379129589, 0.4500000000,
    9.803074361, -0.2935999100, 0.2250000000,
    10.19278579, -0.2379129589, 0,
    9.803074361, -0.3066046725, 0.4500000000,
    9.803074361, -0.2935999100, 0,
    9.803074361, -0.3066046725, 0.2250000000,
    9.413362929, -0.3638887807, 0.4500000000,
    9.803074361, -0.2935999100, 0.2250000000,
    9.413362929, -0.3638887807, 0.6750000000,
    9.413362929, -0.3472567826, 0.4500000000,
    9.803074361, -0.2935999100, 0.6750000000,
    9.413362929, -0.3472567826, 0.9000000000,
    9.803074361, -0.2788974201, 0.4500000000,
    9.803074361, -0.2935999100, 0.9000000000,
    9.803074361, -1.278897420, 0.6750000000,
    10.19278579, -1.227038845, 0.4500000000,
    9.803074361, -1.293599910, 0.6750000000,
    10.19278579, -1.227038845, 0.2250000000,
    10.19278579, -1.237912959, 0.4500000000,
    9.803074361, -1.293599910, 0.2250000000,
    10.19278579, -1.237912959, 0,
    9.803074361, -1.306604673, 0.4500000000,
    9.803074361, -1.293599910, 0,
    9.803074361, -1.306604673, 0.2250000000,
    9.413362929, -1.363888781, 0.4500000000,
    9.803074361, -1.293599910, 0.2250000000,
    9.413362929, -1.363888781, 0.6750000000,
    9.413362929, -1.347256783, 0.4500000000,
    9.803074361, -1.293599910, 0.6750000000,
    9.413362929, -1.347256783, 0.9000000000,
    9.803074361, -1.278897420, 0.4500000000,
    9.803074361, -1.293599910, 0.9000000000,
    9.803074361, -0.2788974201, 0.9000000000,
    9.803074361, -1.278897420, 0.7875000000,
    9.997930077, -0.7529681327, 0.9000000000,
    9.803074361, -1.278897420, 0.6750000000,
    10.19278579, -1.227038845, 0.7875000000,
    9.997930077, -0.7529681327, 0.6750000000,
    10.19278579, -1.227038845, 0.6750000000,
    10.19278579, -0.2270388454, 0.7875000000,
    9.997930077, -0.7529681327, 0.6750000000,
    10.19278579, -0.2270388454, 0.9000000000,
    9.803074361, -0.2788974201, 0.7875000000,
    9.997930077, -0.7529681327, 0.6750000000,
    10.19278579, -0.2270388454, 0.6750000000,
    10.19278579, -1.227038845, 0.4500000000,
    10.19278579, -0.7324759022, 0.6750000000,
    10.19278579, -1.227038845, 0.2250000000,
    10.19278579, -1.237912959, 0.4500000000,
    10.19278579, -0.7324759022, 0.2250000000,
    10.19278579, -1.237912959, 0.2250000000,
    10.19278579, -0.2379129589, 0.4500000000,
    10.19278579, -0.7324759022, 0.2250000000,
    10.19278579, -0.2379129589, 0.6750000000,
    10.19278579, -0.2270388454, 0.4500000000,
    10.19278579, -0.7324759022, 0.2250000000,
    10.19278579, -0.2379129589, 0.2250000000,
    10.19278579, -1.237912959, 0.1125000000,
    9.997930077, -0.7722588157, 0.2250000000,
    10.19278579, -1.237912959, 0,
    9.803074361, -1.306604673, 0.1125000000,
    9.997930077, -0.7722588157, 0, 9.803074361, -1.306604673, 0,
    9.803074361, -0.3066046725, 0.1125000000,
    9.997930077, -0.7722588157, 0,
    9.803074361, -0.3066046725, 0.2250000000,
    10.19278579, -0.2379129589, 0.1125000000,
    9.997930077, -0.7722588157, 0, 9.803074361, -0.3066046725, 0,
    9.803074361, -1.306604673, 0.1125000000,
    9.608218645, -0.8352467266, 0,
    9.803074361, -1.306604673, 0.2250000000,
    9.413362929, -1.363888781, 0.1125000000,
    9.608218645, -0.8352467266, 0.2250000000,
    9.413362929, -1.363888781, 0.2250000000,
    9.413362929, -0.3638887807, 0.1125000000,
    9.608218645, -0.8352467266, 0.2250000000,
    9.413362929, -0.3638887807, 0,
    9.803074361, -0.3066046725, 0.1125000000,
    9.608218645, -0.8352467266, 0.2250000000,
    9.413362929, -0.3638887807, 0.2250000000,
    9.413362929, -1.363888781, 0.4500000000,
    9.413362929, -0.8555727816, 0.2250000000,
    9.413362929, -1.363888781, 0.6750000000,
    9.413362929, -1.347256783, 0.4500000000,
    9.413362929, -0.8555727816, 0.6750000000,
    9.413362929, -1.347256783, 0.6750000000,
    9.413362929, -0.3472567826, 0.4500000000,
    9.413362929, -0.8555727816, 0.6750000000,
    9.413362929, -0.3472567826, 0.2250000000,
    9.413362929, -0.3638887807, 0.4500000000,
    9.413362929, -0.8555727816, 0.6750000000,
    9.413362929, -0.3472567826, 0.6750000000,
    9.413362929, -1.347256783, 0.7875000000,
    9.608218645, -0.8130771013, 0.6750000000,
    9.413362929, -1.347256783, 0.9000000000,
    9.803074361, -1.278897420, 0.7875000000,
    9.608218645, -0.8130771013, 0.9000000000,
    9.803074361, -1.278897420, 0.9000000000,
    9.803074361, -0.2788974201, 0.7875000000,
    9.608218645, -0.8130771013, 0.9000000000,
    9.803074361, -0.2788974201, 0.6750000000,
    9.413362929, -0.3472567826, 0.7875000000,
    9.608218645, -0.8130771013;


    Polyhedron@data










    share|improve this question











    $endgroup$














      3












      3








      3





      $begingroup$


      According to the documentation RegionMember should work with regions that are true for ConstantRegionQ. However, the function does not work with simple polyhedra.



      Consider:



      ConstantRegionQ@RandomPolyhedron[5]
      (*True*)
      RegionMember@RandomPolyhedron[5]
      (* *)


      I am using version 12.0. Is this a bug?



      And since RegionMember is not working, is there a way to test whether a point lies inside or outside a user defined polyhedra?



      An example for a user defined polyhedron (here i have triangulated the individual faces because the vertices of a face does not have to be coplanar):



      data = 0.9000000000, 9.803074361, -0.2788974201, 0.6750000000, 
      10.19278579, -0.2270388454, 0.4500000000,
      9.803074361, -0.2935999100, 0.6750000000,
      10.19278579, -0.2270388454, 0.2250000000,
      10.19278579, -0.2379129589, 0.4500000000,
      9.803074361, -0.2935999100, 0.2250000000,
      10.19278579, -0.2379129589, 0,
      9.803074361, -0.3066046725, 0.4500000000,
      9.803074361, -0.2935999100, 0,
      9.803074361, -0.3066046725, 0.2250000000,
      9.413362929, -0.3638887807, 0.4500000000,
      9.803074361, -0.2935999100, 0.2250000000,
      9.413362929, -0.3638887807, 0.6750000000,
      9.413362929, -0.3472567826, 0.4500000000,
      9.803074361, -0.2935999100, 0.6750000000,
      9.413362929, -0.3472567826, 0.9000000000,
      9.803074361, -0.2788974201, 0.4500000000,
      9.803074361, -0.2935999100, 0.9000000000,
      9.803074361, -1.278897420, 0.6750000000,
      10.19278579, -1.227038845, 0.4500000000,
      9.803074361, -1.293599910, 0.6750000000,
      10.19278579, -1.227038845, 0.2250000000,
      10.19278579, -1.237912959, 0.4500000000,
      9.803074361, -1.293599910, 0.2250000000,
      10.19278579, -1.237912959, 0,
      9.803074361, -1.306604673, 0.4500000000,
      9.803074361, -1.293599910, 0,
      9.803074361, -1.306604673, 0.2250000000,
      9.413362929, -1.363888781, 0.4500000000,
      9.803074361, -1.293599910, 0.2250000000,
      9.413362929, -1.363888781, 0.6750000000,
      9.413362929, -1.347256783, 0.4500000000,
      9.803074361, -1.293599910, 0.6750000000,
      9.413362929, -1.347256783, 0.9000000000,
      9.803074361, -1.278897420, 0.4500000000,
      9.803074361, -1.293599910, 0.9000000000,
      9.803074361, -0.2788974201, 0.9000000000,
      9.803074361, -1.278897420, 0.7875000000,
      9.997930077, -0.7529681327, 0.9000000000,
      9.803074361, -1.278897420, 0.6750000000,
      10.19278579, -1.227038845, 0.7875000000,
      9.997930077, -0.7529681327, 0.6750000000,
      10.19278579, -1.227038845, 0.6750000000,
      10.19278579, -0.2270388454, 0.7875000000,
      9.997930077, -0.7529681327, 0.6750000000,
      10.19278579, -0.2270388454, 0.9000000000,
      9.803074361, -0.2788974201, 0.7875000000,
      9.997930077, -0.7529681327, 0.6750000000,
      10.19278579, -0.2270388454, 0.6750000000,
      10.19278579, -1.227038845, 0.4500000000,
      10.19278579, -0.7324759022, 0.6750000000,
      10.19278579, -1.227038845, 0.2250000000,
      10.19278579, -1.237912959, 0.4500000000,
      10.19278579, -0.7324759022, 0.2250000000,
      10.19278579, -1.237912959, 0.2250000000,
      10.19278579, -0.2379129589, 0.4500000000,
      10.19278579, -0.7324759022, 0.2250000000,
      10.19278579, -0.2379129589, 0.6750000000,
      10.19278579, -0.2270388454, 0.4500000000,
      10.19278579, -0.7324759022, 0.2250000000,
      10.19278579, -0.2379129589, 0.2250000000,
      10.19278579, -1.237912959, 0.1125000000,
      9.997930077, -0.7722588157, 0.2250000000,
      10.19278579, -1.237912959, 0,
      9.803074361, -1.306604673, 0.1125000000,
      9.997930077, -0.7722588157, 0, 9.803074361, -1.306604673, 0,
      9.803074361, -0.3066046725, 0.1125000000,
      9.997930077, -0.7722588157, 0,
      9.803074361, -0.3066046725, 0.2250000000,
      10.19278579, -0.2379129589, 0.1125000000,
      9.997930077, -0.7722588157, 0, 9.803074361, -0.3066046725, 0,
      9.803074361, -1.306604673, 0.1125000000,
      9.608218645, -0.8352467266, 0,
      9.803074361, -1.306604673, 0.2250000000,
      9.413362929, -1.363888781, 0.1125000000,
      9.608218645, -0.8352467266, 0.2250000000,
      9.413362929, -1.363888781, 0.2250000000,
      9.413362929, -0.3638887807, 0.1125000000,
      9.608218645, -0.8352467266, 0.2250000000,
      9.413362929, -0.3638887807, 0,
      9.803074361, -0.3066046725, 0.1125000000,
      9.608218645, -0.8352467266, 0.2250000000,
      9.413362929, -0.3638887807, 0.2250000000,
      9.413362929, -1.363888781, 0.4500000000,
      9.413362929, -0.8555727816, 0.2250000000,
      9.413362929, -1.363888781, 0.6750000000,
      9.413362929, -1.347256783, 0.4500000000,
      9.413362929, -0.8555727816, 0.6750000000,
      9.413362929, -1.347256783, 0.6750000000,
      9.413362929, -0.3472567826, 0.4500000000,
      9.413362929, -0.8555727816, 0.6750000000,
      9.413362929, -0.3472567826, 0.2250000000,
      9.413362929, -0.3638887807, 0.4500000000,
      9.413362929, -0.8555727816, 0.6750000000,
      9.413362929, -0.3472567826, 0.6750000000,
      9.413362929, -1.347256783, 0.7875000000,
      9.608218645, -0.8130771013, 0.6750000000,
      9.413362929, -1.347256783, 0.9000000000,
      9.803074361, -1.278897420, 0.7875000000,
      9.608218645, -0.8130771013, 0.9000000000,
      9.803074361, -1.278897420, 0.9000000000,
      9.803074361, -0.2788974201, 0.7875000000,
      9.608218645, -0.8130771013, 0.9000000000,
      9.803074361, -0.2788974201, 0.6750000000,
      9.413362929, -0.3472567826, 0.7875000000,
      9.608218645, -0.8130771013;


      Polyhedron@data










      share|improve this question











      $endgroup$




      According to the documentation RegionMember should work with regions that are true for ConstantRegionQ. However, the function does not work with simple polyhedra.



      Consider:



      ConstantRegionQ@RandomPolyhedron[5]
      (*True*)
      RegionMember@RandomPolyhedron[5]
      (* *)


      I am using version 12.0. Is this a bug?



      And since RegionMember is not working, is there a way to test whether a point lies inside or outside a user defined polyhedra?



      An example for a user defined polyhedron (here i have triangulated the individual faces because the vertices of a face does not have to be coplanar):



      data = 0.9000000000, 9.803074361, -0.2788974201, 0.6750000000, 
      10.19278579, -0.2270388454, 0.4500000000,
      9.803074361, -0.2935999100, 0.6750000000,
      10.19278579, -0.2270388454, 0.2250000000,
      10.19278579, -0.2379129589, 0.4500000000,
      9.803074361, -0.2935999100, 0.2250000000,
      10.19278579, -0.2379129589, 0,
      9.803074361, -0.3066046725, 0.4500000000,
      9.803074361, -0.2935999100, 0,
      9.803074361, -0.3066046725, 0.2250000000,
      9.413362929, -0.3638887807, 0.4500000000,
      9.803074361, -0.2935999100, 0.2250000000,
      9.413362929, -0.3638887807, 0.6750000000,
      9.413362929, -0.3472567826, 0.4500000000,
      9.803074361, -0.2935999100, 0.6750000000,
      9.413362929, -0.3472567826, 0.9000000000,
      9.803074361, -0.2788974201, 0.4500000000,
      9.803074361, -0.2935999100, 0.9000000000,
      9.803074361, -1.278897420, 0.6750000000,
      10.19278579, -1.227038845, 0.4500000000,
      9.803074361, -1.293599910, 0.6750000000,
      10.19278579, -1.227038845, 0.2250000000,
      10.19278579, -1.237912959, 0.4500000000,
      9.803074361, -1.293599910, 0.2250000000,
      10.19278579, -1.237912959, 0,
      9.803074361, -1.306604673, 0.4500000000,
      9.803074361, -1.293599910, 0,
      9.803074361, -1.306604673, 0.2250000000,
      9.413362929, -1.363888781, 0.4500000000,
      9.803074361, -1.293599910, 0.2250000000,
      9.413362929, -1.363888781, 0.6750000000,
      9.413362929, -1.347256783, 0.4500000000,
      9.803074361, -1.293599910, 0.6750000000,
      9.413362929, -1.347256783, 0.9000000000,
      9.803074361, -1.278897420, 0.4500000000,
      9.803074361, -1.293599910, 0.9000000000,
      9.803074361, -0.2788974201, 0.9000000000,
      9.803074361, -1.278897420, 0.7875000000,
      9.997930077, -0.7529681327, 0.9000000000,
      9.803074361, -1.278897420, 0.6750000000,
      10.19278579, -1.227038845, 0.7875000000,
      9.997930077, -0.7529681327, 0.6750000000,
      10.19278579, -1.227038845, 0.6750000000,
      10.19278579, -0.2270388454, 0.7875000000,
      9.997930077, -0.7529681327, 0.6750000000,
      10.19278579, -0.2270388454, 0.9000000000,
      9.803074361, -0.2788974201, 0.7875000000,
      9.997930077, -0.7529681327, 0.6750000000,
      10.19278579, -0.2270388454, 0.6750000000,
      10.19278579, -1.227038845, 0.4500000000,
      10.19278579, -0.7324759022, 0.6750000000,
      10.19278579, -1.227038845, 0.2250000000,
      10.19278579, -1.237912959, 0.4500000000,
      10.19278579, -0.7324759022, 0.2250000000,
      10.19278579, -1.237912959, 0.2250000000,
      10.19278579, -0.2379129589, 0.4500000000,
      10.19278579, -0.7324759022, 0.2250000000,
      10.19278579, -0.2379129589, 0.6750000000,
      10.19278579, -0.2270388454, 0.4500000000,
      10.19278579, -0.7324759022, 0.2250000000,
      10.19278579, -0.2379129589, 0.2250000000,
      10.19278579, -1.237912959, 0.1125000000,
      9.997930077, -0.7722588157, 0.2250000000,
      10.19278579, -1.237912959, 0,
      9.803074361, -1.306604673, 0.1125000000,
      9.997930077, -0.7722588157, 0, 9.803074361, -1.306604673, 0,
      9.803074361, -0.3066046725, 0.1125000000,
      9.997930077, -0.7722588157, 0,
      9.803074361, -0.3066046725, 0.2250000000,
      10.19278579, -0.2379129589, 0.1125000000,
      9.997930077, -0.7722588157, 0, 9.803074361, -0.3066046725, 0,
      9.803074361, -1.306604673, 0.1125000000,
      9.608218645, -0.8352467266, 0,
      9.803074361, -1.306604673, 0.2250000000,
      9.413362929, -1.363888781, 0.1125000000,
      9.608218645, -0.8352467266, 0.2250000000,
      9.413362929, -1.363888781, 0.2250000000,
      9.413362929, -0.3638887807, 0.1125000000,
      9.608218645, -0.8352467266, 0.2250000000,
      9.413362929, -0.3638887807, 0,
      9.803074361, -0.3066046725, 0.1125000000,
      9.608218645, -0.8352467266, 0.2250000000,
      9.413362929, -0.3638887807, 0.2250000000,
      9.413362929, -1.363888781, 0.4500000000,
      9.413362929, -0.8555727816, 0.2250000000,
      9.413362929, -1.363888781, 0.6750000000,
      9.413362929, -1.347256783, 0.4500000000,
      9.413362929, -0.8555727816, 0.6750000000,
      9.413362929, -1.347256783, 0.6750000000,
      9.413362929, -0.3472567826, 0.4500000000,
      9.413362929, -0.8555727816, 0.6750000000,
      9.413362929, -0.3472567826, 0.2250000000,
      9.413362929, -0.3638887807, 0.4500000000,
      9.413362929, -0.8555727816, 0.6750000000,
      9.413362929, -0.3472567826, 0.6750000000,
      9.413362929, -1.347256783, 0.7875000000,
      9.608218645, -0.8130771013, 0.6750000000,
      9.413362929, -1.347256783, 0.9000000000,
      9.803074361, -1.278897420, 0.7875000000,
      9.608218645, -0.8130771013, 0.9000000000,
      9.803074361, -1.278897420, 0.9000000000,
      9.803074361, -0.2788974201, 0.7875000000,
      9.608218645, -0.8130771013, 0.9000000000,
      9.803074361, -0.2788974201, 0.6750000000,
      9.413362929, -0.3472567826, 0.7875000000,
      9.608218645, -0.8130771013;


      Polyhedron@data







      functions computational-geometry mesh






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jul 10 at 6:09







      Ali Hashmi

















      asked Jul 10 at 3:24









      Ali HashmiAli Hashmi

      5,9604 gold badges15 silver badges34 bronze badges




      5,9604 gold badges15 silver badges34 bronze badges




















          3 Answers
          3






          active

          oldest

          votes


















          4












          $begingroup$

          You could also try:



          RegionMember[
          BoundaryDiscretizeGraphics@CanonicalizePolyhedron[Polyhedron[data]]]





          share|improve this answer









          $endgroup$




















            4












            $begingroup$

            Polyhedrons are a very new data type and it is not unusual that not all possible functions have been overloaded for them.



            You can extract the vertex coordinates of a Polyhedron R with R[[1]]; combined with ConvexHullMesh, this allows you to convert the Polyhedron to a MeshRegion and to apply `RandomPoint:



            R = RandomPolyhedron[5];
            S = ConvexHullMesh[R[[1]]];
            RandomMember[S]


            With the user-defined "polyhedron", you can do, e.g., this:



            R = BoundaryDiscretizeGraphics@Graphics3D[
            Polygon[0.9000000000,
            9.803074361, -0.2788974201, 0.6750000000,
            10.19278579, -0.2270388454, 0.4500000000,
            9.803074361, -0.2935999100, 0.6750000000,
            10.19278579, -0.2270388454, 0.2250000000,
            10.19278579, -0.2379129589, 0.4500000000,
            9.803074361, -0.2935999100, 0.2250000000,
            10.19278579, -0.2379129589, 0,
            9.803074361, -0.3066046725, 0.4500000000,
            9.803074361, -0.2935999100, 0,
            9.803074361, -0.3066046725, 0.2250000000,
            9.413362929, -0.3638887807, 0.4500000000,
            9.803074361, -0.2935999100, 0.2250000000,
            9.413362929, -0.3638887807, 0.6750000000,
            9.413362929, -0.3472567826, 0.4500000000,
            9.803074361, -0.2935999100, 0.6750000000,
            9.413362929, -0.3472567826, 0.9000000000,
            9.803074361, -0.2788974201, 0.4500000000,
            9.803074361, -0.2935999100, 0.9000000000,
            9.803074361, -1.278897420, 0.6750000000,
            10.19278579, -1.227038845, 0.4500000000,
            9.803074361, -1.293599910, 0.6750000000,
            10.19278579, -1.227038845, 0.2250000000,
            10.19278579, -1.237912959, 0.4500000000,
            9.803074361, -1.293599910, 0.2250000000,
            10.19278579, -1.237912959, 0,
            9.803074361, -1.306604673, 0.4500000000,
            9.803074361, -1.293599910, 0,
            9.803074361, -1.306604673, 0.2250000000,
            9.413362929, -1.363888781, 0.4500000000,
            9.803074361, -1.293599910, 0.2250000000,
            9.413362929, -1.363888781, 0.6750000000,
            9.413362929, -1.347256783, 0.4500000000,
            9.803074361, -1.293599910, 0.6750000000,
            9.413362929, -1.347256783, 0.9000000000,
            9.803074361, -1.278897420, 0.4500000000,
            9.803074361, -1.293599910, 0.9000000000,
            9.803074361, -0.2788974201, 0.9000000000,
            9.803074361, -1.278897420, 0.7875000000,
            9.997930077, -0.7529681327, 0.9000000000,
            9.803074361, -1.278897420, 0.6750000000,
            10.19278579, -1.227038845, 0.7875000000,
            9.997930077, -0.7529681327, 0.6750000000,
            10.19278579, -1.227038845, 0.6750000000,
            10.19278579, -0.2270388454, 0.7875000000,
            9.997930077, -0.7529681327, 0.6750000000,
            10.19278579, -0.2270388454, 0.9000000000,
            9.803074361, -0.2788974201, 0.7875000000,
            9.997930077, -0.7529681327, 0.6750000000,
            10.19278579, -0.2270388454, 0.6750000000,
            10.19278579, -1.227038845, 0.4500000000,
            10.19278579, -0.7324759022, 0.6750000000,
            10.19278579, -1.227038845, 0.2250000000,
            10.19278579, -1.237912959, 0.4500000000,
            10.19278579, -0.7324759022, 0.2250000000,
            10.19278579, -1.237912959, 0.2250000000,
            10.19278579, -0.2379129589, 0.4500000000,
            10.19278579, -0.7324759022, 0.2250000000,
            10.19278579, -0.2379129589, 0.6750000000,
            10.19278579, -0.2270388454, 0.4500000000,
            10.19278579, -0.7324759022, 0.2250000000,
            10.19278579, -0.2379129589, 0.2250000000,
            10.19278579, -1.237912959, 0.1125000000,
            9.997930077, -0.7722588157, 0.2250000000,
            10.19278579, -1.237912959, 0,
            9.803074361, -1.306604673, 0.1125000000,
            9.997930077, -0.7722588157, 0,
            9.803074361, -1.306604673, 0,
            9.803074361, -0.3066046725, 0.1125000000,
            9.997930077, -0.7722588157, 0,
            9.803074361, -0.3066046725, 0.2250000000,
            10.19278579, -0.2379129589, 0.1125000000,
            9.997930077, -0.7722588157, 0,
            9.803074361, -0.3066046725, 0,
            9.803074361, -1.306604673, 0.1125000000,
            9.608218645, -0.8352467266, 0,
            9.803074361, -1.306604673, 0.2250000000,
            9.413362929, -1.363888781, 0.1125000000,
            9.608218645, -0.8352467266, 0.2250000000,
            9.413362929, -1.363888781, 0.2250000000,
            9.413362929, -0.3638887807, 0.1125000000,
            9.608218645, -0.8352467266, 0.2250000000,
            9.413362929, -0.3638887807, 0,
            9.803074361, -0.3066046725, 0.1125000000,
            9.608218645, -0.8352467266, 0.2250000000,
            9.413362929, -0.3638887807, 0.2250000000,
            9.413362929, -1.363888781, 0.4500000000,
            9.413362929, -0.8555727816, 0.2250000000,
            9.413362929, -1.363888781, 0.6750000000,
            9.413362929, -1.347256783, 0.4500000000,
            9.413362929, -0.8555727816, 0.6750000000,
            9.413362929, -1.347256783, 0.6750000000,
            9.413362929, -0.3472567826, 0.4500000000,
            9.413362929, -0.8555727816, 0.6750000000,
            9.413362929, -0.3472567826, 0.2250000000,
            9.413362929, -0.3638887807, 0.4500000000,
            9.413362929, -0.8555727816, 0.6750000000,
            9.413362929, -0.3472567826, 0.6750000000,
            9.413362929, -1.347256783, 0.7875000000,
            9.608218645, -0.8130771013, 0.6750000000,
            9.413362929, -1.347256783, 0.9000000000,
            9.803074361, -1.278897420, 0.7875000000,
            9.608218645, -0.8130771013, 0.9000000000,
            9.803074361, -1.278897420, 0.9000000000,
            9.803074361, -0.2788974201, 0.7875000000,
            9.608218645, -0.8130771013, 0.9000000000,
            9.803074361, -0.2788974201, 0.6750000000,
            9.413362929, -0.3472567826, 0.7875000000,
            9.608218645, -0.8130771013]
            ];
            RandomMember[R]


            PS.: I have no clue at all what this new datatype is supposed to ship what is not already provided MeshRegions.






            share|improve this answer











            $endgroup$












            • $begingroup$
              thanks. what about the case if my polyhedron have faces wherein the vertices are not coplanar. What I have done is that I have triangulated those faces and can display a polyhedron successfully. Do you think the approach that you have mentioned above will work for such a polyhedron?
              $endgroup$
              – Ali Hashmi
              Jul 10 at 4:32










            • $begingroup$
              kindly check the example that I posted in the question
              $endgroup$
              – Ali Hashmi
              Jul 10 at 4:43










            • $begingroup$
              thanks. I was working on a solution myself as well. We both reached the same answer :) I will accept your answer however
              $endgroup$
              – Ali Hashmi
              Jul 10 at 5:47


















            3












            $begingroup$

            here is a little fix that should work for both cases:



            datamodified = data /. 0.4500000000, 9.803074361, -0.2935999100 -> 0.4500000000, 
            9.803074361, -0.3935999100 (* this will make vertices of one face non-coplanar *)

            poly = Polyhedron[datamodified];

            points = DeleteDuplicates@Flatten[poly[[1]], 1];

            assoc = AssociationThread[points -> Range[Length@points]];

            order = Map[Lookup[assoc, #] &, poly[[1]]];

            reg = DiscretizeGraphics@Region@Polyhedron[points, order];


            enter image description here



            RegionMember@reg


            enter image description here






            share|improve this answer









            $endgroup$















              Your Answer








              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "387"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f201832%2fregionmember-does-not-work-with-randompolyhedron-or-polyhedron-object%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              4












              $begingroup$

              You could also try:



              RegionMember[
              BoundaryDiscretizeGraphics@CanonicalizePolyhedron[Polyhedron[data]]]





              share|improve this answer









              $endgroup$

















                4












                $begingroup$

                You could also try:



                RegionMember[
                BoundaryDiscretizeGraphics@CanonicalizePolyhedron[Polyhedron[data]]]





                share|improve this answer









                $endgroup$















                  4












                  4








                  4





                  $begingroup$

                  You could also try:



                  RegionMember[
                  BoundaryDiscretizeGraphics@CanonicalizePolyhedron[Polyhedron[data]]]





                  share|improve this answer









                  $endgroup$



                  You could also try:



                  RegionMember[
                  BoundaryDiscretizeGraphics@CanonicalizePolyhedron[Polyhedron[data]]]






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jul 10 at 14:01









                  halmirhalmir

                  11.2k28 silver badges46 bronze badges




                  11.2k28 silver badges46 bronze badges























                      4












                      $begingroup$

                      Polyhedrons are a very new data type and it is not unusual that not all possible functions have been overloaded for them.



                      You can extract the vertex coordinates of a Polyhedron R with R[[1]]; combined with ConvexHullMesh, this allows you to convert the Polyhedron to a MeshRegion and to apply `RandomPoint:



                      R = RandomPolyhedron[5];
                      S = ConvexHullMesh[R[[1]]];
                      RandomMember[S]


                      With the user-defined "polyhedron", you can do, e.g., this:



                      R = BoundaryDiscretizeGraphics@Graphics3D[
                      Polygon[0.9000000000,
                      9.803074361, -0.2788974201, 0.6750000000,
                      10.19278579, -0.2270388454, 0.4500000000,
                      9.803074361, -0.2935999100, 0.6750000000,
                      10.19278579, -0.2270388454, 0.2250000000,
                      10.19278579, -0.2379129589, 0.4500000000,
                      9.803074361, -0.2935999100, 0.2250000000,
                      10.19278579, -0.2379129589, 0,
                      9.803074361, -0.3066046725, 0.4500000000,
                      9.803074361, -0.2935999100, 0,
                      9.803074361, -0.3066046725, 0.2250000000,
                      9.413362929, -0.3638887807, 0.4500000000,
                      9.803074361, -0.2935999100, 0.2250000000,
                      9.413362929, -0.3638887807, 0.6750000000,
                      9.413362929, -0.3472567826, 0.4500000000,
                      9.803074361, -0.2935999100, 0.6750000000,
                      9.413362929, -0.3472567826, 0.9000000000,
                      9.803074361, -0.2788974201, 0.4500000000,
                      9.803074361, -0.2935999100, 0.9000000000,
                      9.803074361, -1.278897420, 0.6750000000,
                      10.19278579, -1.227038845, 0.4500000000,
                      9.803074361, -1.293599910, 0.6750000000,
                      10.19278579, -1.227038845, 0.2250000000,
                      10.19278579, -1.237912959, 0.4500000000,
                      9.803074361, -1.293599910, 0.2250000000,
                      10.19278579, -1.237912959, 0,
                      9.803074361, -1.306604673, 0.4500000000,
                      9.803074361, -1.293599910, 0,
                      9.803074361, -1.306604673, 0.2250000000,
                      9.413362929, -1.363888781, 0.4500000000,
                      9.803074361, -1.293599910, 0.2250000000,
                      9.413362929, -1.363888781, 0.6750000000,
                      9.413362929, -1.347256783, 0.4500000000,
                      9.803074361, -1.293599910, 0.6750000000,
                      9.413362929, -1.347256783, 0.9000000000,
                      9.803074361, -1.278897420, 0.4500000000,
                      9.803074361, -1.293599910, 0.9000000000,
                      9.803074361, -0.2788974201, 0.9000000000,
                      9.803074361, -1.278897420, 0.7875000000,
                      9.997930077, -0.7529681327, 0.9000000000,
                      9.803074361, -1.278897420, 0.6750000000,
                      10.19278579, -1.227038845, 0.7875000000,
                      9.997930077, -0.7529681327, 0.6750000000,
                      10.19278579, -1.227038845, 0.6750000000,
                      10.19278579, -0.2270388454, 0.7875000000,
                      9.997930077, -0.7529681327, 0.6750000000,
                      10.19278579, -0.2270388454, 0.9000000000,
                      9.803074361, -0.2788974201, 0.7875000000,
                      9.997930077, -0.7529681327, 0.6750000000,
                      10.19278579, -0.2270388454, 0.6750000000,
                      10.19278579, -1.227038845, 0.4500000000,
                      10.19278579, -0.7324759022, 0.6750000000,
                      10.19278579, -1.227038845, 0.2250000000,
                      10.19278579, -1.237912959, 0.4500000000,
                      10.19278579, -0.7324759022, 0.2250000000,
                      10.19278579, -1.237912959, 0.2250000000,
                      10.19278579, -0.2379129589, 0.4500000000,
                      10.19278579, -0.7324759022, 0.2250000000,
                      10.19278579, -0.2379129589, 0.6750000000,
                      10.19278579, -0.2270388454, 0.4500000000,
                      10.19278579, -0.7324759022, 0.2250000000,
                      10.19278579, -0.2379129589, 0.2250000000,
                      10.19278579, -1.237912959, 0.1125000000,
                      9.997930077, -0.7722588157, 0.2250000000,
                      10.19278579, -1.237912959, 0,
                      9.803074361, -1.306604673, 0.1125000000,
                      9.997930077, -0.7722588157, 0,
                      9.803074361, -1.306604673, 0,
                      9.803074361, -0.3066046725, 0.1125000000,
                      9.997930077, -0.7722588157, 0,
                      9.803074361, -0.3066046725, 0.2250000000,
                      10.19278579, -0.2379129589, 0.1125000000,
                      9.997930077, -0.7722588157, 0,
                      9.803074361, -0.3066046725, 0,
                      9.803074361, -1.306604673, 0.1125000000,
                      9.608218645, -0.8352467266, 0,
                      9.803074361, -1.306604673, 0.2250000000,
                      9.413362929, -1.363888781, 0.1125000000,
                      9.608218645, -0.8352467266, 0.2250000000,
                      9.413362929, -1.363888781, 0.2250000000,
                      9.413362929, -0.3638887807, 0.1125000000,
                      9.608218645, -0.8352467266, 0.2250000000,
                      9.413362929, -0.3638887807, 0,
                      9.803074361, -0.3066046725, 0.1125000000,
                      9.608218645, -0.8352467266, 0.2250000000,
                      9.413362929, -0.3638887807, 0.2250000000,
                      9.413362929, -1.363888781, 0.4500000000,
                      9.413362929, -0.8555727816, 0.2250000000,
                      9.413362929, -1.363888781, 0.6750000000,
                      9.413362929, -1.347256783, 0.4500000000,
                      9.413362929, -0.8555727816, 0.6750000000,
                      9.413362929, -1.347256783, 0.6750000000,
                      9.413362929, -0.3472567826, 0.4500000000,
                      9.413362929, -0.8555727816, 0.6750000000,
                      9.413362929, -0.3472567826, 0.2250000000,
                      9.413362929, -0.3638887807, 0.4500000000,
                      9.413362929, -0.8555727816, 0.6750000000,
                      9.413362929, -0.3472567826, 0.6750000000,
                      9.413362929, -1.347256783, 0.7875000000,
                      9.608218645, -0.8130771013, 0.6750000000,
                      9.413362929, -1.347256783, 0.9000000000,
                      9.803074361, -1.278897420, 0.7875000000,
                      9.608218645, -0.8130771013, 0.9000000000,
                      9.803074361, -1.278897420, 0.9000000000,
                      9.803074361, -0.2788974201, 0.7875000000,
                      9.608218645, -0.8130771013, 0.9000000000,
                      9.803074361, -0.2788974201, 0.6750000000,
                      9.413362929, -0.3472567826, 0.7875000000,
                      9.608218645, -0.8130771013]
                      ];
                      RandomMember[R]


                      PS.: I have no clue at all what this new datatype is supposed to ship what is not already provided MeshRegions.






                      share|improve this answer











                      $endgroup$












                      • $begingroup$
                        thanks. what about the case if my polyhedron have faces wherein the vertices are not coplanar. What I have done is that I have triangulated those faces and can display a polyhedron successfully. Do you think the approach that you have mentioned above will work for such a polyhedron?
                        $endgroup$
                        – Ali Hashmi
                        Jul 10 at 4:32










                      • $begingroup$
                        kindly check the example that I posted in the question
                        $endgroup$
                        – Ali Hashmi
                        Jul 10 at 4:43










                      • $begingroup$
                        thanks. I was working on a solution myself as well. We both reached the same answer :) I will accept your answer however
                        $endgroup$
                        – Ali Hashmi
                        Jul 10 at 5:47















                      4












                      $begingroup$

                      Polyhedrons are a very new data type and it is not unusual that not all possible functions have been overloaded for them.



                      You can extract the vertex coordinates of a Polyhedron R with R[[1]]; combined with ConvexHullMesh, this allows you to convert the Polyhedron to a MeshRegion and to apply `RandomPoint:



                      R = RandomPolyhedron[5];
                      S = ConvexHullMesh[R[[1]]];
                      RandomMember[S]


                      With the user-defined "polyhedron", you can do, e.g., this:



                      R = BoundaryDiscretizeGraphics@Graphics3D[
                      Polygon[0.9000000000,
                      9.803074361, -0.2788974201, 0.6750000000,
                      10.19278579, -0.2270388454, 0.4500000000,
                      9.803074361, -0.2935999100, 0.6750000000,
                      10.19278579, -0.2270388454, 0.2250000000,
                      10.19278579, -0.2379129589, 0.4500000000,
                      9.803074361, -0.2935999100, 0.2250000000,
                      10.19278579, -0.2379129589, 0,
                      9.803074361, -0.3066046725, 0.4500000000,
                      9.803074361, -0.2935999100, 0,
                      9.803074361, -0.3066046725, 0.2250000000,
                      9.413362929, -0.3638887807, 0.4500000000,
                      9.803074361, -0.2935999100, 0.2250000000,
                      9.413362929, -0.3638887807, 0.6750000000,
                      9.413362929, -0.3472567826, 0.4500000000,
                      9.803074361, -0.2935999100, 0.6750000000,
                      9.413362929, -0.3472567826, 0.9000000000,
                      9.803074361, -0.2788974201, 0.4500000000,
                      9.803074361, -0.2935999100, 0.9000000000,
                      9.803074361, -1.278897420, 0.6750000000,
                      10.19278579, -1.227038845, 0.4500000000,
                      9.803074361, -1.293599910, 0.6750000000,
                      10.19278579, -1.227038845, 0.2250000000,
                      10.19278579, -1.237912959, 0.4500000000,
                      9.803074361, -1.293599910, 0.2250000000,
                      10.19278579, -1.237912959, 0,
                      9.803074361, -1.306604673, 0.4500000000,
                      9.803074361, -1.293599910, 0,
                      9.803074361, -1.306604673, 0.2250000000,
                      9.413362929, -1.363888781, 0.4500000000,
                      9.803074361, -1.293599910, 0.2250000000,
                      9.413362929, -1.363888781, 0.6750000000,
                      9.413362929, -1.347256783, 0.4500000000,
                      9.803074361, -1.293599910, 0.6750000000,
                      9.413362929, -1.347256783, 0.9000000000,
                      9.803074361, -1.278897420, 0.4500000000,
                      9.803074361, -1.293599910, 0.9000000000,
                      9.803074361, -0.2788974201, 0.9000000000,
                      9.803074361, -1.278897420, 0.7875000000,
                      9.997930077, -0.7529681327, 0.9000000000,
                      9.803074361, -1.278897420, 0.6750000000,
                      10.19278579, -1.227038845, 0.7875000000,
                      9.997930077, -0.7529681327, 0.6750000000,
                      10.19278579, -1.227038845, 0.6750000000,
                      10.19278579, -0.2270388454, 0.7875000000,
                      9.997930077, -0.7529681327, 0.6750000000,
                      10.19278579, -0.2270388454, 0.9000000000,
                      9.803074361, -0.2788974201, 0.7875000000,
                      9.997930077, -0.7529681327, 0.6750000000,
                      10.19278579, -0.2270388454, 0.6750000000,
                      10.19278579, -1.227038845, 0.4500000000,
                      10.19278579, -0.7324759022, 0.6750000000,
                      10.19278579, -1.227038845, 0.2250000000,
                      10.19278579, -1.237912959, 0.4500000000,
                      10.19278579, -0.7324759022, 0.2250000000,
                      10.19278579, -1.237912959, 0.2250000000,
                      10.19278579, -0.2379129589, 0.4500000000,
                      10.19278579, -0.7324759022, 0.2250000000,
                      10.19278579, -0.2379129589, 0.6750000000,
                      10.19278579, -0.2270388454, 0.4500000000,
                      10.19278579, -0.7324759022, 0.2250000000,
                      10.19278579, -0.2379129589, 0.2250000000,
                      10.19278579, -1.237912959, 0.1125000000,
                      9.997930077, -0.7722588157, 0.2250000000,
                      10.19278579, -1.237912959, 0,
                      9.803074361, -1.306604673, 0.1125000000,
                      9.997930077, -0.7722588157, 0,
                      9.803074361, -1.306604673, 0,
                      9.803074361, -0.3066046725, 0.1125000000,
                      9.997930077, -0.7722588157, 0,
                      9.803074361, -0.3066046725, 0.2250000000,
                      10.19278579, -0.2379129589, 0.1125000000,
                      9.997930077, -0.7722588157, 0,
                      9.803074361, -0.3066046725, 0,
                      9.803074361, -1.306604673, 0.1125000000,
                      9.608218645, -0.8352467266, 0,
                      9.803074361, -1.306604673, 0.2250000000,
                      9.413362929, -1.363888781, 0.1125000000,
                      9.608218645, -0.8352467266, 0.2250000000,
                      9.413362929, -1.363888781, 0.2250000000,
                      9.413362929, -0.3638887807, 0.1125000000,
                      9.608218645, -0.8352467266, 0.2250000000,
                      9.413362929, -0.3638887807, 0,
                      9.803074361, -0.3066046725, 0.1125000000,
                      9.608218645, -0.8352467266, 0.2250000000,
                      9.413362929, -0.3638887807, 0.2250000000,
                      9.413362929, -1.363888781, 0.4500000000,
                      9.413362929, -0.8555727816, 0.2250000000,
                      9.413362929, -1.363888781, 0.6750000000,
                      9.413362929, -1.347256783, 0.4500000000,
                      9.413362929, -0.8555727816, 0.6750000000,
                      9.413362929, -1.347256783, 0.6750000000,
                      9.413362929, -0.3472567826, 0.4500000000,
                      9.413362929, -0.8555727816, 0.6750000000,
                      9.413362929, -0.3472567826, 0.2250000000,
                      9.413362929, -0.3638887807, 0.4500000000,
                      9.413362929, -0.8555727816, 0.6750000000,
                      9.413362929, -0.3472567826, 0.6750000000,
                      9.413362929, -1.347256783, 0.7875000000,
                      9.608218645, -0.8130771013, 0.6750000000,
                      9.413362929, -1.347256783, 0.9000000000,
                      9.803074361, -1.278897420, 0.7875000000,
                      9.608218645, -0.8130771013, 0.9000000000,
                      9.803074361, -1.278897420, 0.9000000000,
                      9.803074361, -0.2788974201, 0.7875000000,
                      9.608218645, -0.8130771013, 0.9000000000,
                      9.803074361, -0.2788974201, 0.6750000000,
                      9.413362929, -0.3472567826, 0.7875000000,
                      9.608218645, -0.8130771013]
                      ];
                      RandomMember[R]


                      PS.: I have no clue at all what this new datatype is supposed to ship what is not already provided MeshRegions.






                      share|improve this answer











                      $endgroup$












                      • $begingroup$
                        thanks. what about the case if my polyhedron have faces wherein the vertices are not coplanar. What I have done is that I have triangulated those faces and can display a polyhedron successfully. Do you think the approach that you have mentioned above will work for such a polyhedron?
                        $endgroup$
                        – Ali Hashmi
                        Jul 10 at 4:32










                      • $begingroup$
                        kindly check the example that I posted in the question
                        $endgroup$
                        – Ali Hashmi
                        Jul 10 at 4:43










                      • $begingroup$
                        thanks. I was working on a solution myself as well. We both reached the same answer :) I will accept your answer however
                        $endgroup$
                        – Ali Hashmi
                        Jul 10 at 5:47













                      4












                      4








                      4





                      $begingroup$

                      Polyhedrons are a very new data type and it is not unusual that not all possible functions have been overloaded for them.



                      You can extract the vertex coordinates of a Polyhedron R with R[[1]]; combined with ConvexHullMesh, this allows you to convert the Polyhedron to a MeshRegion and to apply `RandomPoint:



                      R = RandomPolyhedron[5];
                      S = ConvexHullMesh[R[[1]]];
                      RandomMember[S]


                      With the user-defined "polyhedron", you can do, e.g., this:



                      R = BoundaryDiscretizeGraphics@Graphics3D[
                      Polygon[0.9000000000,
                      9.803074361, -0.2788974201, 0.6750000000,
                      10.19278579, -0.2270388454, 0.4500000000,
                      9.803074361, -0.2935999100, 0.6750000000,
                      10.19278579, -0.2270388454, 0.2250000000,
                      10.19278579, -0.2379129589, 0.4500000000,
                      9.803074361, -0.2935999100, 0.2250000000,
                      10.19278579, -0.2379129589, 0,
                      9.803074361, -0.3066046725, 0.4500000000,
                      9.803074361, -0.2935999100, 0,
                      9.803074361, -0.3066046725, 0.2250000000,
                      9.413362929, -0.3638887807, 0.4500000000,
                      9.803074361, -0.2935999100, 0.2250000000,
                      9.413362929, -0.3638887807, 0.6750000000,
                      9.413362929, -0.3472567826, 0.4500000000,
                      9.803074361, -0.2935999100, 0.6750000000,
                      9.413362929, -0.3472567826, 0.9000000000,
                      9.803074361, -0.2788974201, 0.4500000000,
                      9.803074361, -0.2935999100, 0.9000000000,
                      9.803074361, -1.278897420, 0.6750000000,
                      10.19278579, -1.227038845, 0.4500000000,
                      9.803074361, -1.293599910, 0.6750000000,
                      10.19278579, -1.227038845, 0.2250000000,
                      10.19278579, -1.237912959, 0.4500000000,
                      9.803074361, -1.293599910, 0.2250000000,
                      10.19278579, -1.237912959, 0,
                      9.803074361, -1.306604673, 0.4500000000,
                      9.803074361, -1.293599910, 0,
                      9.803074361, -1.306604673, 0.2250000000,
                      9.413362929, -1.363888781, 0.4500000000,
                      9.803074361, -1.293599910, 0.2250000000,
                      9.413362929, -1.363888781, 0.6750000000,
                      9.413362929, -1.347256783, 0.4500000000,
                      9.803074361, -1.293599910, 0.6750000000,
                      9.413362929, -1.347256783, 0.9000000000,
                      9.803074361, -1.278897420, 0.4500000000,
                      9.803074361, -1.293599910, 0.9000000000,
                      9.803074361, -0.2788974201, 0.9000000000,
                      9.803074361, -1.278897420, 0.7875000000,
                      9.997930077, -0.7529681327, 0.9000000000,
                      9.803074361, -1.278897420, 0.6750000000,
                      10.19278579, -1.227038845, 0.7875000000,
                      9.997930077, -0.7529681327, 0.6750000000,
                      10.19278579, -1.227038845, 0.6750000000,
                      10.19278579, -0.2270388454, 0.7875000000,
                      9.997930077, -0.7529681327, 0.6750000000,
                      10.19278579, -0.2270388454, 0.9000000000,
                      9.803074361, -0.2788974201, 0.7875000000,
                      9.997930077, -0.7529681327, 0.6750000000,
                      10.19278579, -0.2270388454, 0.6750000000,
                      10.19278579, -1.227038845, 0.4500000000,
                      10.19278579, -0.7324759022, 0.6750000000,
                      10.19278579, -1.227038845, 0.2250000000,
                      10.19278579, -1.237912959, 0.4500000000,
                      10.19278579, -0.7324759022, 0.2250000000,
                      10.19278579, -1.237912959, 0.2250000000,
                      10.19278579, -0.2379129589, 0.4500000000,
                      10.19278579, -0.7324759022, 0.2250000000,
                      10.19278579, -0.2379129589, 0.6750000000,
                      10.19278579, -0.2270388454, 0.4500000000,
                      10.19278579, -0.7324759022, 0.2250000000,
                      10.19278579, -0.2379129589, 0.2250000000,
                      10.19278579, -1.237912959, 0.1125000000,
                      9.997930077, -0.7722588157, 0.2250000000,
                      10.19278579, -1.237912959, 0,
                      9.803074361, -1.306604673, 0.1125000000,
                      9.997930077, -0.7722588157, 0,
                      9.803074361, -1.306604673, 0,
                      9.803074361, -0.3066046725, 0.1125000000,
                      9.997930077, -0.7722588157, 0,
                      9.803074361, -0.3066046725, 0.2250000000,
                      10.19278579, -0.2379129589, 0.1125000000,
                      9.997930077, -0.7722588157, 0,
                      9.803074361, -0.3066046725, 0,
                      9.803074361, -1.306604673, 0.1125000000,
                      9.608218645, -0.8352467266, 0,
                      9.803074361, -1.306604673, 0.2250000000,
                      9.413362929, -1.363888781, 0.1125000000,
                      9.608218645, -0.8352467266, 0.2250000000,
                      9.413362929, -1.363888781, 0.2250000000,
                      9.413362929, -0.3638887807, 0.1125000000,
                      9.608218645, -0.8352467266, 0.2250000000,
                      9.413362929, -0.3638887807, 0,
                      9.803074361, -0.3066046725, 0.1125000000,
                      9.608218645, -0.8352467266, 0.2250000000,
                      9.413362929, -0.3638887807, 0.2250000000,
                      9.413362929, -1.363888781, 0.4500000000,
                      9.413362929, -0.8555727816, 0.2250000000,
                      9.413362929, -1.363888781, 0.6750000000,
                      9.413362929, -1.347256783, 0.4500000000,
                      9.413362929, -0.8555727816, 0.6750000000,
                      9.413362929, -1.347256783, 0.6750000000,
                      9.413362929, -0.3472567826, 0.4500000000,
                      9.413362929, -0.8555727816, 0.6750000000,
                      9.413362929, -0.3472567826, 0.2250000000,
                      9.413362929, -0.3638887807, 0.4500000000,
                      9.413362929, -0.8555727816, 0.6750000000,
                      9.413362929, -0.3472567826, 0.6750000000,
                      9.413362929, -1.347256783, 0.7875000000,
                      9.608218645, -0.8130771013, 0.6750000000,
                      9.413362929, -1.347256783, 0.9000000000,
                      9.803074361, -1.278897420, 0.7875000000,
                      9.608218645, -0.8130771013, 0.9000000000,
                      9.803074361, -1.278897420, 0.9000000000,
                      9.803074361, -0.2788974201, 0.7875000000,
                      9.608218645, -0.8130771013, 0.9000000000,
                      9.803074361, -0.2788974201, 0.6750000000,
                      9.413362929, -0.3472567826, 0.7875000000,
                      9.608218645, -0.8130771013]
                      ];
                      RandomMember[R]


                      PS.: I have no clue at all what this new datatype is supposed to ship what is not already provided MeshRegions.






                      share|improve this answer











                      $endgroup$



                      Polyhedrons are a very new data type and it is not unusual that not all possible functions have been overloaded for them.



                      You can extract the vertex coordinates of a Polyhedron R with R[[1]]; combined with ConvexHullMesh, this allows you to convert the Polyhedron to a MeshRegion and to apply `RandomPoint:



                      R = RandomPolyhedron[5];
                      S = ConvexHullMesh[R[[1]]];
                      RandomMember[S]


                      With the user-defined "polyhedron", you can do, e.g., this:



                      R = BoundaryDiscretizeGraphics@Graphics3D[
                      Polygon[0.9000000000,
                      9.803074361, -0.2788974201, 0.6750000000,
                      10.19278579, -0.2270388454, 0.4500000000,
                      9.803074361, -0.2935999100, 0.6750000000,
                      10.19278579, -0.2270388454, 0.2250000000,
                      10.19278579, -0.2379129589, 0.4500000000,
                      9.803074361, -0.2935999100, 0.2250000000,
                      10.19278579, -0.2379129589, 0,
                      9.803074361, -0.3066046725, 0.4500000000,
                      9.803074361, -0.2935999100, 0,
                      9.803074361, -0.3066046725, 0.2250000000,
                      9.413362929, -0.3638887807, 0.4500000000,
                      9.803074361, -0.2935999100, 0.2250000000,
                      9.413362929, -0.3638887807, 0.6750000000,
                      9.413362929, -0.3472567826, 0.4500000000,
                      9.803074361, -0.2935999100, 0.6750000000,
                      9.413362929, -0.3472567826, 0.9000000000,
                      9.803074361, -0.2788974201, 0.4500000000,
                      9.803074361, -0.2935999100, 0.9000000000,
                      9.803074361, -1.278897420, 0.6750000000,
                      10.19278579, -1.227038845, 0.4500000000,
                      9.803074361, -1.293599910, 0.6750000000,
                      10.19278579, -1.227038845, 0.2250000000,
                      10.19278579, -1.237912959, 0.4500000000,
                      9.803074361, -1.293599910, 0.2250000000,
                      10.19278579, -1.237912959, 0,
                      9.803074361, -1.306604673, 0.4500000000,
                      9.803074361, -1.293599910, 0,
                      9.803074361, -1.306604673, 0.2250000000,
                      9.413362929, -1.363888781, 0.4500000000,
                      9.803074361, -1.293599910, 0.2250000000,
                      9.413362929, -1.363888781, 0.6750000000,
                      9.413362929, -1.347256783, 0.4500000000,
                      9.803074361, -1.293599910, 0.6750000000,
                      9.413362929, -1.347256783, 0.9000000000,
                      9.803074361, -1.278897420, 0.4500000000,
                      9.803074361, -1.293599910, 0.9000000000,
                      9.803074361, -0.2788974201, 0.9000000000,
                      9.803074361, -1.278897420, 0.7875000000,
                      9.997930077, -0.7529681327, 0.9000000000,
                      9.803074361, -1.278897420, 0.6750000000,
                      10.19278579, -1.227038845, 0.7875000000,
                      9.997930077, -0.7529681327, 0.6750000000,
                      10.19278579, -1.227038845, 0.6750000000,
                      10.19278579, -0.2270388454, 0.7875000000,
                      9.997930077, -0.7529681327, 0.6750000000,
                      10.19278579, -0.2270388454, 0.9000000000,
                      9.803074361, -0.2788974201, 0.7875000000,
                      9.997930077, -0.7529681327, 0.6750000000,
                      10.19278579, -0.2270388454, 0.6750000000,
                      10.19278579, -1.227038845, 0.4500000000,
                      10.19278579, -0.7324759022, 0.6750000000,
                      10.19278579, -1.227038845, 0.2250000000,
                      10.19278579, -1.237912959, 0.4500000000,
                      10.19278579, -0.7324759022, 0.2250000000,
                      10.19278579, -1.237912959, 0.2250000000,
                      10.19278579, -0.2379129589, 0.4500000000,
                      10.19278579, -0.7324759022, 0.2250000000,
                      10.19278579, -0.2379129589, 0.6750000000,
                      10.19278579, -0.2270388454, 0.4500000000,
                      10.19278579, -0.7324759022, 0.2250000000,
                      10.19278579, -0.2379129589, 0.2250000000,
                      10.19278579, -1.237912959, 0.1125000000,
                      9.997930077, -0.7722588157, 0.2250000000,
                      10.19278579, -1.237912959, 0,
                      9.803074361, -1.306604673, 0.1125000000,
                      9.997930077, -0.7722588157, 0,
                      9.803074361, -1.306604673, 0,
                      9.803074361, -0.3066046725, 0.1125000000,
                      9.997930077, -0.7722588157, 0,
                      9.803074361, -0.3066046725, 0.2250000000,
                      10.19278579, -0.2379129589, 0.1125000000,
                      9.997930077, -0.7722588157, 0,
                      9.803074361, -0.3066046725, 0,
                      9.803074361, -1.306604673, 0.1125000000,
                      9.608218645, -0.8352467266, 0,
                      9.803074361, -1.306604673, 0.2250000000,
                      9.413362929, -1.363888781, 0.1125000000,
                      9.608218645, -0.8352467266, 0.2250000000,
                      9.413362929, -1.363888781, 0.2250000000,
                      9.413362929, -0.3638887807, 0.1125000000,
                      9.608218645, -0.8352467266, 0.2250000000,
                      9.413362929, -0.3638887807, 0,
                      9.803074361, -0.3066046725, 0.1125000000,
                      9.608218645, -0.8352467266, 0.2250000000,
                      9.413362929, -0.3638887807, 0.2250000000,
                      9.413362929, -1.363888781, 0.4500000000,
                      9.413362929, -0.8555727816, 0.2250000000,
                      9.413362929, -1.363888781, 0.6750000000,
                      9.413362929, -1.347256783, 0.4500000000,
                      9.413362929, -0.8555727816, 0.6750000000,
                      9.413362929, -1.347256783, 0.6750000000,
                      9.413362929, -0.3472567826, 0.4500000000,
                      9.413362929, -0.8555727816, 0.6750000000,
                      9.413362929, -0.3472567826, 0.2250000000,
                      9.413362929, -0.3638887807, 0.4500000000,
                      9.413362929, -0.8555727816, 0.6750000000,
                      9.413362929, -0.3472567826, 0.6750000000,
                      9.413362929, -1.347256783, 0.7875000000,
                      9.608218645, -0.8130771013, 0.6750000000,
                      9.413362929, -1.347256783, 0.9000000000,
                      9.803074361, -1.278897420, 0.7875000000,
                      9.608218645, -0.8130771013, 0.9000000000,
                      9.803074361, -1.278897420, 0.9000000000,
                      9.803074361, -0.2788974201, 0.7875000000,
                      9.608218645, -0.8130771013, 0.9000000000,
                      9.803074361, -0.2788974201, 0.6750000000,
                      9.413362929, -0.3472567826, 0.7875000000,
                      9.608218645, -0.8130771013]
                      ];
                      RandomMember[R]


                      PS.: I have no clue at all what this new datatype is supposed to ship what is not already provided MeshRegions.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Jul 10 at 17:49

























                      answered Jul 10 at 3:50









                      Henrik SchumacherHenrik Schumacher

                      65.4k5 gold badges94 silver badges180 bronze badges




                      65.4k5 gold badges94 silver badges180 bronze badges











                      • $begingroup$
                        thanks. what about the case if my polyhedron have faces wherein the vertices are not coplanar. What I have done is that I have triangulated those faces and can display a polyhedron successfully. Do you think the approach that you have mentioned above will work for such a polyhedron?
                        $endgroup$
                        – Ali Hashmi
                        Jul 10 at 4:32










                      • $begingroup$
                        kindly check the example that I posted in the question
                        $endgroup$
                        – Ali Hashmi
                        Jul 10 at 4:43










                      • $begingroup$
                        thanks. I was working on a solution myself as well. We both reached the same answer :) I will accept your answer however
                        $endgroup$
                        – Ali Hashmi
                        Jul 10 at 5:47
















                      • $begingroup$
                        thanks. what about the case if my polyhedron have faces wherein the vertices are not coplanar. What I have done is that I have triangulated those faces and can display a polyhedron successfully. Do you think the approach that you have mentioned above will work for such a polyhedron?
                        $endgroup$
                        – Ali Hashmi
                        Jul 10 at 4:32










                      • $begingroup$
                        kindly check the example that I posted in the question
                        $endgroup$
                        – Ali Hashmi
                        Jul 10 at 4:43










                      • $begingroup$
                        thanks. I was working on a solution myself as well. We both reached the same answer :) I will accept your answer however
                        $endgroup$
                        – Ali Hashmi
                        Jul 10 at 5:47















                      $begingroup$
                      thanks. what about the case if my polyhedron have faces wherein the vertices are not coplanar. What I have done is that I have triangulated those faces and can display a polyhedron successfully. Do you think the approach that you have mentioned above will work for such a polyhedron?
                      $endgroup$
                      – Ali Hashmi
                      Jul 10 at 4:32




                      $begingroup$
                      thanks. what about the case if my polyhedron have faces wherein the vertices are not coplanar. What I have done is that I have triangulated those faces and can display a polyhedron successfully. Do you think the approach that you have mentioned above will work for such a polyhedron?
                      $endgroup$
                      – Ali Hashmi
                      Jul 10 at 4:32












                      $begingroup$
                      kindly check the example that I posted in the question
                      $endgroup$
                      – Ali Hashmi
                      Jul 10 at 4:43




                      $begingroup$
                      kindly check the example that I posted in the question
                      $endgroup$
                      – Ali Hashmi
                      Jul 10 at 4:43












                      $begingroup$
                      thanks. I was working on a solution myself as well. We both reached the same answer :) I will accept your answer however
                      $endgroup$
                      – Ali Hashmi
                      Jul 10 at 5:47




                      $begingroup$
                      thanks. I was working on a solution myself as well. We both reached the same answer :) I will accept your answer however
                      $endgroup$
                      – Ali Hashmi
                      Jul 10 at 5:47











                      3












                      $begingroup$

                      here is a little fix that should work for both cases:



                      datamodified = data /. 0.4500000000, 9.803074361, -0.2935999100 -> 0.4500000000, 
                      9.803074361, -0.3935999100 (* this will make vertices of one face non-coplanar *)

                      poly = Polyhedron[datamodified];

                      points = DeleteDuplicates@Flatten[poly[[1]], 1];

                      assoc = AssociationThread[points -> Range[Length@points]];

                      order = Map[Lookup[assoc, #] &, poly[[1]]];

                      reg = DiscretizeGraphics@Region@Polyhedron[points, order];


                      enter image description here



                      RegionMember@reg


                      enter image description here






                      share|improve this answer









                      $endgroup$

















                        3












                        $begingroup$

                        here is a little fix that should work for both cases:



                        datamodified = data /. 0.4500000000, 9.803074361, -0.2935999100 -> 0.4500000000, 
                        9.803074361, -0.3935999100 (* this will make vertices of one face non-coplanar *)

                        poly = Polyhedron[datamodified];

                        points = DeleteDuplicates@Flatten[poly[[1]], 1];

                        assoc = AssociationThread[points -> Range[Length@points]];

                        order = Map[Lookup[assoc, #] &, poly[[1]]];

                        reg = DiscretizeGraphics@Region@Polyhedron[points, order];


                        enter image description here



                        RegionMember@reg


                        enter image description here






                        share|improve this answer









                        $endgroup$















                          3












                          3








                          3





                          $begingroup$

                          here is a little fix that should work for both cases:



                          datamodified = data /. 0.4500000000, 9.803074361, -0.2935999100 -> 0.4500000000, 
                          9.803074361, -0.3935999100 (* this will make vertices of one face non-coplanar *)

                          poly = Polyhedron[datamodified];

                          points = DeleteDuplicates@Flatten[poly[[1]], 1];

                          assoc = AssociationThread[points -> Range[Length@points]];

                          order = Map[Lookup[assoc, #] &, poly[[1]]];

                          reg = DiscretizeGraphics@Region@Polyhedron[points, order];


                          enter image description here



                          RegionMember@reg


                          enter image description here






                          share|improve this answer









                          $endgroup$



                          here is a little fix that should work for both cases:



                          datamodified = data /. 0.4500000000, 9.803074361, -0.2935999100 -> 0.4500000000, 
                          9.803074361, -0.3935999100 (* this will make vertices of one face non-coplanar *)

                          poly = Polyhedron[datamodified];

                          points = DeleteDuplicates@Flatten[poly[[1]], 1];

                          assoc = AssociationThread[points -> Range[Length@points]];

                          order = Map[Lookup[assoc, #] &, poly[[1]]];

                          reg = DiscretizeGraphics@Region@Polyhedron[points, order];


                          enter image description here



                          RegionMember@reg


                          enter image description here







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jul 10 at 5:42









                          Ali HashmiAli Hashmi

                          5,9604 gold badges15 silver badges34 bronze badges




                          5,9604 gold badges15 silver badges34 bronze badges



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Mathematica Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              Use MathJax to format equations. MathJax reference.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f201832%2fregionmember-does-not-work-with-randompolyhedron-or-polyhedron-object%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

                              Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

                              Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림