|
![](/i/fill.gif) |
Peter Popov wrote:
>
> ...
> D-----C
> / /
> A /
> \_B/
>
> AB and DC belong to one set of rulers, [1] and AD and BC belong to the
> other, [2]. Now, if we take two points on AB and DC, M and N resp., so
> that the AM:AB = DN:DC, the line MN will belong to [1] and will have a
> U coordinate of exactly that ratio. Let's choose M and N so that that
> ratio is a. The point P' on MN for which MP':MN = b then has UV
> coordinates a and b (directly follows from the above). Let's find its
> XY coordinates:
>
> (note: everything is vectors, i.e. AB = B - A, except a and b)
>
> AM = a*AB
> DN = a*DC
> MN = AN - AM = AD + DN - AM
> MP' = b*MN = b*(AD + DN - AM) = b*(AD + a*DC - a*AB) =
> = b*(AD + a*(DC - AB))
> AP' = AM + MP' = a*AC + b*(AD + a*(DC - AB))
> P' = A + AP' = A + a*AC + b*(AD + a*(DC - AB))
>
> OK, this was the easy part :)
>
> Now, knowing A, B, C, D and P', how do I find a and b (or P, it's the
> same)?
In your last equation, a and b are the unknowns. Take the inner product
of this equation with say, AB. You will end with a scalar equation.
Take the inner product of your last equation with AD and you'll get a
second equation. Now you have a pair of equations with two unkowns. This
system should be soluble.
Alberto.
Post a reply to this message
|
![](/i/fill.gif) |