Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: Re: Draw a 3D surface

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100743] Re: [mg100694] Re: Draw a 3D surface
  • From: Syd Geraghty <sydgeraghty at me.com>
  • Date: Fri, 12 Jun 2009 05:46:01 -0400 (EDT)
  • References: <h0pjhq$538$1@smc.vnet.net> <200906111108.HAA21241@smc.vnet.net>

Hi,

This is a question inspired by Jens's use of RegionFunction below.

In the documentation for RegionFunction there is an example where 
RegionFunction isa pure function is called with a slot number:

SphericalPlot3D[1 + Sin[5 =CE=B8] Sin[5 =CF=86]/5, {=CE=B8, 0, Pi}, {=CF=86, 0, 2 Pi},
  Mesh -> None, RegionFunction -> (#6 > 0.95 &),
  PlotStyle -> FaceForm[Orange, Yellow]]

Here I was perplexed to know what #6 was (and still cannot figure it 
out).

How do I get to see what #6 is?

I then tried different values for the slot number:

{SphericalPlot3D[1 + Sin[5 =CE=B8] Sin[5 =CF=86]/5, {=CE=B8, 0, Pi}, {=CF=86, 0, 2 Pi},
   Mesh -> None, RegionFunction -> (#1 > 0.95 &),
   PlotStyle -> FaceForm[Orange, Yellow]],
  SphericalPlot3D[1 + Sin[5 =CE=B8] Sin[5 =CF=86]/5, {=CE=B8, 0, Pi}, {=CF=86, 0, 2 Pi},
   Mesh -> None, RegionFunction -> (#2 > 0.95 &),
   PlotStyle -> FaceForm[Orange, Yellow]],
  SphericalPlot3D[1 + Sin[5 =CE=B8] Sin[5 =CF=86]/5, {=CE=B8, 0, Pi}, {=CF=86, 0, 2 Pi},
   Mesh -> None, RegionFunction -> (#3 > 0.95 &),
   PlotStyle -> FaceForm[Orange, Yellow]],
  SphericalPlot3D[1 + Sin[5 =CE=B8] Sin[5 =CF=86]/5, {=CE=B8, 0, Pi}, {=CF=86, 0, 2 Pi},
   Mesh -> None, RegionFunction -> (#4 > 0.95 &),
   PlotStyle -> FaceForm[Orange, Yellow]],
  SphericalPlot3D[1 + Sin[5 =CE=B8] Sin[5 =CF=86]/5, {=CE=B8, 0, Pi}, {=CF=86, 0, 2 Pi},
   Mesh -> None, RegionFunction -> (#5 > 0.95 &),
   PlotStyle -> FaceForm[Orange, Yellow]],
  SphericalPlot3D[1 + Sin[5 =CE=B8] Sin[5 =CF=86]/5, {=CE=B8, 0, Pi}, {=CF=86, 0, 2 Pi},
   Mesh -> None, RegionFunction -> (#6 > 0.95 &),
   PlotStyle -> FaceForm[Orange, Yellow]]}

and the result was an interesting sequence of 3D objects (note that 
there are only 6 slots valid - #7 fails)

As a further enquiry I tried a Table version of the above:

Table[SphericalPlot3D[1 + Sin[5 =CE=B8] Sin[5 =CF=86]/5, {=CE=B8, 0, Pi}, {=CF=86, 0, 2 
Pi},
   Mesh -> None, RegionFunction -> (# i > 0.95 &),
   PlotStyle -> FaceForm[Orange, Yellow]], {i, 1, 6, 1}]

To my surprise the resulting 3D objects were different after #1.

I would appreciate any enlightenment here regarding slots and valid 
Table increments for slots.

Thanks in advance .... Syd


Syd Geraghty B.Sc, M.Sc.

sydgeraghty at mac.com

Mathematica 7.0.1 for Mac OS X x86 (64 - bit) (18th February 2009)
MacOS X V 10.5.6
MacBook Pro 2.33 GHz Intel Core 2 Duo  2GB RAM



On Jun 11, 2009, at 4:08 AM, Jens-Peer Kuska wrote:

> Hi,
>
> g[y_] := y^2 - 2
>
> Plot3D[Exp[-x^2 - y^2], {x, -3, 3}, {y, -3, 3}, PlotRange -> All,
>  RegionFunction -> Function[{x, y, z}, x < g[y]]]
>
>
> ?
>
> Regards
>   Jens
>
> jl_03824 at yahoo.com wrote:
>> I intend to draw a 3D surface, which is defined in a tricky way. 
>> Given
>> function f(x, y), the values of f are known but the range is
>> determined by a function of y, g(y). I need to plot x as a function 
>> of
>> y and f within the range determined by g(y). Can anybody help?
>> Appreciate!
>>
>> Jun Lin
>>
>



  • Prev by Date: Re: Dependent dynamic controls
  • Next by Date: Re: Correction to "Fundamental Theorem of Calculus and Mathematica"
  • Previous by thread: Re: Draw a 3D surface
  • Next by thread: Re: Draw a 3D surface