FunWorlds/HOpenGL Claus Reinke ------------------- -- functional programming and virtual worlds http://www.cs.kent.ac.uk/~cr3/FunWorlds/ This is a snapshot of my FunWorlds/HOpenGL prototype sources, as of July 2003 (now April 2005, now December 2008,..) updated to work with ghc-6.8.3 and 6.11.20081202 and the HOpenGL and GLUT cabal packages. The functionality is mostly unchanged, although I've added lines and surfaces to the basic feature set, together with a couple of new examples (not very exciting, you might think, but this immediately gives us parameterised surfaces, which are very flexible, and of course those can be animated - see Surface and Torus examples, and even simple lines have their charm, see Turtle;-). This is an undocumented snapshot - only for curious adventurers;-) For general ideas, see the project page and the draft paper and slides from IFL'2002. Please let me know about suggestions, problems, etc. Comments on the language design (not yet finalized) are especially welcome, because that is what is different about FunWorlds, but experience reports or your list of priorities regarding as yet missing graphics functionality will be read with interest as well (graphics functionality is barebones even compared to my earlier VRML-based FunWorlds prototypes, because it is relatively clear what to do there and how, so the research focus has been on other things). General contributions to HOpenGL are also welcome, as they would carry over to FunWorlds/HOpenGL (are there any portable sound APIs? font support via a FTGL binding would be very nice; ..). You'll need ghc with HOpenGL and GLUT installed (I wouldn't call it testing, but I've tried the included examples on my notebook: winxp+cygwin, ghc-6.11.20081202 with packages OpenGL and GLUT installed). The snapshot contains a single small directory tree: $ tar tzf funworlds_03122008.tar.gz funworlds/current/Behavior.hs funworlds/current/FunWorlds.hs funworlds/current/Scene.hs funworlds/examples/Boids.hs funworlds/examples/BouncingBall.hs funworlds/examples/Chain.hs funworlds/examples/Cube.hs funworlds/examples/Flock.hs funworlds/examples/Flock2.hs funworlds/examples/Juggle.hs funworlds/examples/Juggle2.hs funworlds/examples/Juggle2Lines.hs funworlds/examples/Lift.hs funworlds/examples/NLift.hs funworlds/examples/Planet.hs funworlds/examples/Surface.hs funworlds/examples/SurfaceAPI.hs funworlds/examples/Torus.hs funworlds/examples/Towers.hs funworlds/examples/Towers2.hs funworlds/examples/Tree.hs funworlds/examples/Turtle.hs funworlds/examples/Makefile funworlds/Makefile funworlds/README No docs yet:-(, several small examples:-) and the minimal modules (only 3:-) needed to compile the examples. Assuming unixy tools (e.g., cygwin), you can simply go into the examples directory and type make to compile all examples. Many of them use a simple keyboard interface for rotation and scaling (try xX/yY/zZ for rotation in either direction around those axes, sS for scaling down or up, R to reset the view, to end the demo). Some may have other or additional controls (numbers 0-4 for the lift, u/d/m for the tree), there isn't much variation or size yet, and some examples are downright boring (Planet.hs is only there for comparison with its equivalent in the HOpenGL redbook_HS examples). As usual: no warranty for nothing, have fun if you dare!-) [this was all done before cabal/hackage/haddock/..]