Professional Documents
Culture Documents
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BaseBall
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
//BaseBall(realistic case)
vx[i + 1] = vx[i]-(b2m*v*vx[i])*dt;
//BaseBall(wind Effect)
vy[i + 1] = vy[i] - g * dt ;
}
}
}
private void DrawAxes(Point or, int width, String xlabel,
String ylabel)
{
Point p1 = new Point(or.X - width, or.Y);
Point p2 = new Point(or.X + width, or.Y);
Point p3 = new Point(or.X, or.Y - width);
Point p4 = new Point(or.X, or.Y + width);
Graphics gg = this.CreateGraphics();
Pen pp = new Pen(Color.Brown, 3); // increase axes
size
gg.DrawLine(pp, p1, p2);
gg.DrawLine(pp, p3, p4);
Font f = new Font("Arial", 17); // increase the
label size and style of label
SolidBrush sb = new SolidBrush(Color.Black);
}
}
}
}
}