tadd slider interaction to main loop - slidergrid - grid of elastic sliders on a frictional surface
git clone git://src.adamsgaard.dk/slidergrid
Log
Files
Refs
README
LICENSE
---
commit f7efea53cfef992b109b9f461eecbd5d6fa0edac
parent 9a4d741751100153ad6ddfd98853e0a51c8d390f
Author: Anders Damsgaard 
Date:   Wed, 16 Mar 2016 14:40:09 -0700

add slider interaction to main loop

Diffstat:
  M slidergrid/main.c                   |      13 ++++++++++++-
  M slidergrid/slider.h                 |       6 ++++++

2 files changed, 18 insertions(+), 1 deletion(-)
---
diff --git a/slidergrid/main.c b/slidergrid/main.c
t@@ -31,15 +31,26 @@ int main(int argc, char** argv)
         return EXIT_FAILURE;
     }
 
-    // temporal loop
+    // main temporal loop
     sim.iteration = 0;
     for (sim.time = 0.0;
             sim.time <= sim.time_end;
             sim.time += sim.dt) {
 
+        // loop over all sliders
         for (i=0; i
diff --git a/slidergrid/slider.h b/slidergrid/slider.h
t@@ -52,4 +52,10 @@ void initialize_slider_values(slider s);
 
 void update_kinematics(slider s, Float dt, long int iteration);
 
+void slider_neighbor_interaction(
+        slider s,
+        const slider* sliders,
+        const int N,
+        const int iteration);
+
 #endif