HTML5¼¼Êõ

C# WPF¶¯µãÈÎÒâÒƶ¯ÆøÅÝ»­·¨(½â¾ö·½°¸Ê¹Óõ½Êýѧ¹´¹É¶¨Àí¡¢ÕýÏÒ¶¨Àí¡¢ÏòÁ¿ÖªÊ¶)¡£ - »Ù¸èÕÆÃÈÈË

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2017-11-23 18:05 ÎÒÒªÆÀÂÛ( )

Ðí¾Ãûд²©¿ÍÁË£¬×î½üÔÚÑо¿WPFÏÂÆøÅݵĻ­·¨£¬Ñз¢¹ý³Ì»¹ÊDZȽϼèÐÁµÄ£¨Ö÷ÒªÊǸ´Ï°Á˸ßÖеÄÊýѧ֪ʶ£¬MMPÈ«Íü¹âÁË£©£¬Õâƪ²©¿ÍÖ÷ÒªÊÇÌṩһ¸ö˼·¸ø´ó¼Ò²Î¿¼£¬Èç¹ûÓдóÉñ»¹ÓиüºÃµÄ½â¾ö·½°¸¿ÉÒÔ²»ÁßÄúµÄÑÔÂÛ¾¡ÇéÁôÑÔ¡£ÄøöÕâ¸öÀàÐ͵ŦÄÜÏîÄ¿£¬Ê×ÏÈ·ÖÎö¿ÉÒÔ

    Ðí¾Ãûд²©¿ÍÁË£¬×î½üÔÚÑо¿WPFÏÂÆøÅݵĻ­·¨£¬Ñз¢¹ý³Ì»¹ÊDZȽϼèÐÁµÄ£¨Ö÷ÒªÊǸ´Ï°Á˸ßÖеÄÊýѧ֪ʶ£¬MMPÈ«Íü¹âÁË£©£¬Õâƪ²©¿ÍÖ÷ÒªÊÇÌṩһ¸ö˼·¸ø´ó¼Ò²Î¿¼£¬Èç¹ûÓдóÉñ»¹ÓиüºÃµÄ½â¾ö·½°¸¿ÉÒÔ²»ÁßÄúµÄÑÔÂÛ¾¡ÇéÁôÑÔ¡£ÄøöÕâ¸öÀàÐ͵ŦÄÜÏîÄ¿£¬Ê×ÏÈ·ÖÎö¿ÉÒÔ¼ÙÉèÆøÅÝÊÇÓÉ£ºÍÖÔ²/¾ØÐÎ/Ô²(ÍÖÔ²µÄÌØÀý)ºÍÈý½ÇÐÎ×é³É£¬OKÊ×ÏÈ·Ö²½Öè½éÉÜÑз¢²½Ö裺

   µÚÒ»£ºÊ×ÏÈÎÒµÄËùÓеÄͼÐζ¼ÊÇ»ùÓÚ¾ØÕó»­³öÀ´µÄ£¬×ø±êÖáÆðµãÊÇ(0,0),¼ÙÉèÒ»¸öÍÏÀ­µãDynamicPoint (x,y),ºÍÒ»¸ö¹Ì¶¨µãFixedPoint (m,n);ÓÉÁ½µã¼´¿ÉÈ·¶¨Ò»¸ö¾ØÐδóС£¬´ÓÀïÃæ»­³öÄÚ½ÓͼÐκÍÒ»¸öÈý½ÇÐΣ»

              1¡¢Ð½¨¾ØÐÎ  var TriagleRect = new Rect(FixedPoint, DynamicPoint);

              2¡¢¼ÙÉè¾ØÐÎÖ®ÄÚ´æÔÚÒ»¸öµÈ±ÈÀý´óСµÄÔ²£¬¶øÔ²ÊÇÓÉÔ²ÐĺͰ뾶×é³ÉµÄÖ±ÏßËù»®¹ýµÄ»¡È·¶¨µÄ£¬°ë¾¶R£¬Ô²ÐÄCenterXY (p,q);Ï൱ÓÚÒÑÖª

              3¡¢¿ÉÒÔÒƶ¯µÄµãPÉèΪ£ºCurrentFixedPoint(s,t); Õâ¸öµãÊÇÓÉÊó±ê²¶»ñµÄÏ൱ÓÚÒÑÖª;

              4¡¢Óɶ¯µãCurrentFixedPoint(s,t)ÏòÔ² M£¨Ô²ÐÄΪCenterXY (p,q),°ë¾¶R£©×÷Á½ÌõÔ²µÄÇÐÏߣ¬Çó³öÁ½ÇеãF1(f1x,f1y)¡¢F2(f2x,f2y)×ø±êÖµ?

              ÈçÏÂͼ(×öµÄͼ±È½ÏÄÑ¿´£¬×ö¸¨ÖúÖ®ÓÃ)

                    

 

 

   µ½Õâ±ß¿Ï¶¨ºÜ¶àÈ˾õµÃºÜÊìϤ£¬Ã»´íÕâÊǸßÖеÄÊýѧÌ⣬Õâ±ßÔÚÑо¿µÄ¹ý³ÌÖÐÑо¿ÁËÁ½ÖÖ½â¾ö·½°¸£¬ÏÂÃæ¼òµ¥µÄ½éÉÜÏ£º

   ·½°¸1£º

             Èçͼ£¬ÓÉÔ²ÐĵãCÏòÁ½Çеã×ö´¹Ö±Ïߣ¬È»ºó¸ù¾ÝÈý½Çº¯Êý×ö¸¨ÖúÏßPQ£¬QCµÃ³öб±ßPC³¤£¬ÓÉͼÖпÉÒÔÖªµÀ         

              double Sine = R / AB; //Çó³öÕýÏÒÖµ

            ¡ÏF1PC= Math.Round((Math.Asin(Sine) / Math.PI) * 180, 2);//°ÑÕýÏÒÖµ»»Ëã³É½Ç¶È

           ÀûÓÃÏòÁ¿ºÍÏòÁ¿Ä£½øÐмÆËã¶þÔªÒ»´Î·½³Ì¿ÉÒԵóöF1,F2×ø±ê.

           ·½³Ì1£ºPF1ÏòÁ¿=PCÏòÁ¿+CF1ÏòÁ¿  £¬ÕâÀï¿ÉÒԵóöÒ»¸ö¹ØÓÚF1µÄ¶þÔªÒ»´Î·½³Ì£»

           ·½³Ì2£ºPF1ÏòÁ¿µÄÄ£=£¨PCƽ·½+CF1ƽ·½£©¿ª¸ùºÅ,ÕâÀï¿ÉÒԵóöÒ»¸ö¹ØÓÚF1µÄ¶þÔª¶þ´Î·½³Ì£»

           ÓÉÕâÁ½¸ö·½³Ìʽ¿ÉÒÔ½â³öF1µÄ×ø±êÖµ£¬Í¬ÀíÒ²¿ÉÒԵóöF2µÄ×ø±êÖµ;

    ·½°¸2£º

           Ò²ÊÇÈçͼ£¬·½°¸1ÊÇÉÔ΢¸´ÔÓÁËÒ»µã£¬±È½Ï²»ÀûÓÚÈí¼þµ±ÖеÄÓ¦Óã¬Õâ±ß×ÅÖؽéÉܵڶþÖÖËã³öÇеãµÄ¿ÉÐÐÐÔ·½°¸£»

              double MB = Math.Sqrt(Math.Pow(PC, 2) - Math.Pow(R, 2));//MBΪÇÐÏߵij¤¶È

              double Sine = R / AB; //Çó³öÕýÏÒÖµ

            ¡ÏF1PC= Math.Round((Math.Asin(Sine) / Math.PI) * 180, 2);//°ÑÕýÏÒÖµ»»Ëã³É½Ç¶È

            ½ÓÏÂÀ´¸ú·½°¸1²»Í¬µÄµØ·½ÊÇ£ºÎÒÒªÈÃÔ²Ðĵ㰴ÕսǶȡÏF1PC½øÐÐ˳ÄæʱÕë½øÐÐÐýת

          

Vector vector = Point.Subtract(CenterXY, CurrentFixedPoint); 3 Matrix matrix = new Matrix(); 4 matrix.RotateAt(SineAngle, CurrentFixedPoint.X, CurrentFixedPoint.Y); v = matrix.Transform(vector); 7 v.Normalize(); 8 9 Matrix matrix2 = new Matrix(); 10 matrix2.ScaleAt(_vector, _vector, CurrentFixedPoint.X, CurrentFixedPoint.Y); 11 var v2 = matrix2.Transform(v); 12 return v2;

             ¾­¹ýÉÏÃæÐýת£¬È»ºóËõ·Åµ½µ¥Î»1µÄÏòÁ¿¼ÙÉèΪPF1' ,È»ºó°´±ÈÀý·Å´óµ½PF1µÄÄ£³¤Ö®ºóµÃ³öÏòÁ¿PF1£¬ÕâÑù¾Í¿ÉÒԵóöF1µã×ø±ê£¬Í¬ÀíµÃ³öF2£»¾ßÌåת»»ÈçÏ£º

             

tmpPoint = Point.Add(P, SecondPoint); 3 var tmpPoint2 = Point.Add(P, ThirdPoint);

 

             ÕâÑù¾ÍʵÏÖÁËÒƶ¯¶¯µãP£¬F1,F2Ò²»á¸ú׎ǶȽøÐÐʵʱ±ä»¯£¬µ«ÊǼнDz»±ä£¬OK£¬ÏÖÔÚ¶¯Ì¬µÄÁ½¸öµã¶¼ÒѾ­È·ÈϳöÀ´ÁË£¬½ÓÏÂÀ´¾Í¿ÉÒÔͨ¹ýC#ÌṩµÄ·½·¨½øÐÐÁ¬Ïߣ¬ÕâÑù¾Í×é³ÉÁËÒ»¸öÈý½ÇÐΣ¬Õâ¸öÈý½ÇÐÎÊÇÓÉÄÚÔ²Ðijö·¢ÑÓÉìÖÁ¶¯µãPµÄͼÐΡ£

             

PathFigure PointPathFigure = new PathFigure(); 3 PointPathFigure.StartPoint = CurrentFixedPoint; 4 PointPathFigure.Segments.Add(new LineSegment(new Point(tmpPoint.X, tmpPoint.Y), true)); 5 PointPathFigure.Segments.Add(new LineSegment(new Point(tmpPoint2.X, tmpPoint2.Y), true)); 6 7 PathGeometry myPathGeometry = new PathGeometry(); 8 myPathGeometry.Figures.Add(PointPathFigure);

 

 

¡¡

1.±¾Õ¾×ñÑ­ÐÐÒµ¹æ·¶£¬ÈκÎתÔصĸå¼þ¶¼»áÃ÷È·±ê×¢×÷ÕߺÍÀ´Ô´£»2.±¾Õ¾µÄÔ­´´ÎÄÕ£¬ÇëתÔØʱÎñ±Ø×¢Ã÷ÎÄÕÂ×÷ÕߺÍÀ´Ô´£¬²»×ðÖØÔ­´´µÄÐÐΪÎÒÃǽ«×·¾¿ÔðÈΣ»3.×÷ÕßͶ¸å¿ÉÄܻᾭÎÒÃDZ༭Ð޸Ļò²¹³ä¡£

Ïà¹ØÎÄÕÂ
  • html5Òƶ¯¶ËÊÊÅä- media query - ÊÀ½çºÜ´óÃÎÏëºÜÔ¶

    html5Òƶ¯¶ËÊÊÅä- media query - ÊÀ½çºÜ´óÃÎÏëºÜÔ¶

    2017-11-14 14:07

  • ³¬ºÃÓõÄÒƶ¯¿ò¼Ü--Ionic--¹¹½¨APP²à±ßÀ¸ µ×²¿Ñ¡Ï ÂÖ²¥Í¼ ¼ÓÔض¯»­ - undeceive

    ³¬ºÃÓõÄÒƶ¯¿ò¼Ü--Ionic--¹¹½¨APP²à±ßÀ¸ µ×²¿Ñ¡Ï ÂÖ²¥Í¼ ¼ÓÔض¯

    2017-10-21 10:00

  • Òƶ¯¶ËÆÁÄ»ÊÊÅäÁ½Èýµã - IoveC

    Òƶ¯¶ËÆÁÄ»ÊÊÅäÁ½Èýµã - IoveC

    2017-10-21 09:01

  • C#ʹÓÃXamarin¿ª·¢¿ÉÒÆÖ²Òƶ¯Ó¦Óýø½×ƪ(10.×ÛºÏÑÝÁ·,À´Ò»·ÝÔöɾ¸Ä²éCRUD) - GuZhenYin

    C#ʹÓÃXamarin¿ª·¢¿ÉÒÆÖ²Òƶ¯Ó¦Óýø½×ƪ(10.×ÛºÏÑÝÁ·,À´Ò»·ÝÔöɾ¸Ä²é

    2017-10-18 11:00

ÍøÓѵãÆÀ
Â