RE: 3D graph with assumptions
- To: mathgroup at smc.vnet.net
- Subject: [mg50836] RE: [mg50814] 3D graph with assumptions
- From: "David Park" <djmp at earthlink.net>
- Date: Thu, 23 Sep 2004 05:27:17 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
The DrawGraphics package at my web site below has the command IteratorSubstitution that allows one to rewrite a function in terms of variables that do have a fixed iteration limit. Here is an example. Needs["DrawGraphics`DrawingMaster`"] f[x_, y_] := Cos[x y] IteratorSubstitution[{y, f[x, y]}, {y, 0, Sqrt[x]}] {{w*Sqrt[x], Cos[w*x^(3/2)]}, {w, 0, 1}} IteratorSubstitution rewrote y and f[x,y] in terms of the new variables x and w. w has a fixed iterator range {w, 0, 1}. Now we can make a plot and the easiest method is to use ParametricPlot3D since we have expressions for x, y and f[x,y]. ParametricPlot3D[{x, w*Sqrt[x], Cos[w*x^(3/2)]}, {x, 0, 1}, {w, 0, 1}, PlotRange -> {0.5, 1}, ViewPoint -> {1.722, 1.566, 2.456}, ImageSize -> 450]; David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Mukhtar [mailto:mbekkali at gmail.com] To: mathgroup at smc.vnet.net Suppose I have f(x,y) that I need to Plot in 3D, however, the range of x is (0,1) while the range of y is (0,g(x)), where g(x) is some explicit function of x, say x^1/2. Is there a way to do it since specifying it directly the way I outlined above in Plot3D gives me the error message that "Plot3D :: plln: Limiting value g(x) in {y,0,g(x)} is not a machine-size real number". Perhaps I can do this indirectly by plotting two surfaces and then consider the relevant part of surface f(x,y), however, it would look ugly. Thanks.