summaryrefslogtreecommitdiff
path: root/dat.h
blob: da2038d5c7f726e4d2c8bac14e40771a4c688bdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#define Eg	9.81	/* earth's gravity (m·s⁻²) */
#define Cd	0.45	/* drag coefficient for a sphere */
#define ρ	1.293	/* air density (kg·m⁻³) */
#define PIX2M	0.001
#define M2PIX	(1.0/PIX2M)

enum {
	Stheta = 0,
	Spos,
	Svel,
	Sdrag,
	Sdeltax,
	Seta,
	SLEN,
};

typedef struct Projectile Projectile;

struct Projectile
{
	Point2 p, v;
	double mass;
	double r;
};