| | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region 曲线与H=K*Q^i的交点 |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | var sect_pt = new Yw.Geometry.Point2d(0, 0); |
| | | if (cubic_spline == null) |
| | | return sect_pt; |
| | | var pt_list = cubic_spline.GetPointListByXRatioRange(1,1.2, 50); |
| | | return sect_pt; |
| | | var pt_list = cubic_spline.GetPointListByXRatioRange(1, 1.2, 50); |
| | | return GetSectPointParabola(pt_list, simular_pt); |
| | | } |
| | | |
| | |
| | | double x; |
| | | for (int i = 0; i < CurvePoints.Count - 1; i++) |
| | | { |
| | | LineHelper.GetKandB(CurvePoints[i], CurvePoints[i + 1], out b, out c); |
| | | LineHelper.GetKandB(CurvePoints[i], CurvePoints[i + 1], out b, out c); |
| | | |
| | | /*解方程 |
| | | * y=ax |
| | |
| | | */ |
| | | if (Math.Abs(a - b) < 0.001) |
| | | continue; |
| | | |
| | | |
| | | x = c / (a - b); |
| | | if (UtilsHelper.IsMiddle(CurvePoints[i].X, CurvePoints[i + 1].X, x)) |
| | | { |
| | |
| | | { |
| | | return ParabolaCurveHelper.GetSectPoint(pt_list, simular_pt, 0); |
| | | } |
| | | |
| | | |
| | | public static Yw.Geometry.Point2d GetSectPointLine(this Yw.Geometry.CubicSpline2d cubic_spline, Yw.Geometry.Point2d simular_pt) |
| | | { |
| | | Yw.Geometry.Point2d sect_pt = new Yw.Geometry.Point2d(0, 0); |
| | |
| | | x = x + space; |
| | | y = 0; |
| | | var y_pt_list = pt_list.GetInterPointsY(x); |
| | | if (y_pt_list==null|| !y_pt_list.Any()) |
| | | if (y_pt_list == null || !y_pt_list.Any()) |
| | | { |
| | | break; |
| | | } |
| | | y = y_pt_list.Last(); |
| | | y = y_pt_list.Last(); |
| | | k = y / Math.Pow(x, index); |
| | | } while (k > fixK); |
| | | |
| | |
| | | return sect_pt; |
| | | } |
| | | |
| | | |
| | | |
| | | //ratioIgnore:作用 当simular_pt超出范围时,扩大的倍数 |
| | | public static Yw.Geometry.Point2d GetSectPointGeneral(this Yw.Geometry.CubicSpline2d cubic_spline, Yw.Geometry.Point2d simular_pt, double index, double ratioIgnore) |
| | | { |