0
|
1407 Views
|
4 Replies
|
1 Total Likes
View groups...
Share
GROUPS:

Why hasn't the distance from this point to the straight line been calculated?

Posted 10 months ago
 Clear["Global*"] reg = ImplicitRegion[ x + k y == 0, {x, y}] pt = {-((a^2 k)/Sqrt[b^2 + a^2 k^2]), b^2/Sqrt[b^2 + a^2 k^2]} RegionDistance[reg, pt]  Use codes above allWhy is it impossible to find the distance from this point to the straight line? The known condition is: a > b > 0, and the point is in the first quadrant. k<0
4 Replies
Sort By:
Posted 10 months ago
 Give up on ImplicitRegion: reg = InfiniteLine[{x, y} /. Solve[a x + b y + c == 0, y][[1]] /. {{x -> 0}, {x -> 1}}] RegionDistance[reg, {x0, y0}] 
Posted 10 months ago
 I don't know, but this variant works correctly: reg = InfiniteLine[{{0, 0}, {-k, 1}}]; pt = {-((a^2 k)/Sqrt[b^2 + a^2 k^2]), b^2/Sqrt[b^2 + a^2 k^2]}; RegionDistance[reg, pt] 
Posted 10 months ago
 Thank you! This is an alternative method.
Posted 10 months ago
 Using this code to derive the distance from a point to a straight line is also unsuccessful.Clear["Global*"]reg = ImplicitRegion[a x + b y + c == 0, {x, y}]pt = {x0, y0}RegionDistance[reg, pt]Is there any method to derive the distance formula from a point to a straight line?