Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Here is the curve below. (written as a position vector)

r = {Cos[7 Pi*t], Cos[6.2*Pi*t], 2.5*t}
ParametricPlot3D[r, {t, 0, 2}]

I want to know how I can mark specific points on this curve, for example when t = 0 and t=1.

I would also like to label those points.

share|improve this question
    
You should start with checking related posts, see e.g. How to get intersection values from a parametric graph? Three dimensional problem is not especially more difficult, nevertheless it depends on what kind of visualization you expect, see e.g. Finding unit tangent, normal, and binormal vectors for a given r(t) for vectors instead of points. –  Artes Jun 16 at 14:56

3 Answers 3

up vote 2 down vote accepted

You can also use MeshFunctions but you need to "cheat" to include the t=0 point, e.g.

This is an edited post based on the correct comments by Oska and gpap. In my original answer I used the equivalent of Function[{x,y,z,t},z] though my intention was Function[{x,y,z,t},t]. I have corrected and now labelled the points.

r[t_] := {Cos[7 Pi*t], Cos[6.2*Pi*t], 2.5*t};
Show[ParametricPlot3D[r[t], {t, -0.01, 2}, MeshFunctions -> (#4 &), 
  Mesh -> {{0., 1}}, MeshStyle -> {PointSize[0.03], Red}], 
 Graphics3D[
  MapThread[
   Text[Framed[#1], r[#2], {1, -1}] &, {{"Position 1", 
     "Position 2"}, {0, 1}}]]]

enter image description here

share|improve this answer
    
is there a way i can label those points? –  Lebouski Jun 17 at 13:41
    
Shouldn't be the end point (t = 2) placed at the end of the curve? The t=1 point is wrong as well I'm afraid. –  Öskå Jun 17 at 14:14
    
@Oska the OP specifically mentions t=0 and t=1 hence my mesh points...I have only displayed and not labeled so will revise when I get chance –  ubpdqn Jun 17 at 20:07
    
What I meant is that.., since the function is plotted from 0 to 2, for t=2 the point should be in the end right? (at the top in that case) –  Öskå Jun 17 at 20:16
    
@Öskå is right. Your mesh function is now labelling the curve at the point where its z value is 1 and not at the point where the parameter t is 1. In ParametricPlot3D the option MeshFunctions takes four arguments, the x, y, z coordinates and the parameter along the curve. You can either replace MeshFunctions -> (#3/2.5 &) or MeshFunctions -> (#4 &) to get the right result. Then you'll have (at least) an upvote :) –  gpap Jun 18 at 9:22

You can use Graphics3D and Show:

r[t_] := {Cos[7 Pi*t], Cos[6.2*Pi*t], 2.5*t} ;
Show[ParametricPlot3D[r[t], {t, 0, 2}],
 Graphics3D[{
   PointSize@0.05, Point[r[#] & /@ {0, 1}],
   Text[#, #2] & @@@ 
    Thread[{{"Start", "Middle"}, {0, 0, .2} + # & /@ (r@# & /@ {0, 1})}]}]]

Mathematica graphics

share|improve this answer

Another way to use Mesh (credit: this answer by @BobHanlon )

r = {Cos[7 Pi*t], Cos[6.2*Pi*t], 2.5*t};

ParametricPlot3D[r, {t, 0, 2},  Mesh -> {{#, {PointSize[0], 
  Text[Framed@Style[Round@#, Red, Bold, 16], r /. t -> #]}} & /@ {0.00001, 1, 1.99999}}]

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.