Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.
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).

share|improve this question
    
Also look up RegionPlot3D –  rm -rf 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
add comment

1 Answer

Try

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

enter image description here

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]

enter image description here

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]

enter image description here

share|improve this answer
    
Its giving error as : Wolfram|Alpha doesn't know how to interpret your input –  Adi Sep 20 '12 at 18:29
3  
@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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.