How to define the new vector in my case?

  • Thread starter mellon
  • Start date
  • Tags
    Vector
I.e. the points have position vectors \vec{v}_0, \vec{v}_0+ La'\vec{i}+ b'\vec{j}, \vec{v}_0+ 2La'\vec{i}+ 2b'\vec{j}, ... \vec{v}_0+ (n-1)La'\vec{i}+ (n-1)b'\vec{j}.In summary, if you have a line with a given starting point and a desired distance between points, you can find N sub vectors along that line by using the formula \vec{v}_0+ Li(a'\vec{i}+ b'\vec{j}), where N is the total number of points desired, L
  • #1
mellon
1
0
If I have a vector:

origin = new Vector(x, y)

then, I would like to get N sub vectors, each one of the N sub vector is got by adding origin vector with a new vector value like:

subVector = origin.add(new Vector(m, n));

The result I would like to achieve is showing in the image below:

http://i.stack.imgur.com/ZvH1j.png"

I would like to get N sub vectors which are in the same horizontal level and spaced by "L" length,

My questions are:

1. what is the new vector (Vector(m, n)) m, n values I should use to get all the sub vectors ? (N is dynamic value)

I end up with something like:

for(var i=0; i<N; i++){

//But, how to select the m, n value ??
var subVector = origin.add(new Vector(m, n));

}



2. How the choose the new vector (Vector(m, n)) m, n value to make sure the distance between two neighboring sub vectors is L as showed in the image ?
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Are you talking about Linear Algebra or programming? It looks to me like you do not have a "vector" and "subvectors" but that you start with a line line and want to find position vectors of points on that line, with distance between them equal to L.

If, in some coordinate system, you line is given by parametric equation x= at+ b, y= ct+ d, and you have a given starting point on the line, with postion vector [itex]\ve{v}_0[/itex], then a vector pointing along the line is [itex]a\vec{i}+ b\vec{j}[/itex]. That has length [itex]\sqrt{a^2+ b^2}[/itex] so that [itex](1/\sqrt{a^2+ b^2})(a\vec{i}+ b\vec{j})[/itex] is a unit vector.

For simplicity, let [itex]a'= a/\sqrt{a^2+ b^2}[/itex] and [itex]b'= b/\sqrt{a^2+ b^2}[/itex] so the unit vector in the direction of the line is [itex]a'\vec{i}+ b'\vec{j}[/itex]. n points on that line, starting with [itex]\vec{v}_0[/itex], with distance L between them, are given by [itex]\vec{v}_0+ Li(a'\vec{i}+ b'\vec{j})[/itex] with i ranging from 0 to n-1.
 

What is a vector in science?

A vector in science is a physical quantity that has both magnitude (size) and direction. It is represented by an arrow, where the length represents the magnitude and the direction represents the direction of the vector.

How do I define a vector in my case?

To define a vector in your case, you need to first determine the physical quantity that you are measuring and its direction. Then, you can represent it using an arrow and label its magnitude and direction.

What are the components of a vector?

The components of a vector are its magnitude and direction. The magnitude is the size or amount of the physical quantity being measured, and the direction is the angle at which the vector is pointing.

Can a vector have a negative magnitude?

Yes, a vector can have a negative magnitude. This indicates that the vector is pointing in the opposite direction of its positive counterpart. For example, a negative velocity vector would indicate that the object is moving in the opposite direction of its positive velocity.

How do I perform vector addition in my case?

To perform vector addition in your case, you need to first determine the components of each vector (magnitude and direction). Then, you can add the components of each vector together to get the resulting vector. You can also use graphical or mathematical methods to perform vector addition.

Similar threads

  • Linear and Abstract Algebra
Replies
1
Views
639
  • Linear and Abstract Algebra
Replies
3
Views
299
Replies
27
Views
1K
  • Linear and Abstract Algebra
Replies
2
Views
608
Replies
3
Views
1K
  • Linear and Abstract Algebra
Replies
3
Views
1K
  • Linear and Abstract Algebra
Replies
2
Views
2K
  • Linear and Abstract Algebra
Replies
17
Views
4K
  • Special and General Relativity
Replies
3
Views
1K
  • Introductory Physics Homework Help
Replies
2
Views
377
Back
Top