PlaneDomains Copyright (C) 2013 Marco Spadini This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the GNU General Public License for more details. About the author: Marco Spadini Dipartimento di Matematica e Informatica, Via S. Marta 3, 50139 Firenze, ITALY web: http:\\www.dma.unifi.it\~spadini e-mail: marco.spadini@unifi.it Description: The purpose of this program is to sketch plane domains defined by a complex sets of inequalities. The user should provide a reference rectangle R (determined by two opposite corners, south-west SW=(x0,y0) and north-east NE=(x1,y1)), and a set of conditions (namely a bunch of inequalities joined by logical connectives as ".and.", ".or.", ".xor.", or the operator ".not." ). The set of conditions can be distributed on several lines (all logically linked by ".and.", but do **not** break a single condition over two lines: errors would ensue). The program tries to sketch the closure of the interior of the set D of those points (x,y) in the reference rectangle R where the condition holds. (Note that boundaries, albeit shown, are not necessarily included in the domain D, but do belong to the closure of D). The functions and conditions ought to be inserted as strings (using FORTRAN 90/95 conventions and intrinsics with the addition of the ".xor." operator and of the "signum" function --realized as "signum(x)=sign(1.,x)"). All input boxes accept simple Python expressions, like e/2 or pi. A word of caution concerns integer division: recall that in FORTRAN, as in many other languages, 1./2. = 0.5 whereas 1/2 = 0. **WARNING** Please be aware that because of how FORTRAN treats out-of-range values, expressions evaluating points outside of their domain yield NaN, hence quietly evaluataes to .FALSE. in our context. This means, for instance, that expressions like "sqrt(x)<1." do not yield an error even for negative x and behaves exactly as "sqrt(abs(x))<1." (just a little slower). Whether this behaviour is a nice feature or a bad bug depends on the user awareness! Components. The program consists of three pieces of software: The interfaces (planeDomains.py and positivePlaneF.py) written in Python and the FORTRAN main program that actually makes the computations (dom2.f03); Requirements: A working gfortran installation is needed for the main program. A working Python (I tested v. 2.7) installation with the Tkinter module is required for the interface. Also, to get graphics output, a working Gnuplot installation with x11 support is required. Installation: Just copy this directory somewhere you have the rights to read write and execute. RUNNING THE PROGRAM: In a terminal, go to the directory where the program is installed. At the prompt, issue the command "python pDomain.py". Enjoy!