Message Boards Message Boards

GROUPS:

[✓]  Plot multiple lines on ParametricPlot3D?

Posted 10 months ago
669 Views
|
2 Replies
|
3 Total Likes
|

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.

2 Replies

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 10 months ago

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

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract