private void UpdateBones(DoubleBone leg, DoubleBone arm, double phi) { leg.Angle = phi; double angle = phi - maxphi * 0.5; leg.Rotation1 = Math3D.RotationY(angle); arm.Rotation1 = Math3D.RotationY(phase - angle); }
/// <summary> /// /// </summary> void InitializeBody() { body.Scale = 0.1; body.Position = new Point3D(0, 0, 0.21); body.Rotation1 = Math3D.RotationY(12); Children.Add(body); double tlength = 1.2; Brush brush = Brushes.DarkGreen; torso.Radius = 0.2; torso.DiffuseMaterial.Brush = brush; torso.From = new Point3D(0, 0, -0.1); torso.To = new Point3D(0, 0, tlength + 0.1); body.Children.Add(torso); head.Radius = 0.25; head.ScaleZ = 0.35; head.DiffuseMaterial.Brush = Brushes.RosyBrown; head.Position = new Point3D(0, 0, tlength + 0.4); body.Children.Add(head); leftArm = new DoubleBone(0.06, brush); leftArm.Position = new Point3D(0, 0.35, tlength); leftArm.Angle = -60; body.Children.Add(leftArm); rightArm = new DoubleBone(0.06, brush); rightArm.Position = new Point3D(0, -0.35, tlength); rightArm.Angle = -60; body.Children.Add(rightArm); brush = Brushes.Navy; leftLeg = new DoubleBone(0.08, brush); leftLeg.Position = new Point3D(0, 0.18, 0); body.Children.Add(leftLeg); rightLeg = new DoubleBone(0.08, brush); rightLeg.Position = new Point3D(0, -0.18, 0); body.Children.Add(rightLeg); }
private void UpdateBones(DoubleBone leg, DoubleBone arm, double phi) { leg.Angle = phi; double angle = phi - maxphi * 0.5; leg.Rotation1 = Math3D.RotationY(angle); arm.Rotation1 = Math3D.RotationY(phase - angle); }
/// <summary> /// /// </summary> void InitializeBody() { body.Scale = 0.1; body.Position = new Point3D(0, 0, 0.21); body.Rotation1 = Math3D.RotationY(12); Children.Add(body); double tlength = 1.2; Brush brush = Brushes.DarkGreen; torso.Radius = 0.2; torso.DiffuseMaterial.Brush = brush; torso.From = new Point3D(0, 0, -0.1); torso.To = new Point3D(0, 0, tlength + 0.1); body.Children.Add(torso); head.Radius = 0.25; head.ScaleZ = 0.35; head.DiffuseMaterial.Brush = Brushes.RosyBrown; head.Position = new Point3D(0, 0, tlength + 0.4); body.Children.Add(head); leftArm = new DoubleBone(0.06, brush); leftArm.Position = new Point3D(0, 0.35, tlength); leftArm.Angle = -60; body.Children.Add(leftArm); rightArm = new DoubleBone(0.06, brush); rightArm.Position = new Point3D(0, -0.35, tlength); rightArm.Angle = -60; body.Children.Add(rightArm); brush = Brushes.Navy; leftLeg = new DoubleBone(0.08, brush); leftLeg.Position = new Point3D(0, 0.18, 0); body.Children.Add(leftLeg); rightLeg = new DoubleBone(0.08, brush); rightLeg.Position = new Point3D(0, -0.18, 0); body.Children.Add(rightLeg); }