]> git.cworth.org Git - akamaru/blobdiff - main.c
Tweaking.
[akamaru] / main.c
diff --git a/main.c b/main.c
index 0aec615ad7650ac2c0019fd07cdf068495a33d3b..79bf4b546859e17c6bb06457488ce10f6f4b39be 100644 (file)
--- a/main.c
+++ b/main.c
@@ -137,7 +137,7 @@ model_init_curtain (Model *model)
       model->objects[index].position.y = y;
       model->objects[index].previous_position.x = x;
       model->objects[index].previous_position.y = y;
-      model->objects[i].mass = 1;
+      model->objects[index].mass = 1;
 
       if (j + 1 < num_rope_objects) {
        stick_index = i * (num_rope_objects - 1) + j;
@@ -226,7 +226,7 @@ model_init_molecule (Model *model)
   model->num_objects = num_objects;
   model->springs = g_new (Spring, num_springs);
   model->num_springs = num_springs;
-  model->k = 0.2;
+  model->k = 2;
 
   for (i = 0; i < num_objects; i++) {
     model->objects[i].position.x = 200 + i * 20;
@@ -250,10 +250,10 @@ model_init_molecule (Model *model)
 static void
 model_init_wobbly (Model *model)
 {
-  const int width = 6, height = 6;
+  const int width = 4, height = 4;
   const int num_objects = width * height;
   const int num_offset_springs = (width - 1) * height + width * (height - 1);
-  const int distance = 10;
+  const int distance = 20;
   double x, y;
   int i, j, object_index, spring_index;
 
@@ -262,7 +262,7 @@ model_init_wobbly (Model *model)
   model->num_objects = num_objects;
   model->offset_springs = g_new (OffsetSpring, num_offset_springs);
   model->num_offset_springs = num_offset_springs;
-  model->k = 1;
+  model->k = 6.5;
 
   model_init_polygons (model);
 
@@ -276,7 +276,7 @@ model_init_wobbly (Model *model)
       model->objects[object_index].position.y = y;
       model->objects[object_index].previous_position.x = x;
       model->objects[object_index].previous_position.y = y;
-      model->objects[object_index].mass = 0.3;
+      model->objects[object_index].mass = 0;
 
       if (i + 1 < width) {
        model->offset_springs[spring_index].a = &model->objects[object_index];
@@ -718,7 +718,7 @@ timeout_callback (gpointer data)
 {
   Closure *closure = data;
 
-  model_step (closure->model, 1);
+  model_step (closure->model, 0.4);
 
   closure->i++;
   if (closure->i == 1) {