コード例 #1
0
        private void Initialize()
        {
            Servo baseServo  = new Servo(0, 0, Math.PI, Math.PI, 0.5);
            Servo elbowServo = new Servo(Math.PI / 2.0, 0, Math.PI, Math.PI, 0.5);

            arm = new Arm(150, 125, baseServo, elbowServo);

            CreateUI();

            canvas.Children.Add(arm.boundariesCanvas);
            canvas.Children.Add(arm.accuracyCanvas);
            canvas.Children.Add(arm.armCanvas);
            canvas.Margin = new Thickness(360, 360, 0, 0);


            arm.Move         += Arm_Move;;
            canvas.MouseMove += Canvas_MouseMove;;
        }
コード例 #2
0
 public DrawingArm(Arm arm, Servo linearServo)
 {
     this.arm         = arm;
     this.linearServo = linearServo;
 }