本帖最后由 wxz86982782 于 2011-09-20 23:58:37 编辑

解决方案 »

  1.   

    我知道了,是你的角度没有换算。        private void Form1_Paint(object sender, PaintEventArgs e)
            {
                Graphics gobj = this.CreateGraphics();
                float f = 30.0F;
                float x1, y1, x2, y2;
                Rectangle rec1 = new Rectangle(145, -100, 200, 200);
                gobj.DrawArc(Pens.Blue, rec1, 90.0F + f, 90.0F - f);
                rec1 = new Rectangle(195, -50, 100, 100);
                gobj.DrawArc(Pens.Blue, rec1, 90.0F + f, 90.0F - f);            f = f * (float)Math.PI / 180; // 你少了这句 角度转弧度            y1 = 100.0F * (float)Math.Cos(f);
                x1 = 100.0F * (1.0F - (float)Math.Sin(f)) + 145.0F;
                y2 = 50.0F * (float)Math.Cos(f);
                x2 = 50.0F * (1.0F - (float)Math.Sin(f)) + 195.0F;
                gobj.DrawLine(Pens.Blue, x1, y1, x2, y2);
            }