       Re: 3D-plot over a triangle

• To: mathgroup at smc.vnet.net
• Subject: [mg65032] Re: [mg65021] 3D-plot over a triangle
• From: "David Park" <djmp at earthlink.net>
• Date: Sun, 12 Mar 2006 23:57:49 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```Pluton,

Here is your plot. I used ParametricPlot3D to draw the surface.

Needs["Graphics`Colors`"]

f[s_, t_] := 4s t

ParametricPlot3D[{s, w - s w, -4 (-1 + s) s w}, {s, 0, 1}, {w, 0, 1},
PlotPoints -> 15,
BoxRatios -> {1, 1, 1/2},
AxesLabel -> {s, t, f},
PlotLabel -> SequenceForm[f[s, t], " on a Triangular Domain"],
ViewPoint -> {2.292, -1.483, 2.000},
Background -> Linen,
ImageSize -> 450];

Notice that I used a reparametrization of the function, and of t so that the
plot statement now uses fixed iterators. (Plot does not allow dependent
iterators such as are allowed in Integrate.) How did I get the
reparametrization? By using the IteratorSubstitution routine from the
DrawGraphics package. It replaces t by a new variable w that has a fixed
iteration range.

Needs["DrawGraphics`DrawingMaster`"]

IteratorSubstitution[{s, t, f[s, t]}, {t, 0, 1 - s}]
{{s, w - s w, -4 (-1 + s) s w}, {w, 0, 1}}

The first item above is the new parametrization of the surface in terms of s
and w, and the second item is the w iterator.

David Park

From: pluton [mailto:plutonesque at gmail.com]
To: mathgroup at smc.vnet.net

Hi there,

I want to plot the following function f = 4*s*t over a triangle defined
by s going from 0 to 1
and t from 0 to 1-s.

I tried Plot3D[4st, {s, 0, 1}, {t, 0, 1-s}]; but it does not work. Any
suggestion ?

Thank you,

Pluton

```

• Prev by Date: Re: how can I import my datas in excel to mathematica and then do calculations on them?
• Next by Date: Re: Extract values and multilpicities from list
• Previous by thread: Re: 3D-plot over a triangle
• Next by thread: Re: 3D-plot over a triangle