[Date Index]
[Thread Index]
[Author Index]
RE: Dashed space curve
*To*: mathgroup at smc.vnet.net
*Subject*: [mg47183] RE: [mg47158] Dashed space curve
*From*: "David Park" <djmp at earthlink.net>
*Date*: Mon, 29 Mar 2004 04:22:30 -0500 (EST)
*Sender*: owner-wri-mathgroup at wolfram.com
Michael,
This is one of the nonobvious and, I think, inconvenient graphical
constructions in Mathematica.
If you check the Help for ParametricPlot3D you will see that the third usage
is to use a color directive as the 4th argument of the parametrization.
Actually, you can also put any list of Graphics directives. So, by way of
example, let's make a blue dashed curved. We have to Join the directives to
the curve parametrization.
Needs["Graphics`Colors`"]
curve[t_] := {3Cos[t], 3Sin[t], t}
ParametricPlot3D[
Join[curve[t], {{Blue, AbsoluteDashing[{3}]}}] // Evaluate, {t, 0,
2\[Pi]}];
We could have put the directives in the definition of curve[t], but that is
a nuisance if you want to do analytical work with curve[t].
I would prefer to do this with the DrawGraphics package at my web site. Then
it is also easy to add a second curve with different directives. We will
draw the first curve in dashed blue and the second curve in solid black. I
also made the surrounding box gray so the curves would better standout.
Needs["DrawGraphics`DrawingMaster`"]
curve2[t_] := t{0, 0, 1}
Draw3DItems[
{Blue, AbsoluteDashing[{3}],
ParametricDraw3D[curve[t] // Evaluate, {t, 0, 2\[Pi]}],
Black,
ParametricDraw3D[curve2[t], {t, 0, 2\[Pi]}]},
Background -> Linen,
BoxStyle -> Gray];
There is another common related question that is often submitted to
MathSource. How to get rid of the "mesh" in 3D surfaces drawn with
ParametricPlot3D? Mesh is not an option for Graphics3D. The proper option is
EdgeForm[], which removes the drawing of the polygon edges. This could again
be put as a 4th parameter in the parametrization of the surface, or if using
DrawGraphics you just put it before drawing the surface. Often I like to
draw the surfaces colored and use an EdgeForm that specifies a color that is
a slightly darker shade of the surface color. That subdues the "mesh" and
usually looks better than no "mesh".
David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/
From: Michael [mailto:mika_lists at yahoo.com]
To: mathgroup at smc.vnet.net
Hello,
I would like to draw a dashed space curve (using ParametricPlot3D).
How can I achieve that?
Regards,
Michael
Prev by Date:
**Re: Re: Length of actual parameters in a function call.**
Next by Date:
**Re: usage / "More..."**
Previous by thread:
**Re: Dashed space curve**
Next by thread:
**RE: Dashed space curve**
| |