Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

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: [mg88194] Re: Cropping a surface to a sphere
  • From: Helen Read <hpr at together.net>
  • Date: Mon, 28 Apr 2008 04:37:24 -0400 (EDT)
  • References: <fv1ff5$es6$1@smc.vnet.net>
  • Reply-to: HPR <read at math.uvm.edu>

Szabolcs Horv=E1t 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? 

Have you tried RegionFunction?

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]]


--
Helen Read
University of Vermont


  • Prev by Date: how to use ones(A)?
  • Next by Date: Re: Change integral variables
  • Previous by thread: Re: Cropping a surface to a sphere
  • Next by thread: Re: Cropping a surface to a sphere