フィルターのクリア

finding intersection of two lines?

1 回表示 (過去 30 日間)
Zeinab Ahmadi93
Zeinab Ahmadi93 2017 年 7 月 26 日
回答済み: Roger Stafford 2017 年 7 月 26 日
Hello
I have two points B(x1,y1) , C(x2,y2), then I calculate the corrdinate of two more points J(xdd,ydd) and k(xgg,ygg) know I want to find the coordinate of yellow star point which is the intersection of line JK and BC, How can I do it? Thanks in advance.
xdd= x1(index1)+(DeltaX*D_CL)/D +(DeltaY/D)*sqrt(r^2-D_CL^2);
ydd= y1(index1)+(DeltaY*D_CL)/D-(DeltaX/D)*sqrt(r^2-D_CL^2);
xgg= x1(index1)+(DeltaX*D_CL)/D-(DeltaY/D)*sqrt(r^2-D_CL^2);
ygg=y1(index1)+(DeltaY*D_CL)/D+(DeltaX/D)*sqrt(r^2-D_CL^2);

採用された回答

Roger Stafford
Roger Stafford 2017 年 7 月 26 日
If your “yellow star point” is as indicated in your diagram, there is a simple formula for finding it which doesn’t require finding J and K. Define vectors B = [x1;y1], C = [x2;y2], and define rB and rC as the respective radii of the circles with centers at B and C.
BC = B-C;
S = (B+C)/2 - (rB^2-rC^2)/(2*dot(BC,BC))*BC; % <-- yellow star point
Of course, if rB and rC are equal, then S is simply
S = (B+C)/2
which would be the midpoint between B and C.

その他の回答 (1 件)

KSSV
KSSV 2017 年 7 月 26 日

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by