David Park
2003-08-25 08:12:00 UTC
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
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