Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. s = BoundaryDiscretizeGraphics[Graphics3D[{Ball[]}]];
  2. pos = Flatten[Position[MeshCoordinates[s], {x_, _, _} /; x < 0]];
  3. f = DeleteCases[MeshCells[s, 2][[All, 1]],
  4. x_ /; Intersection[pos, x] != {}];
  5. mesh = MeshRegion[MeshCoordinates[s], Polygon /@ f]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement