#include<iostream>
#include<vector>
using namespace std;
#define eps 1e-3
float a1[5][3] = {
0.972, 0.2137, 9.23,
21.32,23.873,83.823,
0.972, 0.2137, 9.23,
21.32,23.873,83.823,
0.972, 0.2137, 9.23
};
float a2[5][3] = {
0.972, 0.2137, 9.23,
21.32,23.873,83.823,
0.972, 0.2137, 9.23,
21.32,23.873,83.823,
0.972, 999.2137, 999.23
};
float d = 20.0;
struct Point {
float x; //点的X坐标
float y; //点的Y坐标
};
typedef vector <pair<Point, Point>> Edges;
Edges polyOneEdges, polyTwoEdges;
//多边形各边初始化
void inti() {
}
void addEdge1(int n) {
for (int i = 0;
计算二维平面平行线段之间的距离
最新推荐文章于 2022-06-01 14:30:32 发布
这篇博客探讨了如何在二维平面上计算两条平行线段之间的精确距离。通过解析几何的方法,阐述了如何确定线段在坐标系中的位置,并应用数学公式来计算它们之间的间隔。无论线段长度如何,该方法都能准确地给出两平行线段间的距离。
摘要由CSDN通过智能技术生成