日期:2014-05-20  浏览次数:20744 次

求各位大神帮忙,想破头了都没想出来,跪求
这是一个点绕圆轨迹运动的程序,只是一个点,但是结果留下了哪一点的运动轨迹,程序代码如下:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace 点绕圆轨迹运动
{
    public partial class Form1 : Form
    {
        public Bitmap bit;
        public Bitmap bitmap;
        public Pen pen = new Pen(Color.Black,2);

        double a;
        double b;
        double angle;
        int degrees = 0;

        //public Graphics de;

        public Form1()
        {
            InitializeComponent();
            Graphics de = this.CreateGraphics();
            de.DrawEllipse(pen, 50, 50, 100, 100);
        }

        
        public int j=0;
        

        private void timer1_Tick(object sender, EventArgs e)
        {
            angle = Math.PI * degrees / 180.0;
            a = Math.Cos(angle) * 50;
            b = Math.Sin(angle) * 50;
            //this.Invalidate();
            degrees++;
        }

        public Bitmap drawbitmap;
        public void drawimage()
        {
            //drawbitmap = new Bitmap(50, 50);
            //Graphics draw = Graphics.FromImage(drawbitmap);
            //draw.DrawEllipse(new Pen(Color.Pink, 2), 0, 0, 50, 50);
        }
        public int aa = 1;
        private void timer2_Tick(object sender, EventArgs e)
        {
            drawbitmap = new Bitmap(8, 8);
            
            Graphics draw = Graphics.FromImage(drawbitmap);