makc
- 65
- 0
Hi, I need to extrapolate vector v_{-1} from v_{0}, v_{1} and v_{2} (see attached pic), so that if v_{2} is on the right/left (2D case for simplicity) of v_{1}-v_{0}, v_{-1} would also be on the right/left.
My initial solution was like this:
v_{2} - v_{1} = v_{1} - v_{0} + dv,
v_{1} - v_{0} = v_{0} - v_{-1} + dv,
and from there
v_{-1} = 3(v_{0} - v_{1}) + v_{2}.
This, however, produces ugly results when abs (v_{2} - v_{1}) < abs (v_{1} - v_{0}) - point v_{-1} is placed very far from v_{0}. So I need a better formula for this.
Any help?
My initial solution was like this:
v_{2} - v_{1} = v_{1} - v_{0} + dv,
v_{1} - v_{0} = v_{0} - v_{-1} + dv,
and from there
v_{-1} = 3(v_{0} - v_{1}) + v_{2}.
This, however, produces ugly results when abs (v_{2} - v_{1}) < abs (v_{1} - v_{0}) - point v_{-1} is placed very far from v_{0}. So I need a better formula for this.
Any help?