diff --git a/Bonhomme01/Bonhomme.cs b/Bonhomme01/Bonhomme.cs index 6fc01fa..4591235 100644 --- a/Bonhomme01/Bonhomme.cs +++ b/Bonhomme01/Bonhomme.cs @@ -32,8 +32,8 @@ namespace Bonhomme01 base.Afficher(handle); jambe1.Afficher(handle); jambe2.Afficher(handle); - // bras1.Afficher(handle); - // bras2.Afficher(handle); + bras1.Afficher(handle); + bras2.Afficher(handle); tete.Afficher(handle); } public new void Cacher(IntPtr handle) @@ -53,7 +53,7 @@ namespace Bonhomme01 if (jambe1.angleJambe.AngleBassin == 0 && jambe2.angleJambe.AngleBassin == 0 || 1==1) { //jambe1.Monter(2); - jambe1.Avancer(-10); + jambe1.Avancer(10); } else if (jambe1.angleJambe.AngleBassin != 0 && jambe2.angleJambe.AngleBassin == 0 && 1==2) { diff --git a/Bonhomme01/Jambe.cs b/Bonhomme01/Jambe.cs index 4337cc2..5c8a648 100644 --- a/Bonhomme01/Jambe.cs +++ b/Bonhomme01/Jambe.cs @@ -77,7 +77,7 @@ namespace Bonhomme01 base.angleRotation = angleJambe.AngleBassin; jambeBas.angleRotation = angleJambe.AngleGenou; pied.angleRotation = angleJambe.AngleCheville; - + base.Cacher(handle); jambeBas.Cacher(handle); pied.Cacher(handle); @@ -116,7 +116,8 @@ namespace Bonhomme01 } public void Avancer(int x) { - PointComplexe m = new PointComplexe(new PointComplexe(base.CSG, base.CSD).Millieux(), new PointComplexe(base.CIG, base.CID).Millieux());//Vecteur entre le haut et le bas du pied + x=10 + PointComplexe m = new PointComplexe(new PointComplexe(base.CSG, base.CSD).Millieux(), new PointComplexe(pied.CIG, pied.CID).Millieux());//Vecteur entre le haut et le bas du pied // var a = ((l.ABS - x) * (l.ABS - x)); int lvertical = (int)m.ABS; @@ -127,7 +128,7 @@ namespace Bonhomme01 double genouxX, genouY; double a = Math.Pow(Pointpied.Real, 2) + Math.Pow(Pointpied.Imaginary, 2); a /= 2 * Pointpied.Imaginary; - genouxX = 2 * a + 2 * Math.Sqrt(Math.Pow(a, 2)-lvertical); + genouxX = 2 * a - 2 * Math.Sqrt(Math.Pow(a, 2)-lvertical); genouxX /= 4; genouY = a - genouxX; Pointgenou = new Complex(genouxX, genouY);