print("Irregular vertices: \n%d/%d (%.2f%%)\n" % (irregular_vertex_count, vertex_count, irregular_ratio * 100)) # Compute areas, min, max and standard deviation area = igl.eigen.MatrixXd() igl.doublearea(V, F, area) area /= 2.0 area_avg = area.mean() area_min = area.minCoeff() / area_avg area_max = area.maxCoeff() / area_avg area_ns = (area - area_avg) / area_avg area_sigma = math.sqrt(area_ns.squaredMean()) print("Areas (Min/Max)/Avg_Area Sigma: \n%.2f/%.2f (%.2f)\n" % (area_min, area_max, area_sigma)) # Compute per face angles, min, max and standard deviation angles = igl.eigen.MatrixXd() igl.internal_angles(V, F, angles) angles = 360.0 * (angles / (2 * math.pi)) angle_avg = angles.mean() angle_min = angles.minCoeff() angle_max = angles.maxCoeff() angle_ns = angles - angle_avg angle_sigma = math.sqrt(angle_ns.squaredMean()) print("Angles in degrees (Min/Max) Sigma: \n%.2f/%.2f (%.2f)\n" % (angle_min, angle_max, angle_sigma))
print("Irregular vertices: \n%d/%d (%.2f%%)\n" % ( irregular_vertex_count, vertex_count, irregular_ratio * 100)) # Compute areas, min, max and standard deviation area = igl.eigen.MatrixXd() igl.doublearea(V, F, area) area /= 2.0 area_avg = area.mean() area_min = area.minCoeff() / area_avg area_max = area.maxCoeff() / area_avg area_ns = (area - area_avg) / area_avg area_sigma = math.sqrt(area_ns.squaredMean()) print("Areas (Min/Max)/Avg_Area Sigma: \n%.2f/%.2f (%.2f)\n" % ( area_min, area_max, area_sigma)) # Compute per face angles, min, max and standard deviation angles = igl.eigen.MatrixXd() igl.internal_angles(V, F, angles) angles = 360.0 * (angles / (2 * math.pi)) angle_avg = angles.mean() angle_min = angles.minCoeff() angle_max = angles.maxCoeff() angle_ns = angles - angle_avg angle_sigma = math.sqrt(angle_ns.squaredMean()) print("Angles in degrees (Min/Max) Sigma: \n%.2f/%.2f (%.2f)\n" % ( angle_min, angle_max, angle_sigma))