-------------------------------------------------------- GLgraph (C) 2002 Jonas Jermann (GPL) -------------------------------------------------------- An OpenGL based function grapher for Linux 1. Introduction 1.1 About This is my second program. It's written in Perl and is a ported Version of my old Worm(g). 1.2 Description GLgraph visualize mathematical functions. It can handle 3 unknowns (x,z,t) and can produce a 4D function with 3 space and 1 time dimension. 1.3 History/Changelog It began with my first program Worm(g)... Because I didn't find a mathematical function visualiser which fit my needs, I started to write my own in pascall (Worm(g)). GLgraph is a perl/OpenGL portation of my first Worm(g) program. It's result was a complete new structured program (see Changelog). 1.4 Requirements / supported platforms GLgraph needs: libopengl-perl libmath-basecalc-perl libtime-hires-perl I only tested it on my PC: Pentium III 600 Matrox G400 32 MB DH Linux 2.4.18 Debian (sid) libopengl-perl 0.54 -> Perl 5.6.1 -> glutg3 3.7 -> XFree86 4.1.0 (xlibmesa3) libmath-basecalc-perl 1.009 libtime-hires-perl 1.20 2. Features 2.1 Functions You can add your own functions (see 3.1) to the default ones. All math functions of Perl's math module can be used (even trigonometrical). PI is built in too and the function interval can contain complex solutions. 2.2 Output modes There are 4 Modes: no output just calculates (fastest ;) 2D 2D Graph (very fast ;) 3D Wire 3D Wireframe model 3D Solid Solid 3D model (slowest) All use OpenGL. 3D Solid uses the accelerated TRIANGLE methode. GLgraph has preview capabilities too. 2.3 Axis At the moment there are 4 Modes: no axis default changes automaticaly from 2D to 3D 3D square draws a base square 3D cube draws a base cube 2.4 Time The time can also be used as a parameter. But to get acceptable fps the resolution has to be lowered. 2.5 Color There are 3 modes: no colors Fastest mode ;) c mode 1 My own iterative color mode c mode 2 Absolute color scale (slow) 2.6 Preview mode The preview mode uses a resolution of 20 (x and z). It can be used to avoid intense calculation while trivial changes. 3. Usage The program is in a very early stage, many things may change... 3.1 Synopsis glgraph [options] 'function1' 'function2' ... 3.2 Command line options function Function: f(x,z,t)=function -(no)fs Fullscreen (ON) -geometry Window Geometry (1024x768+0+0) -wid Window Id ("graph window") -2d 2D Graph -wire 3D Graph: Wireframe -3d 3D Graph: Solid (DEFAULT) -(no)time Time Graph (notime is BUGGY) ( ON) -(no)colors Color Mode (0=nocolors, 1:mode1, 2:mode2) ( 1) -xmin Beginning of x interval (Window) ( -5) -xmax Ending of x interval (Window) ( 5) -ymin Beginning of y interval (Window) ( -5) -ymax Ending of y interval (Window) ( 5) -zmin Beginning of z interval (Window) ( -5) -zmax Ending of z interval (Window) ( 5) -tmin Beginning of t (time) interval (Window) ( -4) -tmax Ending of t (time) interval (Window) ( 4) -xres Resolution of x axis (relevant dots) ( 50) -zres Resolution of z axis (relevant dots) ( 50) -xzres Space Resolution (xres and zres) -tres Resolution of time "axis" (frames) ( 50) -cfact Interval of color function (0.8) -h, --help Display this help message -v, --version Display GLgraph's version number 3.3 Control from keyboard q Quit _ and 0 Reset (default and hard) m Screenshot (doesn't work properly) w/a/s/d Rotation (3°) 7/8/9 Rotation (90°) ü/ö/ä/$ Translation e and r Scaling b and n Change functions 1 and 2 Change graphic mode 3 and 4 Change color range p Toggle preview mode c Toggle color mode t Toggle time mode y and x Seeking z and u Change space resolution h and j Change time resolution 4. Authors Jonas Jermann (g0th) main developer David Gunzinger (pfy) syntax introduction/help of opengl/glut/perl second color-mode structure help