#include #include #include using namespace std; /* This program, "friction.cc" calculating the velocity of the domino effect for dominoes sliding with friction coeffcient mu over each other while rotating */ enum {Nt = 40}; //number of separations s/h. //aspect parameters const double d=0.17863, mu=0.1; // d-> d/h, mu=friction, double sep, dth, duration; //sep=s/h, dth=dtheta, duration=time double A,B,C; //coefficients of differential equation for omega(theta) int Ni, Nc; void coefficients(int n, double x);//computes A,B,C double derivative(int n , int i, double oma);//calculates d omega/ d theta double collision(int n, double oma);//collision double time(int n, double oma);//integrates time int main() { int i, n; double thetac, oma, omp, vas; cout << setprecision(10); cout << setiosflags(ios :: showpoint); cout << setiosflags(ios :: fixed); for(i=1; i