Re: Functions, plotting, and other questions
- To: mathgroup at smc.vnet.net
- Subject: [mg19966] Re: Functions, plotting, and other questions
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 23 Sep 1999 23:26:17 -0400
- Organization: Universitaet Leipzig
- References: <7sa3vq$mb3@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Michael,
> I'm running Mathematica 3.0.x on Winduh NT, and have a couple of general
> questions concerning functions, 3D plots, and logical statements.
>
> First, is there a way to tell Mathematica that I want to have a variable
> treated as being strictly real (or positive real, or imaginary, etc)?
> Specifically, I'm thinking that being able to do so might result in
> 'better' Simplify results, for instance.
No, in Mathematica 4.0 you can give Simplify[], FullSimplify[]
the additional assumptions, in Mathematica 3.x not.
>
> Also, I noticed that there is an If statement, but no Elseif. I guess
> that the Which statement essentially replicates If ... Elseif statements?
You can nest the If[] statements
If[someTest1,
makeSomething[],
(* Else *)
If[someTest2,
makeSomething1[]
]
]
>
> My final (and more pressing) question concerns 3d graphing of functions in
> Mathematica. My problem arises from the fact that I want to do a *surface*
> plot of the following parametric equations:
SNIP SNAPP SNIP
> (Essentially, I want to do a surface parametric plot, with varying
> simulation times depending on what g is ... kind of like double integrals,
> with on limit (x) from 0 to 1, and another limit (y) from 0 to x.)
>
> Is there a way to do this? I've been struggling with this for a while,
> and don't see anyway to do this.
I don't know if I understand your explanation right. You want a
ParametricPlot3D[]
with a non rectanglular area in the parameter space ?
a) You can do it by your self and creating the Polygon[] primitives
b) You can use a construct like
ParametricPlot3D[
Catch[
If[x > y, Throw[{x, x, x^2}], {x, y, x*y}]],
{x, 0, 1}, {y, 0, 1},
Compiled -> False,
ViewPoint -> {-1.604, -2.208, 2.000}
]
it will draw the function z= x*y for x in [0,1] and y in [0,x]
Hope that helps
Jens