| | |
| | | return new double[]{x,y}; |
| | | } |
| | | |
| | | public static double[] RingThroughXYRgv(double a,double b) { |
| | | double l = b / a; |
| | | |
| | | // 圆的已知参数 |
| | | double radius = 47.52; // 半径为48 |
| | | // double circumference = ; // 计算圆周长 |
| | | double arcLength = 2 * Math.PI * radius * l; // 给出的弧长 |
| | | |
| | | // 圆心坐标 |
| | | double centerX = 50; |
| | | double centerY = 50; |
| | | |
| | | // 求弧度 |
| | | double theta = arcLength / radius; |
| | | |
| | | // 计算点的坐标 |
| | | double x = 100-(centerX + radius * Math.cos(theta)); |
| | | double y = centerY + radius * Math.sin(theta); |
| | | |
| | | return new double[]{x, y}; |
| | | } |
| | | |
| | | public static double[] RingThroughXYSta(double a,double b) { |
| | | double l = b / a; |
| | | |
| | | // 圆的已知参数 |
| | | double radius = 50; // 半径为48 |
| | | // double circumference = ; // 计算圆周长 |
| | | double arcLength = 2 * Math.PI * radius * l; // 给出的弧长 |
| | | |
| | | // 圆心坐标 |
| | | double centerX = 55; |
| | | double centerY = 45; |
| | | |
| | | // 求弧度 |
| | | double theta = arcLength / radius; |
| | | |
| | | // 计算点的坐标 |
| | | double x = 100-(centerX + radius * Math.cos(theta)); |
| | | double y = centerY + radius * Math.sin(theta); |
| | | |
| | | return new double[]{x, y}; |
| | | } |
| | | |
| | | |
| | | } |