#define CONTRIB_THRES 0.005
#define CONTRIB_RANGE(m) sqrt((m) / CONTRIB_THRES)
+/* gravitational strength */
+#define GRAV_STR 16.0f
+
static int pos_to_grid(float x, float y);
static Vec2 grid_to_pos(int gx, int gy);
while(p) {
// calculate the field gradient at the particle position
int gidx = pos_to_grid(p->pos.x, p->pos.y);
- Vec2 grad = calc_field_grad(gidx);
+ Vec2 grad = calc_field_grad(gidx) * GRAV_STR;
p->vel += grad * SIM_DT;
p->pos += p->vel * SIM_DT;
em->pos = emit_place_pos;
em->mass = 100;
em->rate = 10;
- em->chunk = 0.01 * em->mass;
+ em->chunk = 0.001 * em->mass;
em->angle = -1;
em->spread = 0;
em->spawn_pending = 0;