summaryrefslogtreecommitdiff
path: root/dat.h
blob: e3145b53d479c5a0db332b426a27b05ebc7f8932 (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 M2PIX	(1.0/PIX2M)

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

typedef struct Projectile Projectile;

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