MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Cropping a surface to a sphere

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88220] Re: [mg88172] Cropping a surface to a sphere
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Mon, 28 Apr 2008 04:42:07 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

ContourPlot3D[-x^4*y^2 + x^2*y^4 + x^4*z^2 -
   y^4*z^2 - x^2*z^4 + y^2*z^4 == 1,
 {x, -3, 3}, {y, -3, 3}, {z, -3, 3}, Mesh -> False,
 RegionFunction -> Function[{x, y, z}, x^2 + y^2 + z^2 < 9]]


Bob Hanlon

---- "Szabolcs Horv=C3=A1t" <szhorvat at gmail.com> wrote:
>
> Is there a simple way to crop a surface to a sphere?
>
> For example, consider the surface
>
> ContourPlot3D[
>    -x^4*y^2 + x^2*y^4 + x^4*z^2 - y^4*z^2 -
>     x^2*z^4 + y^2*z^4 == 1,
>    {x, -3, 3}, {y, -3, 3}, {z, -3, 3},
>    Mesh -> False]
>
> It is cropped to a cube (the bounding box) by default.  I would like to=

> crop it to a sphere of radius 3 (or some other region).
>
> Is there an easy way to do this?  I guess that if there really isn't a
> better way, I could write a polygon cropping function, convert the
> graphic to Normal[] form, and crop/remove each polygon one by one, but I=

> was hoping for a simpler solution ... (built-in function or existing
> package).
>



  • Prev by Date: Re: Coordinate readout from Graphics3D?
  • Next by Date: Re: Cropping a surface to a sphere
  • Previous by thread: Re: Cropping a surface to a sphere
  • Next by thread: Re: Cropping a surface to a sphere