Skip to main content
added 2 characters in body
Source Link
Henrik Schumacher
  • 109.5k
  • 7
  • 186
  • 322
R = RandomPolyhedron[5];
S = ConvexHullMesh[R[[1]]];
RandomPoint[S]RandomMember[S]
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}}}]
   ];
RandomPoint[R]RandomMember[R]
R = RandomPolyhedron[5];
S = ConvexHullMesh[R[[1]]];
RandomPoint[S]
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}}}]
   ];
RandomPoint[R]
R = RandomPolyhedron[5];
S = ConvexHullMesh[R[[1]]];
RandomMember[S]
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]
added 6068 characters in body
Source Link
Henrik Schumacher
  • 109.5k
  • 7
  • 186
  • 322

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}}}]
   ];
RandomPoint[R]

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

N.B: The above answer will work on very limited cases and will fail for a polyhedron if the vertices of any one of its face are not coplanar

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

N.B: The above answer will work on very limited cases and will fail for a polyhedron if the vertices of any one of its face are not coplanar

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}}}]
   ];
RandomPoint[R]

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

added 33 characters in body
Source Link
Ali Hashmi
  • 9.1k
  • 4
  • 22
  • 43

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]]];
RandomPoint[S]

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

N.B: The above answer will work on very limited cases and will fail for the examplea polyhedron posted aboveif the vertices of any one of its face are not coplanar

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]]];
RandomPoint[S]

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

N.B: The above answer will work on very limited cases and will fail for the example polyhedron posted above

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]]];
RandomPoint[S]

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

N.B: The above answer will work on very limited cases and will fail for a polyhedron if the vertices of any one of its face are not coplanar

added 115 characters in body
Source Link
Ali Hashmi
  • 9.1k
  • 4
  • 22
  • 43
Loading
Source Link
Henrik Schumacher
  • 109.5k
  • 7
  • 186
  • 322
Loading