Beispiel #1
0
        public EllipsoidParametricForm(double xradius, double yradius, double zradius, Point3D center, double xrotAngel, double yrotAngel, double zrotAngel)
        {
            XRadius = xradius;
            YRadius = yradius;
            ZRadius = zradius;
            Center  = center;
            var x = Geometry3DUtils.Get3DxRotationMatrix(System.Math.Cos(xrotAngel), System.Math.Sin(xrotAngel));
            var y = Geometry3DUtils.Get3DyRotationMatrix(System.Math.Cos(yrotAngel), System.Math.Sin(yrotAngel));
            var z = Geometry3DUtils.Get3DzRotationMatrix(System.Math.Cos(zrotAngel), System.Math.Sin(zrotAngel));

            Rotation = x.Multiply(y).Multiply(z);
            CalculateMaxDistances();
        }
        protected override SurveyPoint GetSurveyPointImpl()
        {
            var r3Dx     = Geometry3DUtils.Get3DxRotationMatrix(_xcos, _xsin);
            var r3Dy     = Geometry3DUtils.Get3DyRotationMatrix(_ycos, _ysin);
            var r3Dz     = Geometry3DUtils.Get3DzRotationMatrix(_zcos, _zsin);
            var rotation = r3Dx.Multiply(r3Dy.Multiply(r3Dz));

            var tet = (1 * System.Math.PI / 100) * _rand.Next(100 + 1);
            var phi = (2 * System.Math.PI / 100) * _rand.Next(100 + 1);
            var pt  = rotation.Multiply(new[] {
                _xradius *System.Math.Sin(tet) * System.Math.Cos(phi) + _xcenter,
                _yradius * System.Math.Sin(tet) * System.Math.Sin(phi) + _ycenter,
                _zradius * System.Math.Cos(tet) + _zcenter
            });

            return(new SurveyPoint(0, 0, 1, pt[0], pt[1], pt[2]));
        }
Beispiel #3
0
        private SurveyPoint GetSurveyPoint()
        {
            var currSurveyPoint = _surveyPointProvider.GetSurveyPoint();

            if (currSurveyPoint == null)
            {
                return(null);
            }
            if (_ignoreNeigbours)
            {
                var distance = Geometry3DUtils.EuclidianDistance(currSurveyPoint.CalibrationPoint, LastSurveyPoint.CalibrationPoint);
                if (distance < SurveyDoubleUtils.Tolerance)
                {
                    return(null);
                }
            }
            LastSurveyPoint = currSurveyPoint;
            return(LastSurveyPoint);
        }