HP Prime and TI84 Plus: Forward Intersection
Introduction
The program
FORDINT calculates the third point on a triangle where the coordinates of
points A (xa, xb) and B (xb, yb) are
known. Also, a line towards P point is
aimed from point A at angle α° and from point B at angle β°. See the diagram below.
Formulas:
Output is point
P:
xp = (xa cot β +
xb cot α + (yb – ya))/(cot α + cot β)
yp = (ya cot β +
yb cot α + (xa  xb))/(cot α + cot β)
γ = 180°  α  β
cot θ = 1/tan θ
Note that
FORDINT will set the calculator to Degrees mode.
HP Prime Program FORDINT
Input: xa, ya, α, xb, yb, β
Output: 3 element list: {xp, yp, γ} and Degrees mode is set
EXPORT
FORDINT(xa,ya,a,xb,yb,b)
BEGIN
// Forward Intersection
// 20161116 EWS
LOCAL xp,yp,c;
// Degree Mode
HAngle:=1;
// Calculation
xp:=(xa*COT(b)+xb*COT(a)+(ybya))
/(COT(a)+COT(b));
yp:=(ya*COT(b)+yb*COT(a)+(xaxb))
/(COT(a)+COT(b));
c:=180ab;
RETURN {xp,yp,c};
END;
TI84 Plus Program: FORDINT
Input: Variables are prompted
Output: Results are displayed
Variable

TI84
Plus Variable

Variable

TI84
Plus Variable

Variable

TI84
Plus Variable

xa

N

ya

S

α

A

xb

O

yb

T

β

B

xp

P

yc

U

γ

C

"FORWARD
INTERSECT"
"20161116
EWS"
Degree
Input "XA:
",N
Input "YA:
",S
Input "θA:
",A
Input "XB:
",O
Input "YB:
",T
Input "θB:
",B
(N/tan(B)+O/tan(A)+(TS))/(1/(tan(A))+1/(tan(B)))→P
(S/tan(B)+T/tan(A)+(NO))/(1/(tan(A))+1/(tan(B)))→U
180AB→C
Disp "XP:
",P
Disp "YP:
",U
Disp "θC:
",C
Example:
Point A: (1000, 950), angle towards point P: 30°
Point B: (1012, 997), angle towards point P: 44°
Result:
Point P: (approximately) (1024.49237, 975.078358)
Angle γ: 106°
Source: Casio. Casio
fxFD10 Pro User’s Guide Tokyo. 2014
This blog is
property of Edward Shore, 2016.
Thank you very much for great posts. I added the intersection to my app for Android. (Surveying Calculator)
ReplyDelete