1
$\begingroup$

I have a vector (in physic) designated as F1=250cos(60)i+250cos(60)j+250cos(45)k, and i would like to see it in a 3D graphic with the axis centered at the origin, after what i would include other vector from there. But i have been unable to graph it. I have tried this:

    Plot3D[{250*cos[60], 250*cos[60], -250*cos[45]}, {x, -20, 20}]

    VectorPlot3D[{250*cos[60]*x, 250*cos[60]*y, -250*cos[45]*z}, {x, -20, 
                20}, {y, -20, 20}, {z, -20, 20}]
    Plot3D[{250*cos[60]*x, 250*cos[60]*y, -250*cos[45]*z}, {x, -20, 
           20}, {y, -20, 20}]

I know why it doesn`t work, (i,j,k are not variabe but a direction!) but i still dont see how to get the vector to show up?

Any suggestion.

(first time user, would appreciate as much info as possible)

Thanks in advance

Seb.

Vector in Space

$\endgroup$

closed as off-topic by Artes, bbgodfrey, Dr. belisarius, Yves Klett, m_goldberg Feb 27 '15 at 20:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Artes, bbgodfrey, Dr. belisarius, Yves Klett
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ See e.g. Finding unit tangent, normal, and binormal vectors for a given r(t) $\endgroup$ – Artes Feb 27 '15 at 16:37
  • $\begingroup$ Mathematica functions (Cos in this case) always start with a capital letter. Go biometric functions take radians as argument. Multiply an angle value in degrees with the built-in constant Degree to convert that value to radians. Furthermore, in your last line of code, z is undefined. $\endgroup$ – Sjoerd C. de Vries Feb 27 '15 at 16:40
  • $\begingroup$ Welcome to Mathematica.SE! I suggest that: 1) You take the introductory Tour now! 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. $\endgroup$ – bbgodfrey Feb 27 '15 at 16:42
  • $\begingroup$ HAAHAA, The capital letter is a good beginning, thks @SjoerdC.deVries, but what is the biometric function ? $\endgroup$ – Sebastien Comtois Feb 27 '15 at 16:46
  • $\begingroup$ I<m sorry, like a said before i<m new to this... $\endgroup$ – Sebastien Comtois Feb 27 '15 at 16:46
1
$\begingroup$

You really do need to read a lot of documentation, but perhaps this wil get you started. It will at least show you some the things you need to look up in the documentation.

First, Mathematica works in radians, not degrees, so conversion to radians must be done. The degree sign (°) is the conversion factor (π/180). It can be typed by Esc+deg+Esc

p = {250 Cos[60 °], 250 Cos[60 °], -250 Cos[45 °]}
 {125, 125, -125 Sqrt[2]}

Next Mathematica's 3D graphics is based on classical geometric concepts such as points and lines, so p is a point not a vector. To get a vector drawn the way you want, it will be necessary to draw an arrow that goes from the origin to p.

Graphics3D[{Arrow[{{0, 0, 0}, p}]},
 PlotRange -> {{-250, 250}, {-250, 250}, {-250, 250}},
 SphericalRegion -> True,
 RotationAction -> "Clip",
 AxesEdge -> {{-1, -1}, {-1, -1}, {-1, -1}},
 Axes -> True]

arrow

$\endgroup$

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