Ejemplo n.º 1
0
 /// <summary>
 /// Find the tension needed for the catenary to pass through a specific point in space.
 /// </summary>
 /// <param name="point"></param>
 public void SetClearancePoint(Vector2 point)
 {
     if (ContainsX(point.X))
     {
         double x = point.X - StartPosition.X;
         double D = StartPosition.Y + StepY / StepX * x - point.Y;
         HorizontalTension = CatenaryCalculator.SetSagAtX(Step, weight, D, x, 1e-3);
     }
 }
Ejemplo n.º 2
0
        public Catenary(ISpan span, double weight, double H)
            : base(span)
        {
            this.weight            = weight;
            this.horizontalTension = H;
            this.RelativeCenter    = CatenaryCalculator.CenterPosition(Step, this.weight, H);
            this.SpanChanged      += new EventArgs <Span> .Handler(Catenary_SpanChanged);

            this.CatenaryChanged += new EventArgs <Catenary> .Handler(Catenary_CatenaryChanged);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Helper function that calculates the catenary lowest point and triggers property changed notifiers
 /// </summary>
 protected internal void CalculateCenter()
 {
     this.RelativeCenter = CatenaryCalculator.CenterPosition(Step, weight, horizontalTension);
     OnPropertyChanged(() => CenterX);
     OnPropertyChanged(() => CenterY);
 }