1
$\begingroup$

I want to plot a 3D graph ('G' v/s 'P' v/s 'T') for folllowing value as 'T' in terms of r

T = 1/(4 Pi r) + 2 P r - 1/(4 Pi r^3),

'G' in terms of r

G = r/4 - (2 Pi P r^3))/3 + 3/(4 r).

and P in terms of r

P = T/r -1/(2 Pi r^2) + 2/(Pi r^4)

I want to plot for following range: {{G, 0.2, 1.8}, {P, 0, 0.004}, {T, 0, 0.06}}

$\endgroup$
  • $\begingroup$ you can use P=T/r -1/(2 pi r^2) +2/(pi r^4) $\endgroup$ – Ahmed 1 Jan 19 at 20:03
  • 1
    $\begingroup$ Please do not use the graphs-and-networks tag unless the question concerns graph-theoretical graphs. You can click a tag to read what it's for. Also: format your posts. There's formatting help on the right of the edit box. Your last post was formatted by a volunteer. You can use it as an example. $\endgroup$ – Szabolcs Jan 19 at 20:10
  • 1
    $\begingroup$ Finally: you still didn't show what you have tried. Did you look at any tutorials on plotting with Mathematica? $\endgroup$ – Szabolcs Jan 19 at 20:10
  • $\begingroup$ "ok, yes i am continously trying to plot" If you show what exactly you did, what your attempts so far were, then people can guide you to a solution. $\endgroup$ – Szabolcs Jan 19 at 21:09
1
$\begingroup$

Here is method for examining the relationship between P, T and G as functions of r. First we find the functions.

Clear[P, T, G]
{P[r_], T[r_], G[r_]} =
  Solve[
    {P == T/r - 1/(2 π r^2) + 2/(π r^4),
     T == 1/(4 π r) + 2 P r - 1/(4 π r^3),
     G == r/4 - (2 Pi P r^3)/3 + 3/(4 r)},
   {P, T, G}][[1, All, 2]]

soon

Then we make an interactive plot of the functions in the space {{P, 0, 0.004}, {T, 0, 0.06}}.

box =
  Graphics3D[
   {FaceForm[], EdgeForm[], Cuboid @@ Transpose[{{0, 0.004}, {0, 0.06}, {0.2, 1.8}}]},
   Boxed -> False];
Manipulate[
  Dynamic @
    Show[
      ParametricPlot3D[{P[r], T[r], G[r]}, {r, rmin, rmax},
        AxesLabel -> (Style[#, 14, Bold] & /@ {"P", "T", "G"}),
        BoxRatios -> 1],
      box,
      PlotRange -> All],
  {rmin, .5, 15, .5, Appearance -> "Labeled"},
  {rmax, 10, 50, 1, Appearance -> "Labeled"}]

demo

Note: Although the above code give us reasonable control over the range or P and T, the range of G cannot be fixed because it is determined by the settings for rain and max.

$\endgroup$
0
$\begingroup$
ClearAll[T, P, G, t, p, g]

t = 1/(4 Pi r) + 2 P r - 1/(4 Pi r^3);
p = T/r - 1/(2 Pi r^2) + 2/(Pi r^4);
g = r/4 - (2 Pi P r^3)/3 + 3/(4 r);

func = {G, p, T} /. Solve[Eliminate[{T == t, P == p, G == g}, P], {G, T}, Reals][[1]];

{(23 + r^2)/(12 r),
2/(π r^4) - 1/(2 π r^2) + (-15 + 3 r^2)/( 4 π r^4),
(-15 + 3 r^2)/(4 π r^3)}

Quiet @ ParametricPlot3D[func, {r, 0, 10 Pi}, 
  PlotRange -> {{0.2, 1.8}, {0, 0.004}, {0, 0.06}}, BoxRatios -> 1]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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