Vector3D simple question
-
Why does Vector3D have only 3 coordinate properties X,Y,Z? Does every Vector3D start in point (0,0,0)?
If you are living in 3D then yes every vector should have 3 coordinates. This is true also for 2D and 2D only have 2D vector. This implies to all dimensions. If you studding theory of relativity then you need 4D vectors where time is also one of the components. Let’s make life simple, and only worry from 1D to 3D which we are dealing with WPF. LOL :laugh:
-
Why does Vector3D have only 3 coordinate properties X,Y,Z? Does every Vector3D start in point (0,0,0)?
The short answer is if you want to say so. (Normally, I would not say that vectors "start" anywhere per se.) The long answer is that you are brushing up against one of the hardest things about programming, "Data doesn't mean anything until you say it does." Take for example, the Point and Size classes. Both have 2 integer (or double or float or whatever) components. Both could be used to store the exact same data, but the different structures exist because that is how we assign meaning to the data. So, the implicit assumption made by the designers of Vector3D is either that all vectors "start" at (0,0,0) or that the vector is the more abstract concept of an amount of travel in a direction.
-
Why does Vector3D have only 3 coordinate properties X,Y,Z? Does every Vector3D start in point (0,0,0)?
A vector is like an arrow pointing in a direction, with a particular length. Here is some more information about vectors in 3D: http://www.nondot.org/sabre/graphpro/3d2.html[^]
Dawn is nature's way of telling you to go to bed.