{
const int num_objects = 20;
const int num_sticks = num_objects - 1;
- const int stick_length = 20;
+ const int stick_length = 5;
int i;
model->objects = g_new (Object, num_objects);
model->sticks = g_new (Stick, num_sticks);
model->num_sticks = num_sticks;
model->offsets = NULL;
- model->num_objects = 0;
+ model->num_offsets = 0;
for (i = 0; i < num_objects; i++) {
model->objects[i].position.x = 200;
for (i = 0; i < model->num_objects; i++) {
model->objects[i].force.x = 0;
- model->objects[i].force.y = 3;
+ model->objects[i].force.y = 0;
}
}
model_accumulate_forces (model);
model_integrate (model, delta_t);
- for (i = 0; i < 5; i++)
+ for (i = 0; i < 20; i++)
model_constrain (model, delta_t);
model->theta += delta_t;