Discussion:
ParametricPlot3D Options
(too old to reply)
David Park
2003-08-25 08:12:00 UTC
Permalink
Kenneth,

This is a fairly frequent question and an awkward usage in Mathematica.
First we plot a normal uncolored curve.

Needs["Graphics`Colors`"]

curve[t_] := {Cos[t], Sin[t], t}

ParametricPlot3D[curve[t] // Evaluate, {t, 0, 5},
Axes -> False];

So how do we sneak in a color and line thickness? One puts the plotting
directives as a fourth element in the parametrization! So start over and
define your curve as...

curve2[directives_][t_] := {Cos[t], Sin[t], t, directives}

ParametricPlot3D[
curve2[{Red, AbsoluteThickness[2]}][t] // Evaluate, {t, 0, 5},
Axes -> False];

The trouble with this is that if you are doing analytic or numerical work on
the curve you need two parametrizations. Using the DrawGraphics package from
my web site below, you can restore a more natural usage where you give the
plotting directives first and then draw the curve from its normal
parametrization. You could even add in other graphical elements such as
surfaces drawn with Plot3D and other plotting directives simply by adding
them to the list of objects drawn.

Needs["DrawGraphics`DrawingMaster`"]

Draw3DItems[
{Red, AbsoluteThickness[2],
ParametricDraw3D[curve[t] // Evaluate, {t, 0, 5}]}
]

David Park
***@earthlink.net
http://home.earthlink.net/~djmp/



From: Flurchick, Kenneth M [mailto:***@MAIL.ECU.EDU]

GentleBeings
I have a ParametricPlot3D which is a line in space
I want to change the color and thickness of the line
in Plot this is PlotStyle
but Prolog and Shaw do not seem to work
Hints???
kenf
Bob Hanlon
2003-08-25 08:13:02 UTC
Permalink
The documentation is not very clear; however, there is a fourth parameter {fx,
fy, fz, s} that handles this.

ParametricPlot3D[
{Cos[5t],Sin[3t],Sin[t],
{Hue[1], AbsoluteThickness[2]}},
{t,0,2 Pi}];


Bob Hanlon

In article <bia06r$cqc$***@smc.vnet.net>, "Flurchick, Kenneth M"
<***@MAIL.ECU.EDU> wrote:

<< I have a ParametricPlot3D which is a line in space
I want to change the color and thickness of the line
in Plot this is PlotStyle
but Prolog and Shaw do not seem to work
Hints???
Gary L. Gray
2003-08-25 08:15:10 UTC
Permalink
Post by David Park
I have a ParametricPlot3D which is a line in space
I want to change the color and thickness of the line
in Plot this is PlotStyle
but Prolog and Shaw do not seem to work
Hints???
This should do it:

ParametricPlot3D[{Cos[t], Sin[t],
t, {AbsoluteThickness[2], RGBColor[1, 0, 0]}}, {t, 0, 2 Pi}]

Best regards,
--
Gary L. Gray
Associate Professor
Engineering Science & Mechanics
Penn State University
(814) 863-1778
http://www.esm.psu.edu/Faculty/Gray/

If possible, please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
Selwyn Hollis
2003-08-25 08:16:15 UTC
Permalink
Ahh.. my own favorite, long-standing complaint: No PlotStyle option for
ParametricPlot3D. Why this DESIGN FLAW still persists after all these
years/versions is beyond me.

Anyway, here's the arcane way to work around it:

ParametricPlot3D[{Sin[t],Cost[t],t/10, {Hue[0],Thickness[.01]}},
{t,0,4Pi}]

-----
Selwyn Hollis
http://www.math.armstrong.edu/faculty/hollis
Post by David Park
GentleBeings
I have a ParametricPlot3D which is a line in space
I want to change the color and thickness of the line
in Plot this is PlotStyle
but Prolog and Shaw do not seem to work
Hints???
kenf
Steve Luttrell
2003-08-26 11:22:43 UTC
Permalink
My way of "rationalising" this way of using ParametricPlot3D is to imagine
that the fourth component represents an internal coordinate, so you have a
2-dimensional surface embedded in a 4-dimensional space rather than a
3-dimensional space. One way to represent this internal coordinate is to use
various graphics tricks (e.g. colour, etc). Turning this back to front, you
might as well place any parameter-dependent (or parameter-independent)
graphics in the fourth component.

However, I am perplexed that PlotStyle is not available (for
parameter-independent graphics) in addition to the above 4-dimensional
trick.

--
Steve Luttrell
West Malvern, UK
Post by Selwyn Hollis
Ahh.. my own favorite, long-standing complaint: No PlotStyle option for
ParametricPlot3D. Why this DESIGN FLAW still persists after all these
years/versions is beyond me.
ParametricPlot3D[{Sin[t],Cost[t],t/10, {Hue[0],Thickness[.01]}},
{t,0,4Pi}]
-----
Selwyn Hollis
http://www.math.armstrong.edu/faculty/hollis
Post by David Park
GentleBeings
I have a ParametricPlot3D which is a line in space
I want to change the color and thickness of the line
in Plot this is PlotStyle
but Prolog and Shaw do not seem to work
Hints???
kenf
Loading...