Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: ParametricLinePlot3D
Replies: 2   Last Post: Nov 11, 2013 12:01 AM

 Messages: [ Previous | Next ]
 Bob Hanlon Posts: 906 Registered: 10/29/11
Re: ParametricLinePlot3D
Posted: Nov 7, 2013 12:21 AM

Your example works for an initial evaluation since v is undefined when
Ringsweep1 is defined. However, for subsequent evaluations the last value
of v carries over and Ringsweep1 is defined with that value of v. Hence
subsequent changes in v are not reflected in Ringsweep1. Just clear v prior
to defining Ringsweep1.

Clear[v];

R = 2.; a = 1.;

Ringsweep1[u_] = {
a Cos[R Sin[u]/a] Cos[v] - Sin[v]*a Sin[R Sin[u]/a],
a Cos[R Sin[u]/a] Sin[v] + Cos[v]*a Sin[R Sin[u]/a],
R Cos[u]};

v = Pi/3;

g1 = ParametricPlot3D[
Tooltip[Ringsweep1[u], StringForm["v = ``", v]],
{u, 0, 2 Pi},
PlotStyle -> {Red, Thick}];

v = 2 Pi/3;

g2 = ParametricPlot3D[
Tooltip[Ringsweep1[u], StringForm["v = ``", v]],
{u, 0, 2 Pi},
PlotStyle -> {Blue, Thick}];

v = 4 Pi/3;

g3 = ParametricPlot3D[
Tooltip[Ringsweep1[u], StringForm["v = ``", v]],
{u, 0, 2 Pi},
PlotStyle -> {Green, Thick}];

Show[{g1, g2, g3}, PlotRange -> All]

This can be shortened to

ParametricPlot3D[
Evaluate[Table[
Tooltip[Ringsweep1[u], StringForm["v = ``", v]],
{v, {Pi/3, 2 Pi/3, 4 Pi/3}}]],
{u, 0, 2 Pi},
PlotStyle -> ({Thick, #} & /@ {Red, Blue, Green})]

Bob Hanlon

On Wed, Nov 6, 2013 at 12:35 AM, Narasimham <mathma18@gmail.com> wrote:

> Or least, why should the v new parameter values be ignored in subsequent
> settings when the function is solely dependent on u only?
>
> R = 2.; a = 1.;
> Ringsweep1[u_] = {a Cos[R Sin[u]/a] Cos[v] - Sin[v]*a Sin[R Sin[u]/a],
> a Cos[R Sin[u]/a] Sin[v] + Cos[v]*a Sin[R Sin[u]/a], R Cos[u]};
> v = Pi/3;
> g1 = ParametricPlot3D[Ringsweep1[u], {u, 0, 2 Pi},
> PlotStyle -> {Red, Thick}]
> v = 2 Pi/3;
> g2 = ParametricPlot3D[Ringsweep1[u], {u, 0, 2 Pi},
> PlotStyle -> {Red, Thick}]
> v = 4 Pi/3;
> g3 = ParametricPlot3D[Ringsweep1[u], {u, 0, 2 Pi},
> PlotStyle -> {Red, Thick}]
> Show[{g1, g2, g3}, PlotRange -> All]
>
> Under such circumstances, why Manipulating by varying v is not possible
> inside its Box?
>
> Regards
> Narasimham
>
>

Date Subject Author
11/7/13 Bob Hanlon
11/11/13 Narasimham