# Using Plot3D with one variable dependent on the other

Plot3D[f,{x,xmin,xmax},{y,ymin,ymax}]


In the above , is there any way to give range of y in terms of x. I want to give like {x, 0, 9000} and {y, x, 9020-x} and f = 9020/(9020 + y).

-
Also look up RegionPlot3D – R. M. Sep 20 '12 at 17:58
Yes f is a function of y and y is dependent on x . – Adi Sep 20 '12 at 18:31

Try

Plot3D[9020/(9020 + y), {x, 0, 9000}, {y, x, 9020 - x}]


to create the data points explicitly

res = Table[{val, #, 9020/(9020 + #)} & /@ (If[val < 9020 - val,
Range[val, 9020 - val, 100],
Reverse@Range[9020 - val, val, 100]]), {val, 0, 9000, 100}];


You can see the data and the data sampled by Plot3D are the same.

p2 = ListPointPlot3D[Flatten[res, 1], PlotStyle -> Red]


Hint for symmetry!

xval = 9000/2;
yval = 9020 - xval;
pt = {4500, yval, 9020/(9020 + yval)} // N; Show[
Graphics3D[{{Red, Sphere[pt, 3]}, {Red,Sphere[N@First@res[[46]], 3]},
{Blue, Tube[{{xval, xval, 9020/(9020 + xval)}, {xval, 9020 - xval,
9020/(9020 + (9020 - xval))}}, 1]}}], p1, p2]


-
Its giving error as : Wolfram|Alpha doesn't know how to interpret your input – Adi Sep 20 '12 at 18:29
@Adi Wolfram|Alpha questions are specifically off-topic here. However, if you have access to Mathematica, then the above code should work fine for you. – rcollyer Sep 20 '12 at 18:35
Is there any way to figure the point of symmetry in the above plot . – Adi Sep 20 '12 at 19:43
@Adi see update! – PlatoManiac Sep 20 '12 at 23:16