Message Boards Message Boards

[✓]  Plot multiple lines on ParametricPlot3D?

GROUPS:

How does one plot multiple lines on ParametricPlot3D?

ParametricPlot3D[{{u, 0, 0}, {0, 0, p}}, {u, -1, 1}, {p, -1, 1}]

This snippet of code works and plots two lines, however when this is extended to three lines it fails.

ParametricPlot3D[{{u, 0, 0}, {0, s, 0}, {0, 0, p}}, {u, -1,1}, {p, -1, 1}, {s, -1, 1}]

This line fails. I would like to extended this to 5+ lines. Any help would be appreciated.

POSTED BY: Ninad Kothmire
Answer
12 days ago

Following the documentation - the function accepts only two parameters. When you tried to plot 3 lines you used 3 parameters and then the function crashes Here is a simple example with several lines and two parameters that you may try

ParametricPlot3D[{{u, 0, 0}, {1, 0, u}, {0, 0, p}, {1, 0, p}}, {u, -1,
1}, {p, -1, 1}]

BTW, you may use one or two parameters. The way that you use them determine if you define a line or a surface For example:

Several lines with a single parameter:

ParametricPlot3D[{{u, 0, 0}, {0, u, 0}, {0, 0, u}, {0, u, u}, {u, u, 
   u}}, {u, -1, 1}]

A surface with two parameters

ParametricPlot3D[{{(u + v)^2, v, u}}, {u, -1, 1}, {v, -1, 1}]

Several surfaces with two parameters

ParametricPlot3D[{{(u + v)^2, v, u}, {v, u, (u + v)^2}}, {u, -1, 
  1}, {v, -1, 1}]

best

yehuda

POSTED BY: Yehuda Ben-Shimol
Answer
12 days ago

A simple mistake on my part. Thank you very much for your help! Regards, Ninad

POSTED BY: Ninad Kothmire
Answer
10 days ago

Group Abstract Group Abstract