官术网_书友最值得收藏!

31. Point-segment distance

Write a program that determines the closest point and shortest distance between a point and a line segment. Let the user left-click twice to define the segment and right-click once to define the point. Draw the segment and point, and a dashed line showing the shortest distance, as shown in the following screenshot:

主站蜘蛛池模板: 鄱阳县| 景泰县| 根河市| 三台县| 桂平市| 凤冈县| 嘉善县| 抚顺市| 陵水| 涞源县| 沙坪坝区| 依安县| 邵东县| 江源县| 军事| 蒙自县| 永新县| 禹城市| 新泰市| 内丘县| 舒城县| 邵东县| 天镇县| 兴和县| 大足县| 民丰县| 绥江县| 报价| 东至县| 宁城县| 北安市| 潮州市| 阜康市| 盐亭县| 吉水县| 林州市| 安吉县| 达日县| 庆城县| 镇雄县| 奉节县|