Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!news.cs.indiana.edu!know!cs.utexas.edu!ut-emx!perv.pe.utexas.edu!pefv700 From: pefv700@perv.pe.utexas.edu Newsgroups: comp.windows.x Subject: programming strategy for interactive simulator Message-ID: <45921@ut-emx.uucp> Date: 20 Mar 91 21:45:58 GMT Article-I.D.: ut-emx.45921 Sender: news@ut-emx.uucp Distribution: usa Organization: Dept. of Petroleum Engineering, The University of Texas at Aust Lines: 26 I hope this group is ok for this. (I couldn't find a comp.x.programming `a la comp.unix.programming.) I have a FORTRAN simulator that simulates a physical process that proceeds through time. The two pertinent graphics during a run are: 1) a property of the physical system vs. time (in other words, a single-valued function) and 2) a cross-section of the actual 3D system at a point in time (each point in the domain will either be of characteristic "A" or "B" and color will be used to distinguish them). During the simulation run, the user should be able to type a key and get a new graphic of either type 1 or 2 (as above). And of course redrawing should be done as necessary. My question is: should I have 2 processes, one that controls the simulator? If so, what is the best way to get data from the FORTRAN program? sockets? Or should I have just one process that just checks for keyboard and button events periodically? Surely this has been done already. All comments are appreciated. Chris