MathGroup Archive 2000

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

Search the Archive

Re: 3D graphics

  • To: mathgroup at smc.vnet.net
  • Subject: [mg22720] Re: 3D graphics
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 24 Mar 2000 03:27:02 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <8b9n2b$98i@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

since your function jump from 0 to 1 you can simply use a
ContourPlot3D[] with
contourlevel 1/2

Needs["ContourPlot3D`"]

fun[x_?NumericQ, y_?NumericQ, z_?NumericQ] := 
  If[N[x^2 + y^2 + z^2] < 1., 0., 1.]


ContourPlot3D[fun[x, y, z],
  {x, -1.1, 1.1}, {y, -1.1, 1.1}, {z, -1.1, 1.1}, Contours -> {0.5}]

Regards
  Jens

Bernhard Adams wrote:
> 
> Hi everybody,
> 
> I would like to plot a body in 3D whose volume is defined by a function
> f[x,y,z] which returns 1 if (x,y,z) is inside the body and 0 if outside.
> How to plot this?
> 
> Thanx, Bernhard Adams


  • Prev by Date: Re: Calling the Mathematica Kernel from a Java Program
  • Next by Date: Re: Mathematica 4.0 electronic book
  • Previous by thread: Re: 3D graphics
  • Next by thread: Re: 3D graphics