2

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

1 Answers1

3

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

m_goldberg
  • 107,779
  • 16
  • 103
  • 257