Dal momento che i vettori da 2 a 1 e 1 a 3 sono perpendicolari, il loro prodotto di punti è 0.
Questo ti lascia con due incognite: x da 1 a 3 (x1 3) e y da 1 a 3 (y13)
Utilizzare il teorema di Pitagora per ottenere un'altra equazione per quelle sconosciute.
Risolvere per ogni sconosciuto per sostituzione ...
Ciò richiede la squadratura e unsquaring, così si perde il segno associato con le equazioni.
Per determinare il segno, prendere in considerazione:
while x21 is negative, y13 will be positive
while x21 is positive, y13 will be negative
while y21 is positive, x13 will be positive
while y21 is negative, x13 will be negative
noto: Punto 1: x1, y1
noto: Punto 2: x2, y2
x21 = x1 - x2
y21 = y1 - y2
noto: a distanza | 1 -> 3 | : N/2
equazione a: teorema di Pitagora
x13^2 + y13^2 = |1->3|^2
x13^2 + y13^2 = (N/2)^2
noti: angolo 2-1-3: angolo retto
vettori 2-> 1 e 1-> 3 sono perpendicolari
2-> 1 dot 1-> 3 è 0
equazione b: prodotto scalare = 0
x21*x13 + y21*y13 = 2->1 dot 1->3
x21*x13 + y21*y13 = 0
rapporto b/w x13 e y13:
x21*x13 = -y21*y13
x13 = -(y21/x21)y13
x13 = -phi*y13
equazione a: risolto per y13 con rapporto
plug x13 into a
phi^2*y13^2 + y13^2 = |1->3|^2
factor out y13
y13^2 * (phi^2 + 1) =
plug in phi
y13^2 * (y21^2/x21^2 + 1) =
multiply both sides by x21^2
y13^2 * (y21^2 + x21^2) = |1->3|^2 * x21^2
plug in Pythagorean theorem of 2->1
y13^2 * |2->1|^2 = |1->3|^2 * x21^2
take square root of both sides
y13 * |2->1| = |1->3| * x21
divide both sides by the length of 1->2
y13 = (|1->3|/|2->1|) *x21
lets call the ratio of 1->3 to 2->1 lengths psi
y13 = psi * x21
check the signs
when x21 is negative, y13 will be positive
when x21 is positive, y13 will be negative
y13 = -psi * x21
equazione a: risolto per x13 con rapporto
plug y13 into a
x13^2 + x13^2/phi^2 = |1->3|^2
factor out x13
x13^2 * (1 + 1/phi^2) =
plug in phi
x13^2 * (1 + x21^2/y21^2) =
multiply both sides by y21^2
x13^2 * (y21^2 + x21^2) = |1->3|^2 * y21^2
plug in Pythagorean theorem of 2->1
x13^2 * |2->1|^2 = |1->3|^2 * y21^2
take square root of both sides
x13 * |2->1| = |1->3| * y21
divide both sides by the length of 2->1
x13 = (|1->3|/|2->1|) *y21
lets call the ratio of |1->3| to |2->1| psi
x13 = psi * y21
check the signs
when y21 is negative, x13 will be negative
when y21 is positive, x13 will be negative
x13 = psi * y21
di condensare
x21 = x1 - x2
y21 = y1 - y2
|2->1| = sqrt(x21^2 + y^21^2)
|1->3| = N/2
psi = |1->3|/|2->1|
y13 = -psi * x21
x13 = psi * y21
Normalmente non lo farei, ma l'ho risolto al lavoro e ho pensato che spiegarlo accuratamente mi avrebbe aiutato a consolidare le mie conoscenze.
Per una soluzione dettagliata, [vedere qui] (http://stackoverflow.com/a/17195324/183120). – legends2k