4
$\begingroup$

Suppose I render a simple eyeball:

AnatomyPlot3D[Entity["AnatomicalStructure", "RightEyeball"]]

Anatomy plot of eyeball

but want to cut it in half using ClipPlanes, for instance to eliminate the left half of the eyeball.

By what principled method do I know how to specify the plane? I tried the obvious

ClipPlanes -> {1,0,0,0}

and

{{0,0,0},{0,1,0},{0,0,1}}

without success.

$\endgroup$

1 Answer 1

4
$\begingroup$

Of course ClipPlanes works here. The problem is that you had mistakenly assumed the PlotRange:

eyeball = AnatomyPlot3D[Entity["AnatomicalStructure", "RightEyeball"]];

pr = PlotRange[eyeball]
   {{-43.6181, -17.298}, {-166.051, -138.829}, {1504.96, 1531.19}}

Thus,

Show[eyeball, 
     ClipPlanes -> InfinitePlane[Mean[Transpose[pr]], {1, -1} IdentityMatrix[3][[{2, 3}]]]]

eyeball cross-section

$\endgroup$
4
  • $\begingroup$ I didn't know how to get the PlotRange of the object. Simple! Thanks so much. (Accept) $\endgroup$ Commented Mar 23, 2019 at 7:32
  • $\begingroup$ Another way of finding the center of the eyeball is with EntityValue[eyeball, "EnclosingSphere"][[1]]. $\endgroup$
    – Roman
    Commented Mar 23, 2019 at 12:55
  • $\begingroup$ @J.M. Do you know of a place where this functionality of PlotRange is documented? $\endgroup$
    – Lukas Lang
    Commented Mar 23, 2019 at 13:04
  • $\begingroup$ @Lukas, I do not believe it is documented, but it's been around for a long while. $\endgroup$ Commented Mar 23, 2019 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.