public static string DrawLine(ITimeCoordinate first, ITimeCoordinate second, int number)
        {
            var stringBuilder = new StringBuilder();
            var constant      = 1;

            if (number != 0)
            {
                constant = 8;
            }

            var size = 0.1;

            var constant3D = 0.0005;
            var first3D    = number * constant3D;
            var second3D   = first3D + constant3D;

            number = number + 1;

            //bottom - first end
            stringBuilder.Append($"v {first.X}          {first.Y}      {first3D}\n");           // start
            stringBuilder.Append($"v {first.X + size}     {first.Y}      {first3D}\n");         // x + 1

            stringBuilder.Append($"v {second.X}         {second.Y}     {second3D}\n");          // y + 1
            stringBuilder.Append($"v {second.X + size}    {second.Y}     {second3D}\n");        // y + 1

            stringBuilder.Append($"v {first.X}          {first.Y}      {first3D + size}\n");    // start
            stringBuilder.Append($"v {first.X + size}     {first.Y}      {first3D + size}\n");  // x + 1

            stringBuilder.Append($"v {second.X}         {second.Y}     {second3D + size}\n");   // # y + 1
            stringBuilder.Append($"v {second.X + size}    {second.Y}     {second3D + size}\n"); // # y + 1


            number = number - 1;
            stringBuilder.Append($"f {(number * constant) + 1} {(number * constant) + 2} {(number * constant) + 4} {(number * constant) + 3}\n"); // # bottom
            stringBuilder.Append($"f {(number * constant) + 5} {(number * constant) + 6} {(number * constant) + 8} {(number * constant) + 7}\n"); // top
            stringBuilder.Append($"f {(number * constant) + 1} {(number * constant) + 5} {(number * constant) + 6} {(number * constant) + 2}\n"); //side 1
            stringBuilder.Append($"f {(number * constant) + 2} {(number * constant) + 6} {(number * constant) + 8} {(number * constant) + 4}\n"); // side 2
            stringBuilder.Append($"f {(number * constant) + 4} {(number * constant) + 8} {(number * constant) + 7} {(number * constant) + 3}\n"); // side 3
            stringBuilder.Append($"f {(number * constant) + 3} {(number * constant) + 7} {(number * constant) + 5} {(number * constant) + 1}\n"); // side 4

            return(stringBuilder.ToString());
        }
 public double Euclidean(ITimeCoordinate first, ITimeCoordinate second)
 {
     return(Math.Sqrt(Math.Pow(first.X - second.X, 2) + Math.Pow(first.Y - second.Y, 2)));
 }
 private bool IsErrorSpike(ITimeCoordinate first, ITimeCoordinate second, int numberOfErrors, double errorThreshold)
 {
     return(Euclidean(first, second) > errorThreshold * (numberOfErrors + 1));
 }