//http://www.timestocome.com //linda cobb //fall 99 //plot routine for physics data //open a display window //and plot data from coffee cooling problem #include #include #include #include #define TIMESTEP 0.001 #define XMIN - 0.5 #define YMIN 70.0 #define XMAX 1.0 #define YMAX 95.0 void display (void){ double i,j; double Ts = 20; //room temperature double Told = 90.0; //begining temperature of coffee double t =0.0; // begining time double r=0.27; //estimated cooling constant double Tnew = 90.0; //new temperature typedef GLfloat point2[2];//define a point array double h = TIMESTEP; //size of increment int temp; //plot black coffee in red point2 p = {0.0, Tnew}; //start somewhere glClear(GL_COLOR_BUFFER_BIT); //clear window glColor3f(1.0, 0.0, 0.0); while(Tnew >= 80){ if(t= 75){ if(t