Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
README 1.36 KiB
Setup
-----

1. Change the 'WORHPD:=' line in the Makefile so that it contains the absolute path
   of the directory containing 'lib/libworhp.so' and 'include/worhp/worhp.h'. You should
   then be able to build haven:
   $ make

2. When 'haven' is run, it expects the worhp license to be called 'worhp.lic'
   in the current working directory or at whatever place the environment variable
   WORHP_LICENSE_FILE points to.
   If you run haven from this directory, do:
   $ ln -s /path/to/your/worhp.lic .

3. You need to write your polygon points into 'polygon' (or the file passed with
   the -i argument). Every line contains the x and y coordinates of a single point
   as decimal, separated by whitespace. Example:
-8<-snip->8-
1 0
3 0.5
2 2.1
-8<-snip->8-

4. You should be able to run haven now. It prints the outputfile's name at the end.
   $ ./haven
   Give --help as argument for more info.
   Instead of ./haven you can invoke ./hav, which calls ./haven and logs the used
   arguments in a file, so they can be shown in the plots.

5. To plot the result using MATLAB(R) or GNU Octave run the script file worhp.m.
   > worhp
   If you want to see an older solution with another resolution, set the variable
   'DataName' to the filename of the result
   > DataName = "c-40x40"
   or set the variables 'res' and 'shape'
   > res = [50, 100]
   > shape = "c"
   and then call
   > worhp