Skip to content

aapo/aaplot

Repository files navigation

-----------------------------------------------------
aaplot 0.7
24. October 2008
by: Aapo Rantalainen
GNU GPL 3.0 (or later)
------------------------------------------------------

INFO
====
aaplot is function plotting library/toolkit.

PREREQUIRE
==========
Yuo need libgl. (In Ubuntu: libglu1-mesa-dev)
If you want take screenshots, you need libpng (In Ubuntu: libpng3-dev)
If you want window-icons, you need linXpm (In Ubuntu: libxpm-dev)


USAGE
=====
Make c-file, include aaplot.h, compile, run.

1)
c-file like this:
#include "aaplot.h"

double f(double x) {
return 3*x*x + 4*x -5;
}

int main(){
 addRFunction(0,&f,0.01,"My Function");
  /* 0   = window number
    &f   = pointer to your function
    0.01 = stepping of x 
   "My Function" = just some title
  */
 drawAll();
 return 0;
}

2)
compile like this:
gcc -lXpm -lpng -lGL my_file.c aaplot.a

3)
run like this:
./a.out

EXAMPLES
========
Take a look at example-files.
    * example1: R->R functions
    * example2: R2->R functions
    * example3: R->R3 curves
    * example4: R2->R3 curves
    * example5: file+arrays (2d and 3d)
    * example5B: file of 3d-data (saucepan.dat)
    * example6: about user clicked (selected) points
    * example7: three windows
    * example8: changing attributes of functions/tables 

    * example1P: R->R, with parameters
    * example2P: R2->R, with parameters
    * example3P: R->R3, with parameters
    * example4P: R2->R3, with parameters 

    * example_butterflies: four parameterized curves
    * example_many_curves: just many (>20) curves,
    * example_rings: three rings
    * example_gsl: aaplot with gsl_matrix 

You can compile them all:
make all

GUI
===
With mouse

Right mouse button

    Opens the Menu. Menu entries can be clicked with left or right button. 

Menu

    * Toggle Move/Rotate -mode
    * Change cursor to crosshair
    * Prints manual (to console at this moment)
    * Reset view back to normal
    * Hiding/Unhiding coordinateplanes (XY,YZ,XZ)
    * Close all gl-windows.
    * With every function/table
          o Change title
          o Change point size
          o Change stepping (both if have two steppings)
          o direction (e.g. f(z)=x)
          o New color (pick next random color)
          o Hide/Unhide 

Left mouse button + moving mouse

    * If you are movingmode it will pan (eg. move) the whole view.
    * If you are rotatingmode it rotates the view.

          moving left <-> right

              Y-axis stay in place and zx-plane rotates 

          moving up <-> down

              X-axis stay in place and zy-plane rotates 

Middle mouse button

    Marks one point to coordinate. (This works correct only if view is not rotated) 

Mouse wheel

    Zooming in and out.

With Keyboard

1 and 2	       X-axis stay in place and zy-plane rotates
3 and 4         Y-axis stay in place and zx-plane rotates
5 and 6         Z-axis stay in place and xy-plane rotates
z               Take screenshot
UP/DOWN 	Scales y-axis
LEFT/RIGHT 	Scales x-axis
Shift + UP/DOWN 	Scales z-axis
a/d : increase x-boundaries
w/s : increase y-boundaries
q/e : increase z-boundaries
A/D : decrease x-boundaries
W/S : decrease y-boundaries
Q/E : decrease z-boundaries
ESC 	Close all windows

+/- : zooms in and out\n\
m   : toggles rotate/moving -mode\n\
n   : resets view\n\




HACKING
=======
Filenames beginning with aaplot* are one layer, wroted just for this project.
Filanames beginning with aaglut* are adopted from openglut-project. (with some modifications)

So I suggest you start with aaplot-files. It is like gl with glut programming. If something 
do not work, it might be because of my aaglut-modifications.

About

Automatically exported from code.google.com/p/aaplot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published