Drawing a ParametricPlot3D in Mathematica with n & t

In summary, the conversation discusses options for plotting a function that depends on two variables, n and t. The function can be plotted for a range of values of n and a single value of t, or for a range of values of both n and t. The suggested commands to plot the function for a range of values of n are Plot3D[f[n, t], {t, 0, 1}, {n, a, b}] and Plot[Evaluate[f[Table[n,{n,-5,5}],t]],{t,0,1}]. The desired outcome is to plot the function for a specific number of points in the interval [a,b].
  • #1
andlook
33
0
Hi
I have a function that relies on n and t. I am presently drawing it with "ParametricPlot3D." I am drawing it for all t in [0,1]. Now I can either draw this for all values of n in a defined interval, say [a,b], just as I define it to draw all t. Or I can draw one value of n by using the "Manipulate[ ParametricPlot3D[" and changing the value of n in [a,b].

My problem is I want to draw the function for a large number of values of n in [a,b] in the same diagram. t always runs through [0,1].

I can't find a command for this, is there one? I'm sure that this can be done some how... Any thoughts?

Thanks
 
Physics news on Phys.org
  • #2
What kind of a function is it? If it is a function
[tex]f: \mathbb{R}^2 \to \mathbb{R}, (n, t) \mapsto f(n, t)[/tex]
then something like
Plot3D[f[n, t], {t, 0, 1}, {n, a, b}]
will do the trick, won't it?
 
  • #3
Yeah that is the general function I am trying to plot.

But Plot3D[f[n, t], {t, 0, 1}, {n, a, b}] plots all the values of n from a through to b. I want only draw the function at, for example, a, a+1, a+2, a+3, ... b. but nothing in the interval (a+i,a+i+1).

So a command that says draw m points of the function for intervals of size (b-a)/m points in [a,b].

So if the function was f(n,t) = t.sin(n), t is [0,1] and n in [0,Pi] I want mathematica to plot, 0 , Pi/4, Pi/2, 3.Pi/4.

something like Plot3D[f[n, t], {t, 0, 1}, {n, ? }]
 
  • #4
How about you plot them separatel:

Code:
Plot[Table[f[n, t], {n, a, b, (b - a)/m}], {t, 0, 1}]
Show[Table[Plot[f[n, t], {t, 0, 1}], {n, a, b, (b - a)/m}]]]

(I think the first one should work, the second one definitely does) or, in older versions of Mathematica,
Code:
Plot[Table[f[n, t], {n, a, b, (b - a)/m}] // Evaluate, {t, 0, 1}]
Show[Table[Plot[f[n, t], {t, 0, 1}], {n, a, b, (b - a)/m}], DisplayFunction -> None], DisplayFunction -> $DisplayFunction]
 
  • #5
As long as your function is listable you should be able to simply do:

Plot[Evaluate[f[Table[n,{n,-5,5}],t]],{t,0,1}]
 

1. What is a ParametricPlot3D in Mathematica?

A ParametricPlot3D in Mathematica is a three-dimensional graph that is created using parametric equations. These equations represent the x, y, and z coordinates of points on a surface.

2. What is the significance of n & t in a ParametricPlot3D?

In a ParametricPlot3D, n and t are variables that represent the parameters in the parametric equations. These parameters can be manipulated to create different shapes and surfaces in the graph.

3. How do I specify the range for n & t in a ParametricPlot3D?

To specify the range for n and t in a ParametricPlot3D, you can use the PlotRange option. For example, PlotRange -> {{-10, 10}, {-10, 10}, {-10, 10}} will set the range for all three variables to be from -10 to 10.

4. Can I add labels and titles to a ParametricPlot3D?

Yes, you can add labels and titles to a ParametricPlot3D using the AxesLabel and PlotLabel options. AxesLabel allows you to label the x, y, and z axes, while PlotLabel adds a title to the graph.

5. How can I customize the appearance of a ParametricPlot3D?

There are several options you can use to customize the appearance of a ParametricPlot3D, such as ColorFunction, Mesh, and PlotStyle. These options allow you to change the colors, add mesh lines, and change the style of the graph, respectively.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
245
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
209
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
972
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
997
Back
Top