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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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