- #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 ?
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: