自动化立体仓库 - WCS系统
*
lsh
2024-10-23 cb0ee1254500db12525f1288c47d7499677d4eb7
src/main/java/com/zy/asrs/utils/Utils.java
@@ -87,5 +87,49 @@
        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};
    }
}