Exemple #1
0
        public static List <PointInSpace> GetPoints(BezierMotionConfig config)
        {
            var stepSize = 1 / (config.TotalSecondsPerTrack * config.StepsPerSecond);

            var points = new List <PointInSpace>();

            for (double i = 0; i < 1; i += stepSize)
            {
                points.Add(Bezier4(config.Point1, config.Point2, config.Point3, config.Point4, i));
            }

            points.Add(config.Point4);

            return(points);
        }
Exemple #2
0
        public Configuration(BezierMotionConfig config)
        {
            InitializeComponent();

            Closing += OnClosing;

            Config = config;

            Point1X.Value = (decimal)Config.Point1.X;
            Point1Y.Value = (decimal)Config.Point1.Y;
            Point1Z.Value = (decimal)Config.Point1.Zoom;

            Point2X.Value = (decimal)Config.Point2.X;
            Point2Y.Value = (decimal)Config.Point2.Y;
            Point2Z.Value = (decimal)Config.Point2.Zoom;

            Point3X.Value = (decimal)Config.Point3.X;
            Point3Y.Value = (decimal)Config.Point3.Y;
            Point3Z.Value = (decimal)Config.Point3.Zoom;

            Point4X.Value = (decimal)Config.Point4.X;
            Point4Y.Value = (decimal)Config.Point4.Y;
            Point4Z.Value = (decimal)Config.Point4.Zoom;
        }