dev_open_window (0, 0, 512, 512, ‘black’, WindowHandle)
dev_set_color (‘red’)
gen_region_points (Region, 100, 100)
get_region_points (Region, Rows, Columns)
disp_line (WindowHandle, Rows, Columns, 64, 64)
*生成直线0和直线3
gen_region_line (RegionLines, 100, 50, 150, 250)
gen_region_line (RegionLines3, 45, 150, 125, 225)
*获取直线0的位置
get_region_points (RegionLines, Rows2, Columns2)
*生成直线1
gen_region_line (RegionLines1, Rows, Columns, 150, 130)
*获取直线0和1的交点
intersection (RegionLines, RegionLines1, RegionIntersection)
get_region_points (RegionIntersection, Rows1, Columns1)
line_orientation (Rows, Columns, Rows1, Columns1, Phi)
gen_region_line (RegionLines2, Rows, Columns, Rows1, Columns1)
orientation_region (RegionLines2, Phi1)
line_position (Rows, Columns, Rows1, Columns1, RowCenter, ColCenter, Length, Phi2)
*计算点到点的距离
distance_pp (Rows, Columns, Rows1, Columns1, Distance)
*计算点到直线的距离
distance_pl (200, 200, Rows, Columns, Rows1, Columns1, Distance1)
*计算区域到区域的距离
distance_rr_min (RegionLines2, RegionLines3, MinDistance, Row1, Column1, Row2, Column2)
*计算直线到区域的距离
distance_lr (RegionLines2, Row1, Column1, 230, 340, DistanceMin, DistanceMax)