c# 根据圆点及圆边上一点坐标取得圆内多点,如六边形

static void Main(string[] args)
        { 
            float xo = 39.909209536859834f;//圆点x
            float yo = 116.3225715637207f;//圆点y
            float x1 = 39.960026f;//圆边上一点坐标x
            float y1 = 116.38882f;//圆边上一点坐标y
            Matrix rotation = new Matrix();
            rotation.RotateAt(60, new System.Drawing.PointF(xo, yo));//60为角度,如12边行为30
            
            PointF[] pointf = new PointF[] { new PointF(x1, y1) };
            List<PointF> lst = new List<PointF>();
            for (int i = 0; i < 5; i++)
            {
                rotation.TransformPoints(pointf);
                lst.Add(pointf[0]);
            }            
//lst  中包含六边形的六个点
            Console.ReadLine();
        }        
posted @ 2012-07-16 15:10  94cool  阅读(1590)  评论(0编辑  收藏  举报