epix-1.2.14/0000755000175000017500000000000012334457372011550 5ustar hwanghwangepix-1.2.14/legend_item.cc0000644000175000017500000001022010675347326014331 0ustar hwanghwang/* * legend_item.cc -- ePiX legend_item implementations * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.1.18 * Last Change: September 16, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include "enums.h" #include "Color.h" #include "pen_data.h" #include "pairs.h" #include "edge_data.h" #include "camera.h" #include "format.h" #include "label_data.h" #include "markers.h" #include "paint_style.h" #include "screen_data.h" #include "glyph.h" #include "pen_line.h" #include "legend_item.h" namespace ePiX { // Magic numbers screen_data __epix_legend_key(double L) { return screen_data(pair(0, -0.075*L), pair(L, 0.925*L)); } double legend_item::key_coord(double sz, const std::string& len) const { return sz*(length("1pt").to(len).magnitude()); } // N.B. store raw fill color; "key" passes through camera fill_item::fill_item(const std::string& text) : m_fill(the_paint_style().fill_color()), m_text(text) { } fill_item* fill_item::clone() const { return new fill_item(*this); } std::string fill_item::value() const { return m_text; } std::string fill_item::key(const format& fmt, double sz, const pen_data& bpen, const std::string& len) const { const double L(legend_item::key_coord(sz, len)); screen_data tmp(__epix_legend_key(L)); tmp.backing(m_fill).border(bpen.color(), bpen.width().name()); return tmp.print_to(fmt, len, true); } // N.B. Store pens passed through camera path_item::path_item(const std::string& text) : m_line(the_paint_style().line_pen().seen_through(cam())), m_base(the_paint_style().base_pen().seen_through(cam())), m_text(text) { } path_item* path_item::clone() const { return new path_item(*this); } std::string path_item::value() const { return m_text; } std::string path_item::key(const format& fmt, double sz, const pen_data& bpen, const std::string& len) const { const double L(legend_item::key_coord(sz, len)); screen_data tmp(__epix_legend_key(L)); tmp.border(bpen.color(), bpen.width().name()); // draw a centered horizontal segment in the current line style // Magic numbers std::list edges; edges.push_back(edge2d(tmp.l(), tmp.r(), true)); tmp.add_tile(pen_line(m_line, m_base, edges)); return tmp.print_to(fmt, len, true); } // key is a marker in the current style mark_item::mark_item(epix_mark_type mark, const std::string& text) : m_mark(mark), m_style(the_label_style().seen_through(cam())), m_sizes(the_mark_size()), m_text(text) { } mark_item* mark_item::clone() const { return new mark_item(*this); } std::string mark_item::value() const { return m_text; } std::string mark_item::key(const format& fmt, double sz, const pen_data& bpen, const std::string& len) const { const double L(legend_item::key_coord(sz, len)); screen_data tmp(__epix_legend_key(L)); tmp.border(bpen.color(), bpen.width().name()); tmp.add_tile(glyph(tmp.c(), pair(0,0), "", m_mark, m_sizes, m_style, true)); return tmp.print_to(fmt, len, true); // encapsulate in a picture env. } } // end of namespace epix-1.2.14/tikz.cc0000644000175000017500000001650310676534103013040 0ustar hwanghwang/* * tikz.cc -- ePiX::tikz output format * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.1.15 * Last Change: September 07, 2007 * * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA * * * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include "constants.h" #include "utils.h" #include "pairs.h" #include "edge_data.h" #include "Color.h" #include "path_style.h" #include "pen_data.h" // need to get units from the_picture #include "picture_data.h" #include "picture.h" #include "format.h" #include "tikz.h" namespace ePiX { tikz::tikz() : m_fill(Neutral()), m_stroke(Black()), m_lwidth(PLAIN_WIDTH), m_units(the_picture().the_unitlength.units()) { } tikz* tikz::clone() const { return new tikz(*this); } // Filled region with specified Cartesian edges, offset, and color std::string tikz::print_fill(const std::list& edges, const pair& offset, const Color& fc, const pen_data& line, const std::string& len) const { std::stringstream obuf; obuf << set_fill_state(fc) << set_pen_state(line); // compute attribute string std::stringstream attribs; if ( !(fc.is_unset()) ) { attribs << "[fill"; if (fc.alpha() < 1) attribs << ",opacity=" << fc.alpha(); attribs << "]"; } obuf << print_paths(edges, offset, attribs.str(), len); return obuf.str(); } // Unfilled region, specified Cartesian edges std::string tikz::print_line(const std::list& edges, const pair& offset, const pen_data& line, const pen_data& base, const path_state& style, const std::string& len) const { std::string value; // draw *solid* base first if (line.width() < base.width() && !base.color().is_unset()) { std::stringstream battr; battr << "[color=" << format::print(base.color()) << "," << "line width=" << format::print(base.width()) << "]"; value += format::print_line(edges, offset, base, path_state(), battr.str(), len); } value += set_pen_state(line); return value += format::print_line(edges, offset, line, style, "", len); } // Print color declaration strings: model, name, densities std::string tikz::print_color(const std::string& model, const std::string& name, double d1, double d2, double d3) const { return format::xdefinecolor(model, name, d1, d2, d3); } std::string tikz::print_color(const std::string& model, const std::string& name, double d1, double d2, double d3, double d4) const { return format::xdefinecolor(model, name, d1, d2, d3, d4); } // One-line comment std::string tikz::print_comment(const std::string& msg) const { std::stringstream obuf; obuf << "%% " << msg << std::endl; return obuf.str(); } // verbatim string, newline protected std::string tikz::print_verbatim(const std::string& msg) const { std::stringstream obuf; obuf << msg << "%" << std::endl; return obuf.str(); } // start/end a picture-like environment, set unit length std::string tikz::start_picture(const pair& sz, const pair& offset) const { std::stringstream obuf; obuf << "\\begin{tikzpicture}" << std::endl << "\\pgfsetlinewidth{" << format::print(PLAIN_WIDTH) << "}" << std::endl << "\\useasboundingbox " << print(offset) << " rectangle " << print(sz + offset) << ";" << std::endl; return obuf.str(); } std::string tikz::end_picture() const { std::stringstream obuf; obuf << "\\end{tikzpicture}" << std::endl; return obuf.str(); } // Actual work done in start_picture std::string tikz::set_unitlength(const std::string& len) const { return ""; /* std::stringstream obuf; obuf << "\\setlength{\\unitlength}{1" << len << "}%" << std::endl; return obuf.str(); */ } void tikz::reset_state() const { m_fill = Neutral(); m_stroke = Black(); m_lwidth = PLAIN_WIDTH; } //// private member functions //// std::string tikz::path_connector() const { return "--"; } std::string tikz::usepackages() const { return "usepackages tikz"; } // string argument for passing attributes local to this path/loop std::string tikz::start_open_path(const std::string& attribs) const { return "\\draw " + attribs; } std::string tikz::end_open_path(const std::string&) const { std::stringstream obuf; obuf << ";" << std::endl; return obuf.str(); } std::string tikz::start_closed_path(const std::string& attribs) const { return "\\draw " + attribs; } std::string tikz::end_closed_path(const std::string&) const { std::stringstream obuf; obuf << "--cycle;" << std::endl; return obuf.str(); } // print declarations to set state of output format std::string tikz::set_fill_state(const Color& col) const { std::stringstream buf; if (col != m_fill && !col.is_unset()) buf << "\\pgfsetfillcolor{" << format::print(col) << "}" << std::endl; m_fill = col; return buf.str(); } std::string tikz::set_pen_state(const pen_data& pen) const { std::stringstream buf; if (pen.color() != m_stroke) { buf << "\\pgfsetstrokecolor{" << format::print(pen.color()) << "}" << std::endl; m_stroke = pen.color(); } if (pen.width() != m_lwidth) { buf << "\\pgfsetlinewidth{" << format::print(pen.width()) << "}" << std::endl; m_lwidth = pen.width(); } return buf.str(); } // place a LaTeX box of width zero (containing string) at location (pair) std::string tikz::put_box(const pair& loc, const std::string& msg) const { std::stringstream obuf; obuf << "\\pgftext[at={\\pgfpoint{" << truncate(loc.x1()) << m_units << "}{" << truncate(loc.x2()) << m_units << "}}] {" << msg << "}" << std::endl; return obuf.str(); } std::string tikz::print_circle_marker(const pair& here, double diam, bool fill, const Color& color, const std::string& len) const { std::stringstream obuf; obuf << "\\"; if (fill) obuf << "fill"; obuf << "draw[color=" << format::print(color) << "] " << print(here) << " circle(" << 0.5*diam << len << ");" << std::endl; return obuf.str(); } std::string tikz::print(const pair& arg) const { std::stringstream o; o << "(" << truncate(arg.x1()) << m_units << "," << truncate(arg.x2()) << m_units << ")"; return o.str(); } } // end of namespace epix-1.2.14/length.h0000644000175000017500000000670010676531204013177 0ustar hwanghwang/* * length.h -- ePiX true and LaTeX length manipulation * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.2.0 * Last Change: September 22, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* * This file provides the length class from ePiX2: * * - length(std::string) assumes argument is "double [space(s)] unit" * Recognized units are pt (points), in, cm, mm, pc (picas = 1/12 in), * bp (big points = 1/72 in) * * Malformed strings are handled as follows: * Missing doubles are assumed to be 0, units are assumed to be pt * * - length(double) sets length to specified number of pt * * - operator += Increments a length, returning answer in LHS units, e.g. * 1cm+=2in is 6.08cm * 2in+=1cm is 2.3937in * * - operator *= scales a length by a double * - to(string) converts a length to specified units * - operator< compares true lengths * - get_lengths(string, length, length) parses a string into ht and width * * A length can be negative. */ #ifndef EPIX_LENGTH #define EPIX_LENGTH #include namespace ePiX { class length { public: length(std::string); // not const std::string& explicit length(double = 0); length& operator+= (const length&); // increment by another length length& operator*= (double); // scale length& to(std::string); // convert to specified units // compare, with units conversion bool operator== (const length&) const; bool operator!= (const length& len) const { return !((*this) == len); } // for output double magnitude() const; std::string units() const; std::string name() const; private: double m_mag; double pts_per_unit; // constants defined in length.cc std::string m_units; }; // end of class length // value-returning operators length operator+ (length, const length&); length operator* (double, length len); // Compare true size; must pass by value... bool operator< (length arg1, length arg2); /* * Parse a string into two lengths (width and height). * * The "sz" argument is expected to look like "4in x 10cm" or "4 x 6 in", * specifically a double, an optional two-letter unitlength, an "x", a * double, and a two-letter unitlength (defaults to pt). Spaces are * unimportant, as is initial or trailing garbage. Badly malformed input * (e.g., "4,6 in") may confuse the parsing code on some platforms. */ void get_lengths(std::string sz, length& length1, length& length2); } // end of namespace #endif /* EPIX_LENGTH */ epix-1.2.14/pen_data.h0000644000175000017500000000373010674237346013501 0ustar hwanghwang/* * pen_data.h -- Color and width * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.1.20 * Last Change: September 19, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* * This file defines ePiX's concept of a pen (Color and length) * * This header is not part of epix.h. */ #ifndef EPIX_PEN_DATA #define EPIX_PEN_DATA #include "Color.h" #include "length.h" namespace ePiX { class Camera; class pen_data { public: // plain black pen_data(const Color& col, const length& wid); pen_data(const Color& col=Black()); // set void color(const Color& col); void width(const length& len); // get Color color() const; length width() const; bool operator== (const pen_data& pen) const; bool operator!= (const pen_data& pen) const; pen_data seen_through(const Camera& cam) const; bool is_unset() const; private: Color m_color; length m_width; }; // end of class pen_data // undrawn const pen_data& Xfine(); } // end of namespace #endif /* EPIX_PEN_DATA */ epix-1.2.14/config.sub0000755000175000017500000007713010643225006013527 0ustar hwanghwang#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2006-02-23' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m32c) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; m32c-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: epix-1.2.14/clipping.cc0000644000175000017500000000744610663313707013673 0ustar hwanghwang/* * clipping.cc -- Implementation of ePiX's current drawing state * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.1.13 * Last Change: August 23, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include "constants.h" #include "triples.h" #include "functions.h" #include "clipping.h" namespace ePiX { typedef std::list::const_iterator Hp; static const double INF(EPIX_INFTY); clip_state::clip_state(const P& arg1, const P& arg2) { double min1(min(arg1.x1(), arg2.x1())), max1(max(arg1.x1(), arg2.x1())); double min2(min(arg1.x2(), arg2.x2())), max2(max(arg1.x2(), arg2.x2())); double min3(min(arg1.x3(), arg2.x3())), max3(max(arg1.x3(), arg2.x3())); double avg1(0.5*(min1+max1)), avg2(0.5*(min2+max2)), avg3(0.5*(min3+max3)); // inward-pointing faces of clip_box m_walls.push_back(halfspace(P(max1,avg2,avg3), P(-1, 0, 0))); m_walls.push_back(halfspace(P(min1,avg2,avg3), P( 1, 0, 0))); m_walls.push_back(halfspace(P(avg1,max2,avg3), P( 0,-1, 0))); m_walls.push_back(halfspace(P(avg1,min2,avg3), P( 0, 1, 0))); m_walls.push_back(halfspace(P(avg1,avg2,max3), P( 0, 0,-1))); m_walls.push_back(halfspace(P(avg1,avg2,min3), P( 0, 0, 1))); } clip_state::clip_state() { m_walls.push_back(halfspace(P( INF, 0, 0), P(-1, 0, 0))); m_walls.push_back(halfspace(P(-INF, 0, 0), P( 1, 0, 0))); m_walls.push_back(halfspace(P( 0, INF, 0), P( 0,-1, 0))); m_walls.push_back(halfspace(P( 0,-INF, 0), P( 0, 1, 0))); m_walls.push_back(halfspace(P( 0, 0, INF), P( 0, 0,-1))); m_walls.push_back(halfspace(P( 0, 0,-INF), P( 0, 0, 1))); } clip_state& clip_state::add_face(const P& loc, const P& perp) { if (EPIX_EPSILON < norm(perp)) m_extras.push_back(halfspace(loc, perp)); return *this; } clip_state& clip_state::clear_extras() { m_extras.clear(); return *this; } bool clip_state::clips(const P& arg) const { for (Hp p=m_walls.begin(); p != m_walls.end(); ++p) if ( (*p).clips(arg) ) return true; for (Hp p=m_extras.begin(); p != m_extras.end(); ++p) if ( (*p).clips(arg) ) return true; return false; } // return reference to clipped argument std::list& clip_state::clip_path(std::list& L) const { for (Hp p=m_walls.begin(); p != m_walls.end(); ++p) (*p).clip_path(L); for (Hp p=m_extras.begin(); p != m_extras.end(); ++p) (*p).clip_path(L); return L; } std::list& clip_state::clip_loop(std::list& L) const { for (Hp p=m_walls.begin(); p != m_walls.end(); ++p) (*p).clip_loop(L); for (Hp p=m_extras.begin(); p != m_extras.end(); ++p) (*p).clip_loop(L); return L; } clip_state& the_clip_box() { static clip_state* the_clip_state(new clip_state()); return *the_clip_state; } } // end of namespace epix-1.2.14/deriv.h0000644000175000017500000000270110643225006013016 0ustar hwanghwang/* * deriv.h -- ePiX derivative function template * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.0.23 * Last Change: January 06, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef EPIX_DERIV #define EPIX_DERIV #include "constants.h" namespace ePiX { // moved from functions.h to hide global constant EPIX_EPSILON template T deriv(T f(double), double t, double dt=EPIX_EPSILON) { return (1.0/dt)*(f(t+0.5*dt) - f(t-0.5*dt)); } } // end of namespace #endif /* EPIX_DERIV */ epix-1.2.14/data_bins.h0000644000175000017500000000620010676531204013635 0ustar hwanghwang/* * data_bins.h -- ePiX::data_bins class for histogram data * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.1.19 * Last Change: September 17, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* * This file provides the "data_bins" class. * * An object of type data_bins models a closed interval [lo, hi] * divided into subintervals (not necessarily of equal length). Each * subinterval is a "d_bin", whose endpoints are "cuts". A data_bins * can read and sort numerical data, count how many numbers lie in * each bin, and print the result as a bar chart (rectangle height * proportional to population), histogram (area proportional to * population), or as a spline interpolation. * * Ideally no data lies outside (lo, hi) or on a cut. Data on an end * cut is "out of range", data on an interior cut contributes 1/2 to * the population of each adjacent bin. A summary statistic warning is * printed if any points are out of range or lie on a cut. */ #ifndef EPIX_DATA_BINS #define EPIX_DATA_BINS #include #include namespace ePiX { class d_bin; class data_bins { public: data_bins(double lo, double hi, unsigned int n=1); data_bins(const data_bins&); data_bins& operator= (const data_bins&); ~data_bins(); data_bins& cut(double); // add a cut data_bins& read(const std::vector&); unsigned int pop() const; // current population // draw rectangles void histogram(double scale=1) const; // area prop to pop void bar_chart(double scale=1) const; // height prop to pop void plot(double scale=1) const; // smooth interpolation private: double m_lo_val; double m_hi_val; unsigned int m_lo_ct; // population smaller than m_lo_val unsigned int m_hi_ct; // population larger than m_hi_val unsigned int m_pop; // current total population unsigned int m_cut_hits; // number of data on a cut bool m_cuts_locked; // true once we read data std::list m_cuts; std::list m_bins; // bookkeeping void initialize(); // convert cuts to bins and lock void insert(double); // add data point }; // end of class data_bins } // end of namespace #endif /* EPIX_DATA_BINS */ epix-1.2.14/functions.h0000644000175000017500000000677110676531204013736 0ustar hwanghwang/* * functions.h -- ePiX auxiliary functions; Deriv, Integral classes * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.1.22 * Last Change: September 24, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef EPIX_FUNCTIONS #define EPIX_FUNCTIONS namespace ePiX { class P; // sensitive to angle units double Cos(double t); double Sin(double t); double Tan(double t); double Sec(double t); double Csc(double t); double Cot(double t); double Acos(double t); double Asin(double t); double Atan(double t); double Atan2(double y, double x); // additional hyperbolic functions and inverses double sech(double); double csch(double); double coth(double); double asech(double); double acsch(double); double acoth(double); // zero functions double zero(double); double zero(double, double); double zero(double, double, double); double zero(const P&); // P constructors P xyz(double x, double y, double z=0); P cyl(double r, double t, double z); P sph(double r, double t, double phi); // for log data plotting P log_log(double x, double y, double z=0); P log_lin(double x, double y, double z=0); P lin_log(double x, double y, double z=0); P cylindrical(P); // not const P& P spherical(P); P polar(double r, double t); P cis(double t); // utility functions double recip (double); double sinx (double); // discontinuity removed double sgn (double); // period-2 extension of absolute value on [-1,1]: \/\/\/ double cb (double); int gcd (int, int); double min(double, double); double max(double, double); double snip_to(double var, double arg1, double arg2); double inf (double f(double), double, double); double sup (double f(double), double, double); // derivative class class Deriv { private: double (*f)(double); double dt; public: Deriv(double func(double)); Deriv(double func(double), double eps); P operator() (const P&) const; // for plotting // numerical values double eval(double t) const; // one-sided derivatives double right(double t) const; double left(double t) const; }; // end of class Deriv // definite integral class class Integral { private: double (*f)(double); double x0; // lower limit public: Integral(double func(double), double a=0); P operator() (const P&) const; double eval(double) const; }; // end of class Integral double newton (double f(double), double g(double), double start); double newton (double f(double), double start); } // end of namespace #endif /* EPIX_FUNCTIONS */ epix-1.2.14/legend_tile.h0000644000175000017500000000460510736607250014175 0ustar hwanghwang/* * legend_tile.h -- ePiX screen implemenation for legends * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.2.1 * Last Change: September 28, 2007 * * * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA * * * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef EPIX_LEGEND_TILE #define EPIX_LEGEND_TILE #include #include "enums.h" #include "pairs.h" #include "length.h" #include "Color.h" #include "label_style.h" #include "pen_data.h" #include "tile.h" namespace ePiX { class format; class legend_item; class affine; class screen_mask; class legend_tile : public tile { public: legend_tile(const pair& here, const pair& offset, epix_label_posn align, const label_state& style, const pen_data& item_border, double key_size, double skip, std::list items); legend_tile(const legend_tile&); legend_tile& operator= (const legend_tile&); ~legend_tile(); legend_tile& map_by(const affine&); legend_tile& crop_to(const screen_mask&); legend_tile* clone() const; bool is_empty() const; std::string print_to(const format&, const std::string&) const; void add_to_palette() const; private: pair m_here; pair m_offset; epix_label_posn m_align; label_state m_style; pen_data m_item_border; double m_key_size; // dims of key boxes in pt double m_label_skip; // \hskip between box and item value std::list m_items; }; // end of class legend_tile } // end of namespace #endif /* EPIX_LEGEND_TILE */ epix-1.2.14/samples/0000755000175000017500000000000012334457372013214 5ustar hwanghwangepix-1.2.14/samples/S2_harmonics.xp0000644000175000017500000000351210700717116016103 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; double P_n(double z) { #ifdef Y20 return 0.5*(3*z*z - 1); #else // Y_3^0 return 0.5*z*(5*z*z - 3); #endif } double rho(double th, double phi) { return P_n(Sin(phi)); } P color(double x, double y) { return P(rho(x,y), 0, -rho(x,y)); } P orbital(double u, double v) { return sph(fabs(rho(u,v)), u, v); } int main() { picture(P(-1,-1), P(1,1.5), "4x5in"); begin(); backing(Black()); set_crop(); revolutions(); fill(); // back 3/4 domain Bk(P(0.25, -0.25), P(1, 0.25), mesh(24,96), mesh(48,96)); plain(RGB(1, 0.8, 0.2) *= 0.8); camera.at(sph(10, 0.06, 0.05)); // color-shaded surface surface(orbital, Bk, color); // draw boundary with "tube-like" green pen nofill(); plain(Green(1.6)); base(Green(0.6), "2pt"); plot(orbital, Bk.slice1(0.25)); plot(orbital, Bk.slice1(1)); // set color for axes and labels rgb(0.9,0.7,1); base(RGB(0.8, 0, 1), "1pt"); arrow(P(0,0,0), P(1,0,0)); arrow(P(0,0,0), P(0,0.75,0)); arrow(P(0,0,0), P(0,0,1.25)); label(P(1,0,0), P(-2,-2), "$x$", bl); label(P(0,0.75,0), P(4,-2), "$y$", r); label(P(0,0,1.25), P(0,4), "$z$", t); // "unset" base pen base(Neutral()); // inset graph of Legendre polynomial screen graph(P(-1,-1), P(1,1)); activate(graph); camera.at(P(0,0,10000)); plain(Green(0.6)); grid(P(-1,-1), P(1,1), 8, 8); bold(Yellow()); h_axis(8); v_axis(8); bold(Green()); plot(P_n, -1, 1, 60); font_size("footnotesize"); label_color(Green(0.6)); label_mask(RGB(1, 0.8,0.2)); #ifdef Y20 label(P(0,-1), P(0,-4), "$P(z)=\\frac{1}{2}(3z^2-1)$", b); #else // Y30 label(P(0,-1), P(0,-4), "$P(z)=\\frac{1}{2}(5z^2-3)$", b); #endif inset(P(-1,0.875), P(-0.375,1.5)); deactivate(graph); // a good habit, but not strictly necessary tikz_format(); end(); } epix-1.2.14/samples/lissajous.xp0000644000175000017500000000050710675520773015605 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; P f(double t) { return P(Sin(3*t), Sin(4*t)); } int main() { picture(P(-1,-1), P(1,1), "2 x 2in"); begin(); revolutions(); bold(Red()); plot(f, 0, 1, 200); arrow_inset(0.2); arrow_width(1.5); plain(Blue()); tan_field(f, 0, 1, 81); end(); } epix-1.2.14/samples/vfield.xp0000644000175000017500000000345310675525364015046 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; // A spatial vector field depending on three variables P F(double x, double y, double z) { return -0.25*P(0.5*x+y, 0.5*y-x, 1+z); } domain R(P(-1,-1,-1), P(1,1,1), mesh(6,6,4), mesh()); int main() { picture(P(-2,-2),P(2,2), "4x4in"); begin(); border(); label(P(0, ymax()), P(0,-4), "$F(x,y,z)=-(x+2y, y-2x, 1+z)$",b); camera.at(P(11,8,5)); // coordinate grids const int GRIDS(6); plain(Black(0.3)); grid(P(-1, -1,-1), P(-1, 1, 1), GRIDS, GRIDS); grid(P(-1, -1,-1), P( 1,-1, 1), GRIDS, GRIDS); grid(P(-1, -1,-1), P(1, 1, -1), GRIDS, GRIDS); // flow lines bold(); for (int i=0; i<12; ++i) { double t(M_PI_2+i*M_PI/6); pen(RGB(0.25*(3+Sin(t)), 0.25, 0.25*(3+Cos(t)))); ode_plot(F, cyl(1.4, t, 1), 0, 10, 60); } // draw arrows in plain black borderd by a white edge; // vectors will appear to hide vectors behind them plain(Black()); base(White(), "2pt"); // the field is drawn in successive slices x_3 = const #ifdef VECT vector_field(F, R, 0.75); // draw arrowheads at 75% of default size #else dart_field(F, R, 0.5); // draw darts at 50% of default length #endif const double DX(0.125); // label padding font_size("scriptsize"); degrees(); label_angle(30); // adjusted visually; could calculate from camera position label(P(1+DX, -1, -1), P(-4,-2), "$y=-1$", bl); label(P(1+DX, 0, -1), P(-4,-2), "$y=0$", bl); label(P(1+DX, 1, -1), P(-4,-2), "$y=1$", bl); label_angle(-15); label(P(-1, 1+DX, -1), P(4,0), "$x=-1$", br); label(P( 0, 1+DX, -1), P(4,0), "$x=0$", br); label(P( 1, 1+DX, -1), P(4,0), "$x=1$", br); label(P( 1, -1-DX, -1), P(-4,0), "$z=-1$", tl); label(P( 1, -1-DX, 0), P(-4,0), "$z=0$", tl); label(P( 1, -1-DX, 1), P(-4,0), "$z=1$", tl); end(); } epix-1.2.14/samples/hyperboloid.xp0000644000175000017500000000270010675363404016102 0ustar hwanghwang/* -*-ePiX-*- */ // A circular hyperboloid of one sheet and its two families of rulings #include "epix.h" using namespace ePiX; const int NUM_LINES(64); const double dt(1.0/NUM_LINES); int main() { picture(P(-3, -3), P(3, 3), "6x6in"); begin(); revolutions(); cam().at(20, 0, 5); clip_box(P(4, 4, 2)); fill(Black(0.8)); // hyperboloid surface_rev(sinh, cosh, domain(P(-2,0), P(2,1), mesh(24,36)), frame(E_3, E_2, E_1)); // clip to {x>0} clip_box(P(0, -4, -2), P(4, 4, 2)); // rulings for (int i=-0.5*NUM_LINES; i <= 0.5*NUM_LINES; ++i) { const double t(i*dt); rgb(0,0.5,1); Line(P(Cos(t), Sin(t), 0), P(Cos(t) + Sin(t), Sin(t) - Cos(t), 1)); red(); Line(P(Cos(t), Sin(t), 0), P(Cos(t) - Sin(t), Sin(t) + Cos(t), 1)); } // emphatic rulings bbold(RGB(0.1,0.6,0.9)); Line(P(1,0,0), P(1,-1,1)); pen(Red(1.2)); Line(P(1,0,0), P(1,1,1)); Line(P(0,1,0), P(-1,1,1)); clip_box(); // font_size("footnotesize"); black(); label(P(1,0,0)-P(0,-2,2), P(2,-2), "$\\ell_0^-$", br); label(P(1,0,0)+P(0, 2,2), P(18,2), "$\\ell_0^+$", t); label(P(0,1,0)-P(-2,0,2), P(0,-4), "$\\ell_{\\pi/2}^+$",b); label(P(0,0,-3), P(0,-24), "$\\ell_\\theta^-(t)=(\\cos\\theta, \\sin\\theta, 0) + t(\\sin\\theta, -\\cos\\theta, 1)$", b); label(P(0,0,-3), P(0,-12), "$\\ell_\\theta^+(t)=(\\cos\\theta, \\sin\\theta, 0) + t(-\\sin\\theta, \\cos\\theta, 1)$", b); pst_format(); end(); } epix-1.2.14/samples/histogram.xp0000644000175000017500000000313610663640746015567 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; // See binom.cc for instructions on creating data file binom.dat double erf(double x) { return 100*exp(-0.02*(x-50)*(x-50))/sqrt(50*M_PI); } int main() { picture(P(0,0),P(100,20), "6 x 6in"); begin(); grid(1,10); // read disk file data_file binom("binom.dat"); // create "bins" for bar chart data_bins db05(-0.5, 100.5, 101); // 5% biased coin data_bins db10(-0.5, 100.5, 101); // 10% data_bins db30(-0.5, 100.5, 101); // 30% data_bins db50(-0.5, 100.5, 101); // 50% db05.read(binom.column(1)); db10.read(binom.column(2)); db30.read(binom.column(3)); db50.read(binom.column(4)); legend L; fill(); gray(0.6); db05.bar_chart(100); L.fill_item("5\\%"); gray(0.4); db10.bar_chart(100); L.fill_item("10\\%"); gray(0.2); db30.bar_chart(100); L.fill_item("30\\%"); gray(0); db50.bar_chart(100); L.fill_item("50\\%"); nofill(); font_size("footnotesize"); tick_size(1); bottom_axis(10, P(0,-4), b).draw(); left_axis(10, P(-4,0), l).subdivide(2).draw(); bold(Red()); plot(erf, xmin(), xmax(), 240); L.path_item("Normal"); font_size("LARGE"); L.key_size(18); L.draw(P(50, 12.5), P(2,2), tr); font_face("sc"); label(P(0.5*(xmin()+xmax()), ymax()), P(0,12), "Tossing a Biased Coin, 100,000 Trials", t); font_size(); // reset to default label(P(0.5*(xmin()+xmax()), ymin()), P(0,-18), "Number of Heads (100 Tosses per Trial)", b); degrees(); label_angle(90); label(P(xmin(), 0.5*(ymin()+ymax())), P(-18,0), "Percentage of Trials", l); pst_format(); end(); } epix-1.2.14/samples/binom.cc0000644000175000017500000000124010643225006014610 0ustar hwanghwang#include #include // Generate pseudo-random outcomes of tossing a biased coin 100 times. // Compile with, e.g. // // g++ -o binom binom.cc && ./binom > binom.dat const int trials=100000; // amount of data to collect int flip(double wt=0.5) // 0 < wt < 1 { if (rand() < (1-wt)*RAND_MAX) return 0; else return 1; } void toss(unsigned int tosses, double wt=0.5) { int count=0; for (int i=0; i < tosses; ++i) count += flip(wt); std::cout << count << "\t"; } int main() { for (int j=0; j < trials; ++j) { toss(100, 0.05); toss(100, 0.1); toss(100, 0.3); toss(100); std::cout << "\n"; } } epix-1.2.14/samples/tori.xp0000644000175000017500000000214010675523666014545 0ustar hwanghwang/* -*-ePiX-*- */ /* tori.xp -- May 09, 2005 */ // compile tutorial torus meshes at once #include "epix.h" using namespace ePiX; // torus P F(double u, double v) { return polar(2.25+Cos(u), v) + P(0,0,Sin(u)); } int main() { picture(P(0,0), P(4,1), "6 x 1.5in"); begin(); domain R(P(0,0), P(1,1), mesh(12,30), mesh(24, 60)); revolutions(); camera.at(10,7,5); // unclipped/cropped screen scr1(P(-3,-3), P(3,3)); activate(scr1); fill(White()); surface(F, R); inset(P(0,0), P(1,1)); deactivate(scr1); // cropped screen scr2(P(-3,-3), P(3,3)); activate(scr2); set_crop(); border(); surface(F, R); inset(P(1.5,0), P(2.5,1)); deactivate(scr2); // clipped screen scr3(P(-3,-3), P(3,3)); activate(scr3); clip_box(P(3.5, 2, 1.5)); // box, sides layered manually nofill(); rect(P(-3.5, -2, -1.5), P(-3.5, 2, 1.5)); rect(P(-3.5, -2, -1.5), P( 3.5, -2, 1.5)); fill(); surface(F, R); nofill(); rect(P( 3.5, -2, -1.5), P( 3.5, 2, 1.5)); rect(P(-3.5, 2, -1.5), P( 3.5, 2, 1.5)); inset(P(3,0), P(4,1)); deactivate(scr3); pst_format(); end(); } epix-1.2.14/samples/decorate.xp0000644000175000017500000000460710675512306015355 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; /* * Compile with, e.g. elaps -DNORMAL --huge decorate.xp */ #define LINEFIELD // #define NORMAL const int N1(24); // latitudes const int N2(48); // longitudes const double du(1.0/N1); const double dv(1.0/N2); const P VIEWPT(6, 3, 4); const double r_0(0.95); // minor radius const double R_0(2); // major radius double g(double u) { return R_0 + r_0*Cos(u); } P F(double u, double v) { return polar(g(u), v) + P(0,0,r_0*Sin(u)); } namespace ePiX { // a facet-like class that can be drawn with extra decorations, e.g., // normal vectors, diagonals, orientation-dependent colors... class mesh_quad { private: P pt1, pt2, pt3, pt4, center; double distance; public: mesh_quad(P f(double u, double v), double u0, double v0) : pt1(f(u0,v0)), pt2(f(u0+du,v0)), pt3(f(u0+du,v0+dv)), pt4(f(u0,v0+dv)), center(0.25*(pt1 + pt2 + pt3 + pt4)), distance(norm(center-camera.viewpt())) { } double how_far() const { return distance; } void draw() const { P direction(center-camera.viewpt()); P normal((pt2 - pt1)*(pt4 - pt1)); normal *= 1/norm(normal); blue(0.75*(normal|(recip(distance)*direction))); #ifdef NORMAL if ((normal|direction) < 0) { plain(Green(0.6)); arrow(center, center-0.5*normal, 0.5); } #endif fill(); ePiX::quad(pt1, pt2, pt3, pt4); fill(false); #ifdef LINEFIELD if ((normal|direction) > 0) bbold(Blue(1.8)); else bold(Red()); line(pt1, 0.5*(pt3+pt4)); line(0.5*(pt1+pt2), pt3); #endif #ifdef NORMAL if ((normal|direction) > 0) { plain(Green(0.6)); arrow(center, center-0.5*normal, 0.5); } #endif } }; class by_distance { public: bool operator() (const mesh_quad& arg1, const mesh_quad& arg2) { return arg1.how_far() > arg2.how_far(); } }; } // end of namespace int main() { picture(P(-3,-3),P(3,3), "4x4in"); begin(); revolutions(); viewpoint(VIEWPT); camera.range(10); // chop off the front clip_face(P(R_0, 0, r_0), P(-0.25,-0.25,-1)); // build and draw a torus std::vector mesh; for (int i=0; i1 ? 1 : t); } double trunc(double t) { if (fabs(t) < 0.0001) t=0; return t; } namespace ePiX { class Spot { public: Spot(const Color& col, const P& loc) : m_tint(col), m_loc(loc) { } Color m_tint; P m_loc; }; class Fog { public: Fog(const Color& c, const double k) : m_tint(c), m_dens(k) { } Color apply_to(const Color& col, const double dist) const { Color me(m_tint); return me.blend(col, exp(-dist*m_dens)); } private: Color m_tint; double m_dens; }; // cf. facet class in facet.h class Chip { public: Chip(const P& p1, const P& p2, const P& p3, const P& p4, const double s, const Color& c) : pt1(p1), pt2(p2), pt3(p3), pt4(p4), m_shine(s), m_tint(c) { m_ctr = 0.25*(p1+p2+p3+p4); P n = (p2-p1)*(p4-p1); n *= recip(norm(n)); m_perp=n; } double how_far() const { return norm(camera.viewpt()-m_ctr); } void draw(const ePiX::Fog& fog, const ePiX::Spot& spot, const ePiX::Color& ambient) const { fill(appearance(camera.viewpt(), fog, spot, ambient)); ePiX::quad(pt1, pt2, pt3, pt4); } private: P pt1, pt2, pt3, pt4; // vertices double m_shine; // shininess Color m_tint; // out color P m_ctr; // our location P m_perp; // unit normal Color appearance(const P& viewer, const Fog& fog, const Spot& spot, Color ambient) const { P spot_dir(spot.m_loc - m_ctr); double spot_dist(norm(spot_dir)); spot_dir *= recip(spot_dist); P view_dir(viewer - m_ctr); double view_dist(norm(view_dir)); view_dir *= recip(view_dist); // calculate relative intensities //double I_ambt = pow((m_perp|view_dir), 2); // cos^2 of normal angle double I_ambt(fabs(m_perp|view_dir)); // |cos| of normal angle // crude but fairly effective //double I_spot = 0.5*(1+((spot_dir*m_perp)|(m_perp*view_dir))); // reflect spot_dir across m_perp in the plane they span, // then take (cos(angle to viewer)^4) P refl_dir(-spot_dir + 2*(spot_dir|m_perp)*m_perp); double I_spot(pow((refl_dir|view_dir), 2)); // light from spot that reaches our location and is reflected to viewer Color spot_refl(I_spot*(fog.apply_to(spot.m_tint, spot_dist))); // not shiny -> reflect mostly ambient Color refl(I_ambt*ambient.blend(spot_refl, m_shine)); // Color we reflect toward viewer Color source(m_tint.filter(refl)); return fog.apply_to(source, view_dist); } }; class chip_distance { public: bool operator() (const Chip& arg1, const Chip& arg2) { return arg1.how_far() > arg2.how_far(); } }; } // end of namespace epix-1.2.14/samples/dataplot.xp0000644000175000017500000000227710675511313015375 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; P F(double x, double y) { return P((x-y)*(x+y), 2*x*y); } int main() { picture(P(-1,0),P(1,20), "6x6in"); begin(); // create a 2-column data file with 121 rows data_file DF(Cos, Sin, 0, M_PI, 120); legend L; plain(Black()); fill(Blue(1.8)); // act on first two columns; result doubles angles DF.transform(F); data_bins db(-1.05, 1.05, 21); // bins centered on -1, -0.9, ..., 0.9, 1 db.read(DF.column(1)); // read col1 db.bar_chart(db.pop()); // and plot, scaling to population L.fill_item("Population count"); // add a filled legend item label_color(Blue(1.2)); v_axis_labels(P(xmin(), ymin()), P(xmin(), ymax()), 0.5*ysize(), P(-4,0), l); // superimpose plot of raw data screen raw(P(-1,-1), P(1,1)); activate(raw); label_color(Red()); DF.plot(DDOT); // scatter plot L.mark_item(DDOT, "Data points"); nofill(); plain(Black(0.3)); grid(1,10); v_axis_labels(P(1,-1), P(1,1), 4, P(4,0), r); // DF.write("circle.dat"); // write to a disk file inset(P(-1,0), P(1,20)); deactivate(raw); // polite but unnecessary L.draw(canvas().c(), P(0,0), c); pst_format(); end(); } epix-1.2.14/samples/sqrt2.xp0000644000175000017500000000237010675304446014641 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; // MAX^2 = radius of plot const double MAX(1.5); // complex square root in polar coordinates P f(double u, double v) { return P(u*u*Cos(v), u*u*Sin(v), u*Cos(0.5*v)); } // restrictions of sqrt to real axis, unit circle P sqrt_re(double t) { return f(t,0); } P sqrt_im(double t) { return f(1,t); } int main() { picture(P(-4, -4), P(4, 2), "4x3in"); begin(); camera.filter(RGB_Neutral()); backing(Magenta(0.1)); set_crop(); revolutions(); label(P(xmin(), ymax()), P(2,-2), "Branches of $\\sqrt{z}$", br); camera.at(6, -2, 2); camera.range(4); domain R(P(0,0), P(MAX,2), mesh(16, 80), mesh(16, 160)); // transparent branch pen(Green(0.7), "0.15pt"); scenery surf(f, R.resize2(1,2)); fill(White(0.7)); pen(Black()); // opaque branch surf.add(f, R.resize2(0,1)); surf.draw(); nofill(); // boundary curve, unit circle, axes, grid, labels bbold(Red()); plot(sqrt_re, -MAX, 0, 30); bold(Blue()); arrow(P(0,0,0), P(2,0,0)); arrow(P(0,0,0), P(0,2,0)); label_color(Blue()); label(P(2,0,0), P(0,-4), "$\\mathrm{Re}\\,z$", b); label(P(0,2,0), P(4, 0), "$\\mathrm{Im}\\,z$", r); bbold(Yellow()); plot(sqrt_re, 0, MAX, 30); pst_format(); end(); } epix-1.2.14/samples/std_F.cc0000644000175000017500000000706610675475206014575 0ustar hwanghwang/* * std_F.cc -- The std_F class definitions * * Last Change: September 23, 2007 */ // Include only the headers we need; burdensome, but generally more // efficient for larger projects with many dependencies. #ifdef MINIMAL #include "epix/affine.h" #include "epix/Color.h" #include "epix/curves.h" #include "epix/pairs.h" #include "epix/path.h" #include "epix/state.h" #include "epix/triples.h" #else #include "epix.h" #endif #include "epix/paint_style.h" #include "std_F.h" namespace ePiX { // The constructor initializes the class data, ensuring objects are // well-formed. For efficiency, we use "initialization" instead of // assignment (the "=" operator); this way, data members get their // actual values immediately. The constructor body is empty, since // this class requires no further initialization. // All class member function definitions must be qualified with the // class name, here "std_F::" std_F::std_F() : m_loc(0,0), m_e1(1,0), m_e2(0,1), m_fore(Black()), m_back(White()), m_edge(Black()), m_edge_width(0.4) { } // Apply the affine map af; return a reference to this object so // calls can be daisy-chained. Note the efficiency of storing only // the bare minimum data to specify an affine map rather than // holding and manipulating the shape of an F. std_F& std_F::map_by(const affine& af) { m_loc = af(m_loc); // affines map locations, so this works m_e1 = af(m_e1); m_e2 = af(m_e2); return *this; } // Set the background and foreground colors. Arguments' names chosen // to indicate their purpose. std_F& std_F::backing(const Color& back) { m_back = back; return *this; } std_F& std_F::fill(const Color& fore) { m_fore = fore; return *this; } // Set outline parameters. std_F& std_F::border(const Color& edge, double wid) { m_edge = edge; m_edge_width = wid; return *this; } // Draw in the active screen. Most of the "real work" is done here. void std_F::draw() const { // Get global drawing state, so we can restore before returning. // Not particularly elegant, but it's what we have to work with. Color old_fill(the_paint_style().fill_color()); bool old_flag(the_paint_style().fill_flag()); Color old_line(the_paint_style().line_color()); length old_line_width(the_paint_style().line_width()); // now we can draw const double r(1.0/6.0); path F; // pr converts coords in [0,1] x [0,1] to our coords F .pt(pr(r, 0.75*r)).pt(pr(2*r, 0.75*r)).pt(pr(2*r, 2.25*r)) .pt(pr(4*r, 2.25*r)).pt(pr(4*r, 3.25*r)).pt(pr(2*r, 3.25*r)) .pt(pr(2*r, 4.25*r)).pt(pr(5*r, 4.25*r)).pt(pr(5*r, 5.25*r)) .pt(pr( r, 5.25*r)); F.close().fill(); // Set global drawing state. We have a member function named fill, // so the call must be explicitly qualified with "ePiX::". ePiX::fill(m_back); ePiX::pen(m_edge, m_edge_width); // Bounding parallelogram ePiX::quad(pr(0,0), pr(1,0), pr(1,1), pr(0,1)); ePiX::fill(m_fore); F.draw(); // Restore global fill state. the_paint_style().fill_color(old_fill); the_paint_style().fill_flag(old_flag); the_paint_style().line_color(old_line); the_paint_style().line_width(old_line_width); } // private; convert (x,y) to a location usable in path construction // "Privacy" is enforced by the compiler from reading the header; // the definition requires no special syntax. P std_F::pr(double x, double y) const { pair loc((1 - x -y)*m_loc + x*m_e1 + y*m_e2); return P(loc.x1(), loc.x2()); } } // end of namespace epix-1.2.14/samples/shadeplot.xp0000644000175000017500000000220410661625147015544 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; double k(4); // change width of hump double dx(0.05); // width of thin shaded region double x(1/sqrt(k)); // position of thin shaded region const double dy(0.5); double f(double t) { return sqrt(fabs(k)/(2*M_PI))*exp(-k*t*t); } P pt1(x, f(x)+2*dy); P pt2(x+dx,f(x)+dy); P pt3(x+3*dx,f(x)); Color shade1(Black(0.1)); Color shade2(Black(0.4)); Color shade3(Black(0.6)); int main() { picture(P(0,0), P(1,1), "150x150pt"); begin(); legend L; L.backing(Neutral()); fill(shade1); shadeplot(f, xmin(), x, 90); L.fill_item("$=\\displaystyle\\int_a^x f(t)\\,dt$"); fill(shade2); rect(P(x,0), P(x+dx, f(x))); L.fill_item("= $f(x)\\,dx\\vphantom{\\Bigg|}$"); fill(shade3); shadeplot(f, x, x+dx, 10); L.fill_item("= $F(x+dx)-F(x)$"); bold(); plot(f, xmin(), xmax(), 120); plain(); h_axis(4); v_axis(4); font_size("scriptsize"); L.draw(canvas().tr(), P(-2,-2), bl); font_size("footnotesize"); label(P(xmin(),0), P(0,-5), "$a$", b); label(P(x,0), P(0,-5), "$x$", b); label(P(x+dx,0), P(0,-2), "$x+dx$", br); pst_format(); end(); } epix-1.2.14/samples/std_F.h0000644000175000017500000000430110675474616014430 0ustar hwanghwang/* * std_F.h -- A class to draw the action of an affine transformation. * * This file is a C++ class tutorial (illustrating basic features), as * well as sample code for a small library, and style guide to writing * external modules for ePiX. * * Last Change: September 23, 2007 */ /* * This file provides the "std_F" class, which draws the image of an "F" * (the first roman letter having no symmetries) under an affine map. * * std_F(); // An F in the unit square [0,1] x [0,1]. * map_by(af); // Apply the affine map af * * // Set the background, foreground, border style * backing(color); * fill(folor); * border(color, width); * * draw(); // Draw in the active screen * * The file affine.xp illustrates use. */ // "MINIMAL" compilation works, and entails fewer dependencies, // but places a larger burdern on the programer #ifdef MINIMAL #include "epix/pairs.h" #include "epix/Color.h" #else #include "epix.h" #endif namespace ePiX { // forward declarations if we don't include epix.h #ifdef MINIMAL class affine; class P; #endif // declare a new class "std_F" class std_F { // The "public" part of a class declaration specifies the interface: public: // A "constructor"; creates the standard F in the unit square std_F(); // apply the affine map af; return a reference to this object so // calls can be daisy-chained std_F& map_by(const affine& af); // set the background and foreground colors std_F& backing(const Color&); std_F& fill(const Color&); // set outline pen std_F& border(const Color&, double); void draw() const; // draw in the active screen // The private section contains implementation data, etc. The // shape of the F is not stored in the class data, but generated // at runtime by draw(). private: pair m_loc; // lower left corner pair m_e1; // lower right corner pair m_e2; // upper left corner Color m_fore; Color m_back; Color m_edge; double m_edge_width; // for internal use; convert (x,y) in [0,1] x [0,1] to a location P pr(double x, double y) const; }; // end of std_F; class declarations must end with a semicolon } // end of namespace epix-1.2.14/samples/stereo_proj.flx0000644000175000017500000000357010707511126016255 0ustar hwanghwang/* -*-flix-*- */ /* * Depicts the "shadow" in C of a hemisphere rotating about the real * axis. To avoid drawing a frame where the boundary passes through * the point at infinity, compile with an odd number of frames. To * make the north pole wink obnoxiously like an aircraft safety light, * compile with -DPULSE. */ #include "epix.h" using namespace ePiX; void circ(double t) { if (std::isnan(t)) // fallback, doesn't fill properly line(P(-2,0), P(2,0)); else circle(P(0, t), sqrt(1+t*t)); } P f(double u, double v) { P tmp(sph(1, u, v)); return P(tmp.x3(), tmp.x1(), tmp.x2()); } domain R(P(0,-M_PI_2), P(4*M_PI,M_PI_2), mesh(144,48)); int main(int argc, char* argv[]) { if (argc == 3) { char* arg; double temp1(strtod(argv[1], &arg)), temp2(strtod(argv[2], &arg)); tix()=temp1/temp2; } picture(P(-2,-2), P(2,2), "6 x 6in"); begin(); camera.at(P(4,-6,3)); border(); set_crop(); // disk plain(Black()); fill(Black(0.3)); if (0.25 <= tix() && tix() <= 0.75) { rect(P(-100,-100), P(100,100)); fill(White()); } circ(Tan(2*M_PI*tix())); dot(P(-1,0), P(4,-2), "$-1$", br); clip_face(P(0,0,0), E_3); plain(Black(0.45)); // light purple fill(RGB(0.9,0.7,1)); if (tix() < 0.5) { // ordering is viewpoint-dependent surface(f, R.resize1(M_PI*(1+2*tix()), 2*M_PI*(1+tix()))); plot(f, R.resize1(2*M_PI*tix(), M_PI*(1+2*tix()))); } else { plot(f, R.resize1(2*M_PI*tix(), M_PI*(1+2*tix()))); surface(f, R.resize1(M_PI*(1+2*tix()), 2*M_PI*(1+tix()))); } dot(P(1,0), P(2,-2), "$1$", br); label(P(0,0,1), P(0,8), "$\\infty$", t); // Winking marker #ifdef PULSE rgb(1, 0.7+0.3*(1+Sin(12*M_PI*tix())), 0.2); dot_size(3+2*Sin(12*M_PI*tix())); spot(P(0,0,1)); red(); ring(P(0,0,1)); #else dot(P(0,0,1)); #endif pst_format(); end(); } epix-1.2.14/samples/mirrorball.flx0000644000175000017500000000321610675304446016075 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; const double r_0(1); //0.75; const double golden(0.5*(1+sqrt(5))); Sphere S0(P(0,0,0), sqrt(3)); Sphere S1(P( 1, golden, 0), r_0); Sphere S2(P(-1, golden, 0), r_0); Sphere S3(P( 1,-golden, 0), r_0); Sphere S4(P(-1,-golden, 0), r_0); Sphere S5(P( 0, 1, golden), r_0); Sphere S6(P( 0,-1, golden), r_0); Sphere S7(P( 0, 1,-golden), r_0); Sphere S8(P( 0,-1,-golden), r_0); Sphere S9(P( golden, 0, 1), r_0); Sphere Sa(P( golden, 0,-1), r_0); Sphere Sb(P(-golden, 0, 1), r_0); Sphere Sc(P(-golden, 0,-1), r_0); Circle C1(S0*S1); Circle C2(S0*S2); Circle C3(S0*S3); Circle C4(S0*S4); Circle C5(S0*S5); Circle C6(S0*S6); Circle C7(S0*S7); Circle C8(S0*S8); Circle C9(S0*S9); Circle Ca(S0*Sa); Circle Cb(S0*Sb); Circle Cc(S0*Sc); // bold circle if facing camera, otherwise plain void sphere_draw(const Circle& C) { if ((C.center()|camera.viewpt()) >= 0) bold(); else plain(); C.draw(); } void icosa() { // S0.draw(); sphere_draw(C1); sphere_draw(C2); sphere_draw(C3); sphere_draw(C4); sphere_draw(C5); sphere_draw(C6); sphere_draw(C7); sphere_draw(C8); sphere_draw(C9); sphere_draw(Ca); sphere_draw(Cb); sphere_draw(Cc); } int main(int argc, char* argv[]) { if (argc == 3) { char* arg; double temp1, temp2; temp1=strtod(argv[1], &arg); temp2=strtod(argv[2], &arg); tix()=temp1/temp2; } picture(P(-2,-2),P(2,2), "6x6in"); begin(); set_crop(); revolutions(); // draw frames camera.at(sph(12, 0.5*tix(), 0.05)); red(-1.4); // nearly cyan icosa(); camera.at(sph(12, 0.01+0.5*tix(), 0.05)); red(1.4); icosa(); end(); } epix-1.2.14/samples/uppersum.xp0000644000175000017500000000110110675524653015441 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; const int N(12); // Number of rectangles // gather references to integrand double f(double t) { return Sin(t); } int main() { picture(P(0,0), P(3,1), "3x1in"); begin(); const double dx(xsize()/N); riemann_sum(f, xmin(), xmax(), N, UPPER); fill(Black(0.1)); riemann_sum(f, xmin(), xmax(), N, LOWER); nofill(); h_axis(xsize()); v_axis(2*ysize()); h_axis_labels(xsize(), P(0,-4), b); label(P(2, f(2)), P(4,2), "$y=\\sin x$", tr); bold(Blue()); plot(f, xmin(), xmax(), 40); end(); } epix-1.2.14/samples/spherical.xp0000644000175000017500000000315110676072602015533 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; const double MAX(3); int main() { picture(P(-MAX,-MAX),P(MAX,MAX), "6x6in"); begin(); camera.at(30,5,20); #ifdef GRAY camera.filter(Gray_Neutral()); #endif revolutions(); domain R(P(0,0,-0.25), P(3,1,0.25), mesh(12, 48, 24), mesh(12, 96, 120)); std::list cuts; double Phi(7.0/48), Theta(7.0/48); cuts.push_back(R.slice1(2)); cuts.push_back(R.slice2(0)); cuts.push_back(R.slice2(Theta)); cuts.push_back(R.slice3(0)); cuts.push_back(R.slice3(Phi)); plain(Black(0.5)); fill(Red(1.9)); scenery coords(sph, R.slice1(2)); // rho = 2 fill(Yellow(0.35)); coords.add(sph, R.slice2(0)).add(sph, R.slice2(Theta)); // theta = 0, Theta fill(Blue(1.9)); coords.add(sph, R.slice3(0)).add(sph, R.slice3(Phi)); // phi = 0, Phi coords.draw(); // surface(sph, cuts); fill(false); pen(Black()); base(White(), "1.2pt"); arrow_fill(1); arrow(P(3,0,0), P(3.5,0,0)); label(P(3.5,0,0), P(-2,-2), "$x$", bl); arrow(P(0,3,0), P(0,3.5,0)); label(P(0,3.5,0), P(2,-2), "$y$", br); arrow(P(0,0,3), P(0,0,3.5)); label(P(0,0,3.5), P(0,4), "$z$", t); bold(); arc_arrow(P(0,0,0), 2, 0.5*Theta, Theta); arc_arrow(P(0,0,0), 2, 0.5*Theta, 0); aarrow(P(0,0,0), sph(2, Theta, Phi)); label(sph(2, 0.5*Theta, 0), P(2,2), "$\\theta$", t); label(sph(2, Theta, 0.5*Phi), P(-2,0), "$\\phi$", l); label(sph(1, Theta, Phi), P(2,-2), "$\\rho$", br); base(Neutral(), 0); dashed(); plain(); line(P(0,0,0), P(2,0,0)); line(P(0,0,0), sph(2, Theta, 0)); line(P(0,0,0), sph(2, Theta, Phi)); pst_format(); end(); } epix-1.2.14/samples/README0000644000175000017500000001334310707506422014071 0ustar hwanghwangePiX -- samples/README Last Change: October 23, 2007 This directory contains sample files. Files with extension ".flx" may be compiled like xp files with epix or elaps, or converted to gif or mng animations with flix. artifacts.xp Interaction between coarse and fine meshes in shade surface plotting. binom.cc: Generates pseudo-random data for histogram.xp bowl.xp: Quasi-realistic colored surface shading. butterfly.xp: A Thom catastrophe graph. calculus.xp: Plotting derivatives and definite integrals. clipping.xp: Clipping, shaded surfaces, and fake transparency. color_sep.xp: Color separation. conic.xp: Envelopes and tangent lines; projective equivalence of a parabola with a circle. contour.xp: Building a path from sub-paths. coord_tricks.xp: Using page layout to achieve broken axes. cropplot.xp Graphing functions with singularities. cube.flx: Stereoscopic (3-D glasses) movie of a rotating cube. dataplot.xp: Scatter plots, histograms, and page layout. decorate.xp: Decorated shaded surface (see file for compiling). demoivre.xp: Loops; a geometric proof of deMoivre's formula. densityplot.xp: A gray-shaded interference pattern. dipole.xp: Plotting flow lines and isobars. denom.xp: Loops and gcd; Thomae's function with discontinuity set Q. extract.xp: A magnified inset using screen::extract; an unexpected tangent line. geomsum.xp: Loops and color filling. golden_rect.xp: Simple use of variables; constructing a golden rectangle. helicoid.flx: Isometric deformation of a catenoid to a helicoid. hello.xp: My First Figure, from the manual. histogram.xp: Histograms of simulated coin tosses (data from binom.cc). house.flx: Color semantics; sun setting on a simple house. hyperboloid.xp: Clipping, shaded surfaces; two families of rulings on a hyperboloid. inverse.xp: Screen affine operations; inverse functions. koch.xp: The von Koch snowflake fractal. label_debug.xp: Format debugging tests for labels, draws 32 attribute combinations. layout2.xp: Page layout; flow lines of a planar vector field. layout.xp: Page layout; six views of the square root Riemann surface. legend.xp: Axes and legends; Taylor polynomials of sin x. levelset.xp: Clipping and plotting; manual level curves on a saddle. levelset2.xp: "Advanced" clipping; level bands on a monkey saddle. levelset3.xp: Clipping and legends; flat-shaded level bands wth matching legend. lissajous.xp: A Lissajous figure with arrows. lighting.h: Classes for lighting effects and color-shaded surfaces. (lighting.flx illustrates use.) line_debug.xp: Format debugging tests for paths, draws 32 attribute combinations. log.xp: Object hiding with paths and surfaces; the Riemann surface of log. lorenz.xp: Page layout, ode_plot; the Lorenz attractor and its 3-D vector field. medians.xp: Euclidean geometry; medians and altitudes of a triangle. minkowski.xp: A longitudinal slice of Minkowski space R^{2,1}. mirrorball.flx: The circle class and intersections; 3-D stereographic movie. newton.xp: Loops; root location by Newton's method. objects.xp: Simple geometric objects; 2-D landscape. oscillator.xp: Graphing, user-defined elements, and page layout. parabola.xp: A basic plot. pascal.xp: Intersection operators; Pascal's theorem in projective geometry. pendulum.flx: Phase diagram of an undamped pendulum. planes.xp: Manipulating objects, clipping; a stack of plane sections of a cube. plotting2.xp: Surface plotting in PSTricks; from the manual. plotting3.xp: Loops and color control; from the manual. plotting.xp: A basic plot; from the manual. polar.xp: Polar plotting. pole.xp: Clipping a plot; the real part of a first-order pole. polyhedra.xp: Spherical regular polyhedra. Compilation controlled with pre-processor flags, e.g., "epix -DCOLOR -DDODECA polyhedra.xp". R_demo.xp: Gaussians from the R demo. riemann.flx: Rotating the Riemann surface of sqrt(z) in R^4. S2_harmonics.xp: Domain-dependent surface shading (color function depends on two variables), page layout; the spherical harmonic Y_3^0. (Compile with "epix -DY20 S2_harmonics.xp" for Y_2^0.) saddle.xp: A quadratic saddle using "surface" capabilities. semicirc.xp: A simple figure using variables and a function for organization. shadeplot.xp: Shading regions enclosed by graphs; the fundamental theorem of calculus. slopefield.xp: A slope field and flow lines. sphere.xp: Plotting curves and latitudes/longitudes; loxodromes. spherical.xp: Scenery (multiple shaded surfaces); spherical coordinates. sqrt.xp: Domains and selective plotting; the Riemann surface of sqrt(z). sqrt2.xp: Domains, selective plotting, and change of style in a single plot. std_F.cc, std_F.h: Extensively-commented library code for depicting 2-D affine maps. std_F.xp: Sample file illustrating the use of external libraries. Contains instructions on building a library from std_F.cc. steiner.flx: Steiner's Roman surface, rotating. steiner2.flx: Steiner's Roman surface sliced, with slice direction rotating. stereo_proj.flx: The image of a rotating half-sphere under stereographic projection. surface_shade.xp: Position-dependent surface shading. (Color function depends on three variables.) symmetries.xp: Affine maps and layout; the symmetry group S_3 acting on a regular hexagon. tori.xp: Clipping and cropping, page layout. torus.xp: Domains and selective plotting. trig.flx: Trigonometric functions. twisted_cubic.xp: Page layout; a crossed-eyes stereogram of the twisted cubic. uppersum.xp: Riemann sums. vfield.xp: 3-D vector field plotting. weierstrass.xp: Loops; a Weierstrass nowhere-differentiable function. wheel.xp: Page layout; a cycloid at successive times. epix-1.2.14/samples/R_demo.xp0000644000175000017500000000251410675522740014772 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; const double mult(1.0/sqrt(M_PI)); double f(double x) { return 0.4*exp(-mult*x*x); } double g(double x) { return f(x-3); } double PAD_X(0.4), PAD_Y(0.01); int main() { picture(P(-3-PAD_X, -PAD_Y), P(8+PAD_X, 0.4+PAD_Y), "5 x 3.5in"); begin(); border(); legend L; L.border(0); fill(Black(0.2)); shadeplot(g, 1.96, xmax(), 120); L.fill_item("$P(|Z|>1.96, H_1) = 0.85$"); fill(Black(0.8)); shadeplot(f, xmin(), -1.96, 20); shadeplot(f, 1.96, 4, 40); L.fill_item("$P(|Z|>1.96, H_0) = 0.05$"); plot(f, xmin(), xmax(), 240); plot(g, xmin(), xmax(), 240); font_size("scriptsize"); L.draw(P(4,0.35), P(0,0), tr); label(P(0, 0.15), P(0,2), "$H_0$: $\\mu_1=\\mu_2$", t); label(P(2, 0.15), P(2,2), "$H_1$: $\\mu_1=\\mu_2+\\delta$", tr); font_size("footnotesize"); axis Ax(P(-2, ymin()), P(8, ymin()), 5, P(0,-8), b); Ax.align(b).draw(); label(P(2, ymin()), P(0,-18), "$Z=\\displaystyle\\frac{\\mu_1-\\mu_2}{\\sigma/\\sqrt{\\pi}}$", b); degrees(); label_angle(90); #ifdef OLD_GCC axis Ay(P(-3.4, 0), P(xmin(), 0.4), 4, P(-8,0), l); #else // may not compile under gcc <= 3.3 axis Ay(P(xmin(), 0), P(xmin(), 0.4), 4, P(-8,0), l); #endif Ay.align(l).draw(); label(P(xmin(), 0.2), P(-18,0), "Density", l); pst_format(); end(); } epix-1.2.14/samples/log.xp0000644000175000017500000001344410643225006014340 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; // October 28, 2006 // // This file depicts two sheets of the Riemann surface of log, together // with the log function over the unit circle. Surface and path elements // must be drawn together. However, path-like mesh elements must be drawn // after surface elements that lie at the same location in the scene, // since otherwise surface elements' edges occlude the path. // // A mesh_elt class stores the necessary P data as well as a flag marking // the element as a segment or a surface patch. Elements are stored in a // std::vector (global to the scene) and sorted by distance. To ensure that // surface patches are printed first, their true distance is increased by a // "fudge" amount (0.25), making the By_distance class see them as farther // than they really are. // // Path elements are drawn in green; surface patches are shaded gray // according to the angle between the incoming light (from a point source) // and the surface normal. // // Surface patches are drawn as octagons to make the mesh appear smoother // than a quadrilateral mesh. The vertices of a patch are the images of the // corners and midpoints of a coordinate quadrilateral, "retracted" inward // by a small "gap" EPS (possibly zero). A positive gap simulates surface // transparency. // // (u,v+dv) (u+0.5*du,v+dv) (u+du,v+dv) // +----------------------+-----------------------+ // | *--------------------*---------------------* | // | | | | // | | | | // | | | | // + * (u+EPS,v+0.5*dv) * + (u+du,v+0.5*dv) // | | | | // | | | | // | | (u+EPS,v+EPS) | | // | *--------------------*---------------------* | // +----------------------+-----------------------+ // (u,v) (u+0.5*du,v) (u+du,v) const P LIGHT(2, 2, 0); // location of light, for shading const P VIEWPT(15,-10,6); // surface and path mesh fineness const int N1(18); const int N2(80); const int N3(120); const double du(4.5/N1); const double dv(6.0/N2); const double dt(4.0/N3); // "gap size" between surface mesh elements const double EPS(0); // (0.002); // visual styles void path_color() { green(0.8); } void label_color() { yellow(0.5); } void dot_color() { red(); } void path_width() { pen(1.5); } // class can represent either a surface element or a path element class mesh_elt { private: P pt1, pt2, pt3, pt4, pt5, pt6, pt7, pt8, center; double fudge; // artificial increment to distance static bool last_was_seg; bool is_segment; public: double how_far() const { return fudge + norm(center - camera.viewpt()); } mesh_elt(P f(double u, double v), double u0, double v0) : pt1(f(u0+EPS,v0+EPS)), pt2(f(u0+0.5*du,v0+EPS)), pt3(f(u0+du-EPS,v0+EPS)), pt4(f(u0+du-EPS,v0+0.5*dv)), pt5(f(u0+du-EPS,v0+dv-EPS)), pt6(f(u0+0.5*du,v0+dv-EPS)), pt7(f(u0+EPS,v0+dv-EPS)), pt8(f(u0+EPS,v0+0.5*dv)), center(0.25*(pt1 + (pt3 + (pt5 + pt7)))), fudge(0.25), is_segment(false) { } mesh_elt(P f(double), double t0) : pt1(f(t0)), pt2(f(t0+0.25*dt)), pt3(f(t0+0.5*dt)), pt4(f(t0+0.75*dt)), pt5(f(t0+dt)), pt6(), pt7(), pt8(), center(0.333*(pt1 + (pt3 + pt5))), fudge(0), is_segment(true) { } void draw() const { if (!is_segment) { P normal((pt2 - pt1)*(pt4 - pt1)); normal *= 1/norm(normal); double dens(0.5*(1-((normal|LIGHT)/norm(LIGHT)))); if (mesh_elt::last_was_seg) { mesh_elt::last_was_seg=false; plain(); // reset pen width } black(); gray(dens); std::vector

bd; bd.push_back(pt1); bd.push_back(pt2); bd.push_back(pt3); bd.push_back(pt4); bd.push_back(pt5); bd.push_back(pt6); bd.push_back(pt7); bd.push_back(pt8); path temp(bd, true, true); // closed and filled temp.draw(); } else { // segment if (!mesh_elt::last_was_seg) { mesh_elt::last_was_seg=true; path_width(); path_color(); } std::vector

bd; bd.push_back(pt1); bd.push_back(pt2); bd.push_back(pt3); bd.push_back(pt4); bd.push_back(pt5); path temp(bd, false, false); temp.draw(); } } // end of mesh_elt::draw() }; // end of class mesh_elt // initialize static data bool mesh_elt::last_was_seg = false; class By_distance { public: bool operator() (const mesh_elt arg1, const mesh_elt arg2) { return (arg1.how_far()) > (arg2.how_far()); } }; // the maps to be plotted P C_log(double u, double v) { return polar(exp(u), M_PI*v) + P(0, 0, u+M_PI*v); } P C_log1(double t) { return C_log(0,t); } int main() { bounding_box(P(-6, -12),P(6,12)); unitlength("1in"); picture(P(4,8)); begin(); fill(); degrees(); // label_angle(90); label(P(0, ymin()), P(0,4), "$z=\\mathrm{Re}\\,\\log(x+iy) + \\mathrm{Im}\\,\\log(x+iy)$", t); radians(); // label_angle(0); viewpoint(VIEWPT); camera.range(20); std::vector mesh_data; // surface elements for (int i=0; i=0) return P(r*cosh(u), r*sinh(u), k*v); else return P(-r*sinh(u), -r*cosh(u), k*v); } P Fm(double u, double v) { double r(sqrt(fabs(v))); if (v>=0) return P(-r*cosh(u), r*sinh(u), k*v); else return P(-r*sinh(u), r*cosh(u), k*v); } double f(double x, double y) { return k*(x-y)*(x+y); } int main() { picture(P(-MAX,-MAX), P(MAX, MAX), "2x2in"); begin(); camera.at(P(1,-3,5)); camera.range(40); clip_box(P(MAX,MAX,2*MAX)); clip(); red(); plot(f, P(-MAX,-MAX), P(MAX, MAX), mesh(4,4), mesh(40,40)); domain R(P(-4,-9), P(4,9), mesh(1,12), mesh(90,1)); bold(); rgb(0.5,0.5,1); line(P(MAX,-MAX,0), P(-MAX, MAX,0)); line(P(MAX, MAX,0), P(-MAX,-MAX,0)); plot(Fp, R.slices2()); plot(Fm, R.slices2()); end(); } epix-1.2.14/samples/Makefile.in0000644000175000017500000002575012334457372015272 0ustar hwanghwang# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am for ePiX v1.x "samples" directory # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = samples DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(docdir)" DATA = $(doc_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASH_PATH = @BASH_PATH@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ RUNTIME_COMPILER = @RUNTIME_COMPILER@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ XPS = $(wildcard *.xp) FLX = $(wildcard *.flx) CLEANFILES = *~ *.eepic *.eps sample_src.tar sample_src.tar.gz sample-stamp doc_DATA = sample_src.tar.gz all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu samples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu samples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-docDATA: $(doc_DATA) @$(NORMAL_INSTALL) test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-docDATA: @$(NORMAL_UNINSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(docdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(docdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-docDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-docDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-docDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-docDATA # tar up tex, xp, and eepic files sample-stamp: $(XPS) $(FLX) touch sample-stamp sample_src.tar.gz: sample-stamp tar -cf sample_src.tar $(XPS) $(FLX) \ README binom.cc lighting.h std_F.cc std_F.h gzip -9 sample_src.tar # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: epix-1.2.14/samples/riemann.flx0000644000175000017500000000243710643760116015360 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; P F(double t, double r, double theta) { return P(r*r*Cos(2*theta), r*r*Cos(t)*Sin(2*theta) + r*Sin(t)*Sin(theta), r*Cos(theta)); } domain R(P(0,0,0), P(1, 1.5, 1), mesh(24, 8, 32), mesh(24, 40, 80)); int main(int argc, char* argv[]) { if (argc == 3) { char* arg; double temp1, temp2; temp1=strtod(argv[1], &arg); temp2=strtod(argv[2], &arg); tix()=temp1/temp2; } domain R1(R.slice1(tix())); picture(P(-4,-4),P(4,4), "5x5in"); begin(); revolutions(); grid(1,1); const P ctr(3.25,-3.25); // "clock" center bold(); circle(ctr, 0.5); // clock face line(ctr, ctr+polar(0.4, tix())); // hands label(ctr+polar(0.6, tix()), "$y$"); line(ctr, ctr+polar(0.4, tix()+0.25)); label(ctr+polar(0.6, tix()+0.25), "$w$"); viewpoint(4,5,3); camera.range(20); line(P(0,0,0), P(3,0,0)); line(P(0,0,0), P(0,3,0)); line(P(0,0,0), P(0,0,2)); plain(Red()); plot(F, R1.resize3(0, 0.5)); blue(); plot(F, R1.resize3(0.5, 1)); bold(Magenta()); plot(F, R.slice3(0)); plot(F, R.slice3(0.5)); black(); masklabel(P(3,0,0), "$x$"); masklabel(P(0,3,0), "$y$"); masklabel(P(0,0,2), P(-4,0), "$z=\\textrm{Re}\\,\\sqrt{x+iy}$", tr); end(); } epix-1.2.14/samples/densityplot.xp0000644000175000017500000000126110663640537016143 0ustar hwanghwang/* -*-ePiX-*- */ #include using namespace ePiX; const int MAX(18); // basic circular wave double ripple(double u, double v) { return pow(Cos(0.5*sqrt(u*u+v*v)),2); } // superposition double f(double u, double v) { return 0.25*(1+ripple(u, v-10) + ripple(u, v+10)); } // f as a parametric surface P F(double u, double v) { return P(u, v, f(u,v)); } // height-dependent coloring P color(double u, double v, double w) { return P(0.2+0.8*w, 0.3, 0.8 - 0.6*w); } domain R(P(-MAX,-MAX), P(MAX,MAX), mesh(2*MAX, 2*MAX)); int main() { picture(P(-MAX,-MAX), P(MAX,MAX), "3x3in"); begin(); pen(Magenta(1.4), 0.2); surface(F, R, color); pst_format(); end(); } epix-1.2.14/samples/sphere.xp0000644000175000017500000000231410654161147015046 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; const double k(2*M_PI/(360*sqrt(3))); // assume "degrees" mode double exp_cos(double t) { return exp(k*t)*Cos(t); } double exp_sin(double t) { return exp(k*t)*Sin(t); } double minus_exp_cos(double t) { return -exp_cos(t); } double minus_exp_sin(double t) { return -exp_sin(t); } int main() { picture(P(-1,-1), P(1,1), "2.5 x 2.5in"); begin(); degrees(); // set angle units camera.at(P(1, 2.5, 3)); sphere(); // draw unit sphere's horizon pen(Blue(1.6)); // hidden portions of loxodromes backplot_N(exp_cos, exp_sin, -540, 540, 180); backplot_N(minus_exp_cos, minus_exp_sin, -540, 540, 180); pen(Red(1.6)); backplot_N(exp_sin, minus_exp_cos, -540, 540, 180); backplot_N(minus_exp_sin, exp_cos, -540, 540, 180); pen(Black(0.3)); // coordinate grid for (int i=0; i<=12; ++i) { latitude(90-15*i, 0, 360); longitude(30*i, 0, 360); } bold(Blue()); // visible portions of loxodromes frontplot_N(exp_cos, exp_sin, -540, 540, 360); frontplot_N(minus_exp_cos, minus_exp_sin, -540, 540, 360); pen(Red()); frontplot_N(exp_sin, minus_exp_cos, -540, 540, 360); frontplot_N(minus_exp_sin, exp_cos, -540, 540, 360); end(); } epix-1.2.14/samples/planes.xp0000644000175000017500000000063110653356762015052 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; const int N(20); int main() { picture(P(-2,-2), P(2,2), "6x6in"); begin(); border(); fill(); camera.at(P(10,-6,4)); clip_box(P(-1,-1,-1), P(1,1,1)); Plane C(P(-1,-1,-1), P(1,1,1)); for (int i=1; i surf_mesh; // torus, surface reflectivity .75 for (int i=0; i 0) { blue(); box(spot.m_loc); } #endif #ifdef AXES // re-draw hidden portions green(); line(P(3,0,0), P(8,0,0)); line(P(0,3,0), P(0,8,0)); line(P(0,0,0), P(0,0,8)); #endif fill(false); // redraw front portion of mesh partially covered by solid surface pen(Green(), 0.15); plot(F, R.resize1(0, 0.25*N1)); // labels base(White(), 1); line(P(3,0,6), F(0,0.25*N2)); line(P(6,0,4), F(0,-0.25*N2)); label_border(Green(0.6), "0.5pt"); label_color(Black()); label_mask(RGB(1,0.8,0.2)); font_size("footnotesize"); masklabel(P(3,0,6), P(0,0), "Total curvature $-\\pi$", t); masklabel(P(6,0,4), P(0,0), "Total curvature $\\pi$", t); pst_format(); end(); } epix-1.2.14/samples/helicoid.flx0000644000175000017500000000516710675516452015521 0ustar hwanghwang/* -*-flix-*- */ /* * Animation depicting the local isometric deformation of a * catenoid to a helicoid through minimal immersions */ #include "epix.h" using namespace ePiX; // number of meridians and latitudes int N1(72); int N2(24); P VIEWPT(4, 3, 4); // locations of "lights"; see mesh::draw() below for implementation P LIGHT_R(10,0,10); P LIGHT_G(0,10,10); P LIGHT_B(0,-10,10); // internal constants double r_0(1.0); double EPS(0.0); // fact shrink factor double du(2.0/N1), dv(4.0/N2); // parametrized surfaces P helicoid(double u, double v) { return P(sinh(v)*Cos(M_PI*u), sinh(v)*Sin(M_PI*u), 2*M_PI*u); } P catenoid(double u, double v) { return P(cosh(v)*Sin(M_PI*u), -cosh(v)*Cos(M_PI*u), -v); } P morph(double u, double v) { return Cos(2*M_PI*tix())*helicoid(u,v) + Sin(2*M_PI*tix())*catenoid(u,v); } // facet-like class with spot reflection class element { private: P pt1; P pt2; P pt3; P pt4; double distance; public: element(P f(double u, double v), double u0, double v0) : pt1(f(u0+EPS,v0+EPS)), pt2(f(u0+du-EPS,v0+EPS)), pt3(f(u0+du-EPS,v0+dv-EPS)), pt4(f(u0+EPS,v0+dv-EPS)) { P center(0.25*(pt1 + (pt2 + (pt3 + pt4)))); P temp(camera.viewpt()); distance = norm(center-temp); } double how_far() const { return distance; } void draw() { P normal((pt2 - pt1)*(pt4 - pt1)); normal *= 1/norm(normal); double dens_r(0.75*(pow(normal|LIGHT_R, 2)/(LIGHT_R|LIGHT_R))); double dens_g(0.75*(pow(normal|LIGHT_G, 2)/(LIGHT_G|LIGHT_G))); double dens_b(0.75*(pow(normal|LIGHT_B, 2)/(LIGHT_B|LIGHT_B))); fill(RGB(dens_r, dens_g, dens_b)); ePiX::quad(pt1, pt2, pt3, pt4); } }; class By_distance { public: bool operator() (const element& arg1, const element& arg2) { return arg1.how_far() > arg2.how_far(); } }; int main(int argc, char* argv[]) { if (argc == 3) { char* arg; double temp1, temp2; temp1=strtod(argv[1], &arg); temp2=strtod(argv[2], &arg); tix()=temp1/temp2; } double MAX(8); picture(P(-MAX,-MAX),P(MAX,MAX), "5x5in"); begin(); pen(Neutral(), 0); // no grid lines // draw bounding square for uniform frame size backing(Black()); viewpoint(VIEWPT); /* rotating lights LIGHT_R=cis(2*M_PI*tix()); LIGHT_G=cis(2*M_PI*(tix()+0.25)); LIGHT_B=P(-2,-2,6); */ camera.range(20); // build surface std::vector mesh; for (int i=0; i 0 near the charge location (improves // plot quality:) P E(double x, double y) { P temp(x,y); // superposition of charge fields P E_temp(charge1*unit_charge(temp-Q1) + charge2*unit_charge(temp-Q2)); // re-scale return (1.0/(E_temp|E_temp))*E_temp; } P potential(double x, double y) { // J rotates a vector by 1/4 turn; parallel to equipotentials return J(E(x,y)); } const double MAX(3); int main() { picture(P(-MAX,-MAX), P(MAX,MAX), "4x4in"); begin(); set_crop(); degrees(); // change angle mode // plot field lines blue(); for (int i=0; i < N; ++i) { // initial points trace a small circle about Q1 or Q2, ode_plot(E, Q1+polar(0.05, i*360.0/N), 10, 120); ode_plot(E, Q2-polar(0.05, i*360.0/N), 10, 120); // location of arrowhead P pt(flow(E, Q2-polar(0.05, i*360.0/N), 3, 12)); } green(); for (int i=-10; i < 10; ++i) { ode_plot(potential, Q1+polar(0.25*pow(0.8, i), 0), 2*M_PI, 120); ode_plot(potential, Q2-polar(0.25*pow(0.8, i), 0), 2*M_PI, 120); } dot_size(6); circ(Q1); circ(Q2); magenta(); label(Q1, "$+$"); label(Q2, "$+$"); blue(); for (int i=0; i < N; ++i) { P pt(flow(E, Q2-polar(0.05, i*360.0/N), 3.5, 12)); arrow(pt, pt+0.01*E(pt.x1(), pt.x2())); arrow(-pt, -pt+0.01*E(-pt.x1(), -pt.x2())); } end(); } epix-1.2.14/samples/levelset3.xp0000644000175000017500000000340310663411223015457 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; // Style parameters const int MESH(12); // number of coordinate grid squares const int MAX(3); // maximum coordinate // camera location (in spherical coordinates); must be in first orthant const P VIEWPT(sph(4*MAX, M_PI/6, M_PI/6)); const double sqrt3(sqrt(3)); // function to be graphed P f(double x, double y) { // return P(x, y, 0.75*y*(y-sqrt3*x)*(y+sqrt3*x)); return P(x,y, 0.9*MAX*exp(-0.5*(x*x+y*y))*x*y); // return P(x, y, 0.25*(x-y*y)*(x-3*y*y)); } P color(double u, double v, double w) { return P(-0.5*w, 0.25*w, 0.5*w); } Color Bk(Green(0.7)); int main() { // picture(P(-2*MAX,-2*MAX), P(2*MAX,2*MAX), "6 x 6in"); picture(P(-MAX,-MAX), P(MAX,MAX), "6 x 6in"); begin(); backing(Bk); camera.at(0,-10,4); border(Green(0.6), "1pt"); clip_box(P(MAX,MAX,MAX)); domain R(P(-MAX,-MAX), P(MAX, MAX), (6*MESH, 6*MESH), mesh(6*MESH, 6*MESH)); legend L1, L2, L3; L1.backing(Bk); L2.backing(Bk); L3.backing(Bk); // pen(RGB(1, 0.8, 0.2), 0.1); for (int i=-10; i <=10; ++i) { clip_slice(P(0,0,0.1*i), P(0,0,1), 0.1); // fill(RGB(0.25+0.1*i, 0, -0.1*i)); rgb(0.25+0.1*i, 0, -0.1*i); std::stringstream buf; buf << "$" << 0.1*i - 0.05 << "\\leq z \\leq " << 0.1*i + 0.05 << "$"; if (i <-3) L1.fill_item(buf.str()); else if(i<4) L2.fill_item(buf.str()); else L3.fill_item(buf.str()); nofill(); surface(f, R); clip_restore(); } camera.at(0,0,1000); font_size("scriptsize"); label_color(Black()); L1.border(0); L2.border(0); L3.border(0); L1.draw(canvas().bl(), P(2,2), tr); L2.draw(canvas().bl()+P(2,0), P(2,2), tr); L3.draw(canvas().bl()+P(4,0), P(2,2), tr); pst_format(); end(); } epix-1.2.14/samples/std_F.xp0000644000175000017500000000506110675500432014616 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" #include "std_F.h" // include the custom header using namespace ePiX; // September 23, 2007 // // The instructions below assume you've copied this file and the // sample files std_F.cc and std_F.h into a directory where you // have write permission. // // To build std_F.cc, you'll need to run commands similar to // // g++ -I. -c std_F.cc // ar -ru libaff.a std_F.o // ranlib libaff.a // // Respectively, these compile std_F.cc into an object file, std_F.o; // create a static library named libaff.a containing the object code; // and create an index in libaff.a for the linker, so the library can // be used in external programs, such as the one built from this // source file. (On Mac OSX, you may need to run ranlib *after* moving // the library file to its permanent home.) // // You may give the library a different name, but it MUST begin "lib" // and have the extension ".a": "libblug.a" and "libaff-1.0.a" are all // right, but "mylib.a" or "libaff.test" are not. You refer to the // library by its name with "lib" and ".a" removed, as in "blug" or // "aff-1.0". // // To compile this source file (the one you're reading now), build // libaff.a as described above, then run the command // // epix -I. -L. -laff std_F.xp // // Files (such as this one) that use an external library cannot be // compiled from emacs, since there is no way to pass the required // options; they must be compiled at a shell prompt. // // Please consult the gcc documentation ("g++ --help") for information on // what each option does. // About this file: // // "F" is the first letter of the Roman alphabet that has no non-trivial // symmetries. // // std_F is a class for representing plane affine maps; please consult // the manual for general information of ePiX's plane affine map class. // int main() { picture(P(0,0), P(6,6), "4x4in"); begin(); degrees(); grid(6,6); std_F F1; // the standard F affine af1; // the identity map F1.draw(); // stretch along the main diagonal af1.rotate(45).v_scale(3).h_scale(0.75).rotate(-45); // flip over the main diagonal and translate af1.reflect(45).shift(pair(3,2)); // apply af, set style, and draw F1.map_by(af1).fill(Black(0.6)).backing(Blue(1.8)).draw(); std_F F2; affine af2; af2.rotate(60).scale(1.5).shift(pair(5,0)); F2.map_by(af2).backing(RGB(1,0.8,0.2)).fill(Green(0.6)).draw(); std_F F3; // define af3 by images of e1, e2, origin affine af3(pair(2-sqrt(3), 6), pair(2,3), pair(2,5)); F3.map_by(af3).backing(Black(0.4)).fill(White()).draw(); pst_format(); end(); } epix-1.2.14/samples/inverse.xp0000644000175000017500000000233110675732274015242 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; // parameters and an odd cubic const double x0(0.4); // critical point const double sqrt3(sqrt(3)); double f(double x) { return 2*x*(x-sqrt3*x0)*(x+sqrt3*x0); } int main() { picture(P(-2,-1), P(2,1), "6 x 3in"); begin(); degrees(); // draw "ordinary" graph screen tmp(P(-1,-1), P(1,1)); activate(tmp); // diagonal pen(Black(0.1)); line(P(-1,-1), P(1,1)); // two-headed arrow pen(Black(0.3)); aarrow(P(0.4,0.6), P(0.6,0.4), 0.5); // axes and labels pen(Black()); font_size("footnotesize"); h_axis(8); v_axis(8); masklabel(P(1,0), "$x$"); masklabel(P(0,1), "$y$"); label(P(0.5,-0.5), "$y=f(x)$"); label_angle(-90); label(P(-0.5,0.5), "$x=f^{-1}(y)$"); // crop remaining elements tmp.set_crop(); // a horizontal tangent line plain(Blue(1.4)); tan_line(f, x0); // graphs that will be inverse branches plain(Red(1.4)); plot(f, -1, -x0, 20); bold(Red()); plot(f, -x0, x0, 20); plain(Red(1.4)); plot(f, x0, 1, 20); inset(tmp, P(-2,-1), P(0,1)); // flip plane over diagonal affine af; af.reflect(45).shift(P(0.25,0)); // compose affine maps inset(tmp.apply(af), P(0,-1), P(2,1)); end(); } epix-1.2.14/samples/saddle.xp0000644000175000017500000000246310663645323015024 0ustar hwanghwang/* -*-ePiX-*- */ // fake 3D by layering #include "epix.h" using namespace ePiX; // function to plot P F(double u, double v) { return P(u, v, 0.25*(u+v)*(u-v)); } P TF(double u, double v) { return P(u, v); } int main() { picture(P(-3,-2),P(3,2), "6x4in"); begin(); backing(Black()); label_color(White()); label(P(0, ymax()), P(0,-4), "\\textbf{A quadratic saddle cut by a tangent plane}", b); camera.at(P(6,12,8)); camera.look_at(P(0,0,-0.25)); domain R(P(-2,-2), P(2,2), mesh(24,24), mesh(48,48)); // clip to lower half space clip_face(P(0,0,0), -E_3); // 2nd arg is inward normal vector // draw shaded saddle fill(); surface(F, R); // and re-draw the wiremesh in color bold(); green(); // change label color as well plot(F, R); label(F(0,2), P(0,-4), "$\\mathbf{z<0}$", b); // (x,y)-plane red(); plot(TF, R); label(P(2,0,0), P(-4,-2), "$\\mathbf{z=0}$", bl); clip_restore(); // remove old restriction clip_face(P(0,0,0), E_3); // and set new one fill(Blue()); // set pen and fill colors surface(F, R); // fake transparency: re-draw (x,y)-plane lightly pen(Red(), 0.2); plot(TF, R); // and plot top half of wiremesh in color bold(Blue()); plot(F, R); rgb(0.5,0.5,1); label(F(-2,0), P(4,4), "$\\mathbf{z>0}$", tr); pst_format(); end(); } epix-1.2.14/samples/layout.xp0000644000175000017500000000116610675520114015075 0ustar hwanghwang/* -*-ePiX-*- */ /* layout.xp -- June 27, 2007 */ #include "epix.h" using namespace ePiX; P f(double u, double v) { return P((u-v)*(u+v), 2*u*v, u); } int main() { picture(P(0,0), P(2,3), "5x7.5in"); begin(); domain R(P(-1,-1), P(1,1), mesh(12,12), mesh(24,24)); for (int i=0; i<2; ++i) for (int j=0; j<3; ++j) { screen my(P(-3,-3), P(3,3)); activate(my); border(Red(0.6), "1pt"); camera.at(sph(10, (2*j+i+1)*M_PI/8, M_PI/6)); plot(f, R); arrow(P(0,0,0), 2*E_1); arrow(P(0,0,0), 2*E_2); inset(P(i+0.05,2.05-j), P(i+0.95,2.95-j)); deactivate(my); } end(); } epix-1.2.14/samples/layout2.xp0000644000175000017500000000142110675520177015162 0ustar hwanghwang/* -*-ePiX-*- */ /* layout.xp -- June 27, 2007 */ #include "epix.h" using namespace ePiX; P F(double s, double t) { return P(0.1*s, 0.025*t) + (1/(0.01+s*s+t*t))*P(-t, s); } int main() { picture(P(0,0), P(2,3), "5x7in"); begin(); for (int k=0; k<3; ++k) for (int j=0; j<2; ++j) { screen my(P(-4, -3), P(2,2)); activate(my); border(Red(0.6), "1pt"); set_crop(); plain(Blue(1.8)); dart_field(F, P(-4, -3), P(2, 2), 12, 10); bold(); for (int i=0; i<7; ++i) { pen(RGB(0.05*(7-i), 1 - 0.1*i, 0.15*i)); ode_plot(F, P(-0.9-0.025*i,0), 4*(3*j+k+0.5), 30*(3*j+k+0.5)); } inset(P(j+0.05,1.05-k), P(j+0.95,1.95-k)); deactivate(my); } end(); } epix-1.2.14/samples/pascal.xp0000644000175000017500000000165010675304446015031 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; int main() { picture(P(-2,-2),P(2,2), "3 x 3in"); begin(); set_crop(); P V(2,-0.25), W(3,1); P P1(-1.5,-1), P2(P1 + V), P3(P1 + 1.5*V); // points P Q1(-1,1), Q2(Q1 + 0.5*W), Q3(Q1 + W); Segment L12(P1, Q2), L13(P1, Q3); Segment L21(P2, Q1), L23(P2, Q3); Segment L31(P3, Q1), L32(P3, Q2); // points of intersection P R1(L12*L21), R2(L13*L31), R3(L32*L23); dot(P1, P(0,-2), "$P_1$", b); dot(P2, P(0,-2), "$P_2$", b); dot(P3, P(0,-2), "$P_3$", b); dot(Q1, P(0,2), "$Q_1$", t); dot(Q2, P(0,2), "$Q_2$", t); dot(Q3, P(0,2), "$Q_3$", t); red(); L12.draw(); L21.draw(); L13.draw(); L31.draw(); L32.draw(); L23.draw(); green(); Line(P1,P3); Line(Q1,Q3); blue(); dot(R1, P(4,2), "$p_1$", r); dot(R2, P(4,2), "$p_2$", r); dot(R3, P(4,2), "$p_3$", r); dashed(); Line(R1,R3); end(); } epix-1.2.14/samples/lorenz.xp0000644000175000017500000000234010650150115015055 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; // ODE parameters const double A1(10); const double A2(28); const double A3(2.6666); // parameter box const double MAX(30); // bounding box (set in screens) const double XMAX(50); // flow time const double TMAX(2000); P F(double x, double y, double z) { return 0.01*P(A1*(y-x), x*(A2-z)-y, x*y-A3*z); } domain R(P(-MAX,-MAX,0), P(MAX,MAX,2*MAX), mesh(6, 6, 6)); void draw_frame() { dart_field(F, R.resize1(0,MAX), 0.5); bold(Red()); ode_plot(F, P(10,0,0), 0, TMAX, TMAX); pen(Blue()); // nearby start points, but trajectories not close ode_plot(F, P(10.5,0,0), 0, TMAX, TMAX); plain(Black()); dart_field(F, R.resize1(-MAX,0), 0.5); } // initialize the camera void init_cam(const P& arg) { camera.at(arg); camera.look_at(P(0,0,MAX)); camera.range(500); } int main() { picture(P(-1,0), P(1,1), "6x3in"); begin(); screen left_eye(P(-XMAX,-XMAX), P(XMAX,XMAX)); activate(left_eye); init_cam(P(-100, 90, 63)); draw_frame(); screen right_eye(P(-XMAX,-XMAX), P(XMAX,XMAX)); activate(right_eye); init_cam(P(-100, 80, 63)); draw_frame(); // page layout inset(left_eye, P(0,0), P(1,1)); inset(right_eye, P(-1,0), P(0,1)); end(); } epix-1.2.14/samples/house.flx0000644000175000017500000000323310675304446015052 0ustar hwanghwang/* -*-flix-*- */ #include "epix.h" using namespace ePiX; const double DY(0.1); const int N(200); const double dN(1.0/N); int main(int argc, char* argv[]) { if (argc == 3) { char* arg; double temp1, temp2; temp1=strtod(argv[1], &arg); temp2=strtod(argv[2], &arg); tix()=temp1/temp2; } picture(P(0,0), P(5,3), "5 x 3in"); begin(); set_crop(); // sky bbold(); for (int i=0; i<2*N; ++i) { // fade blue gradient to black rgb((1-0.6*tix())*(0.5-0.25*dN*i), (1-0.6*tix())*(0.5-0.25*dN*i), (1-0.6*tix())*(1-0.2*dN*i)); line(P(0,1+i*dN), P(5,1+i*dN)); } // sun pen(4); revolutions(); for (int i=1; i<=10; ++i) { // redden as tix() -> 1 rgb((1-0.25*tix())*(1-0.01*i), (1-tix())*(1-0.015*i), 0); circle(P(3+0.5*tix(), 2.5 - 2*tix()), 0.025*i); } // roof red(0.6*(1-0.6*tix())); line(P(0.9,1.5), P(1.5,1.8)); line(P(2.1,1.5), P(1.5,1.8)); // lawn bbold(); for (int i=0; i flat shading screen scr1(P(-1,-1), P(1,1)); activate(scr1); surface(F, coarse); screen scr2(P(-1,-1), P(1,1)); activate(scr2); surface(F, fine); fill(); screen scr3(P(-1,-1), P(1,1)); activate(scr3); surface(F, coarse); screen scr4(P(-1,-1), P(1,1)); activate(scr4); surface(F, fine); inset(scr1, P(0,0), P(1,1)); inset(scr2, P(1.25,0), P(2.25,1)); inset(scr3, P(2.5,0), P(3.5,1)); inset(scr4, P(3.75,0), P(4.75,1)); end(); } epix-1.2.14/samples/butterfly.xp0000644000175000017500000000533110675304445015605 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; const P VIEWPT(20, 0, 8); const double tmin(2/sqrt(3)); const Color light(Blue(1.6)); const Color dark(Red(0.8)); const Color lt_gray(Black(0.2)); const Color net_color(Yellow(0.1)); void label_tag(P loc, P head, std::string txt, epix_label_posn align) { dart(loc, head); masklabel(loc, P(0,0), txt, align); } domain R(P(-2,-2), P(2,2), mesh(20, 20), mesh(40,40)); domain edge(P(-2,-2), P(2,2), mesh(1,1), mesh(40,40)); // surface P Phi(double u, double v) { return P(4*v, 0.75*(u*u-2*v)*u, 2*u); } P cubic(double t) { return Phi(t, 1.5*t*t); } // cubic projections to background planes P Phi12(double t) { P temp(cubic(t)); return P(temp.x1(), temp.x2(), -8); } P Phi13(double t) { P temp(cubic(t)); return P(temp.x1(), -8, temp.x3()); } P Phi23(double t) { P temp(cubic(t)); return P(-8, temp.x2(), temp.x3()); } int main() { picture(P(-14,-15), P(10,9), "6x6in"); begin(); set_crop(); camera.at(VIEWPT); // background grids pen(lt_gray); grid(P(-8, -8, -8), P(8, 8, -8), 8,8); grid(P(-8, -8, -8), P(8, -8, 6), 7,8); // n.b. (z,x) divisions grid(P(-8, -8, -8), P(-8, 8, 6), 8,7); // background coordinate axes pen(Black()); line(P(0, -8, -8), P(0, 8, -8)); line(P(-8, 0, -8), P(8, 0, -8)); line(P(0, -8, -8), P(0, -8, 6)); line(P(-8, -8, 0), P(8, -8, 0)); line(P(-8, 0, -8), P(-8, 0, 6)); line(P(-8, -8, 0), P(-8, 8, 0)); // projections of cubic bold(dark); plot(Phi12, -tmin, tmin, 80); plot(Phi13, -tmin, tmin, 80); plot(Phi23, -tmin, tmin, 80); // surface plain(net_color); fill(lt_gray); surface(Phi, R.resize1(-2,0)); // bottom half // and cubic curve bold(dark); plot(cubic, -tmin, 0, 80); plain(net_color); surface(Phi, R.resize1(0,2)); // top half bold(dark); plot(cubic, 0, tmin, 80); // surface boundary bold(Yellow()); plot(Phi, edge); // guide lines to cusp projection plain(light); dashed(); line(cubic( tmin), Phi12( tmin)); line(cubic(-tmin), Phi12(-tmin)); /* // guide lines to other projections line(cubic( tmin), Phi13( tmin)); line(cubic(-tmin), Phi13(-tmin)); line(cubic( tmin), Phi23( tmin)); line(cubic(-tmin), Phi23(-tmin)); */ // fake transparency plain(dark); plot(Phi12, -tmin, tmin, 20); // cusp // plot(Phi13, -tmin, tmin, 20); // plot(Phi23, -tmin, tmin, 20); label_color(Black()); label(P(8,0,-8), P(0,-4), "$x$", b); label(P(0,8,-8), P(4,0), "$y$", r); pen(light); label_border(light, "0.4pt"); solid(); label_tag(Phi(-2,-2)+P(0,2,6), Phi(-1.75,-1.75), "$y=\\frac{3}{32}(z^3-2xz)$", t); label_tag(cubic(-1)+P(0,2,3), cubic(-1), "$(x,y,z)=(6t^2, -\\frac{3}{2}t^3, 2t)$", t); pst_format(); end(); } epix-1.2.14/samples/line_debug.xp0000644000175000017500000000377610674274733015702 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; /* * Line and fill style test; draws all 32 combinations of five attributes: * * line color: (Neutral: cols 1, 3; Red, cols 2, 4) * line style: (Solid: cols 1, 2; dashed: cols 3, 4) * * base color: (Neutral: odd rows, Blue otherwise) * base width: (1pt: rows 1-2, 5-6, 4pt otherwise) * * fill color: (Neutral: rows 1-4, Yellow otherwise) */ // test objects void objs() { rect(P(0,0), P(1,1)); line(P(-1,-1), P(1,-1)); } // attribute-setting commands on bool flags void line_color(bool arg) { if (arg) pen(Red(), 2); else pen(Neutral(), 2); } void line_style(bool arg) { if (arg) dashed(); } void base_color(bool col, double wid) { if (col) base(Blue(1.2), wid); else base(Neutral(), wid); } void base_pen(bool col, bool wid) { if (wid) base_color(col, 4); else base_color(col, 1); } void fill_color(bool arg) { if (arg) fill(Yellow()); else fill(Neutral()); } // we'll use 0, 1 as loop indices; convert to bool bool tf(int i) { return i == 0 ? false : true; } // where to position the result of a test P loc(int i0, int i1, int i2, int i3, int i4) { double horiz(0), vert(7); if (tf(i0)) horiz += 1; if (tf(i1)) horiz += 2; if (tf(i2)) vert -= 1; if(tf(i3)) vert -= 2; if (tf(i4)) vert -= 4; return P(horiz, vert); } int main() { picture(P(0,0), P(4,8), "6 x 9in"); begin(); // the tests proper for (int i0=0; i0<2; ++i0) for (int i1=0; i1<2; ++i1) for (int i2=0; i2<2; ++i2) for (int i3=0; i3<2; ++i3) for (int i4=0; i4<2; ++i4) { screen scr(P(-1,-1), P(1,1)); activate(scr); solid(); // may need to reset line style border(Green(0.6), "0.1pt"); line_color(tf(i0)); line_style(tf(i1)); base_pen(tf(i2),tf(i3)); fill_color(tf(i4)); objs(); scr.scale(0.9); inset(loc(i0,i1,i2,i3,i4), loc(i0,i1,i2,i3,i4) + P(1,1)); deactivate(scr); } end(); } epix-1.2.14/plots.h0000644000175000017500000001547610676531204013071 0ustar hwanghwang/* * plots.h -- parametrized plotting algorithms * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Andrew D. Hwang * * Version 1.0.23 * Last Change: January 13, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef EPIX_PLOTS #define EPIX_PLOTS #include "enums.h" namespace ePiX { class domain; class domain_list; class Deriv; class Integral; class P; //// paths //// // f:R -> R^3 void plot (P f(double), double t_min, double t_max, unsigned int n); // f:R -> R x R x R void plot (double f1(double), double f2(double), double f3(double), double t_min, double t_max, unsigned int n); // f:R -> R void plot (double f(double), double t_min, double t_max, unsigned int n); void plot (const Deriv&, double t_min, double t_max, unsigned int n); void plot (const Integral&, double t_min, double t_max, unsigned int n); // f: R -> R x R void plot (double f1(double), double f2(double), double t_min, double t_max, unsigned int n); void polarplot (double f(double), double t_min, double t_max, unsigned int); //// surfaces //// // f:R^2 -> R x R x R void plot(double f1(double u1, double u2), double f2(double u1, double u2), double f3(double u1, double u2), const P& min, const P& max, const mesh& coarse, const mesh& fine); void plot(double f1(double u1, double u2), double f2(double u1, double u2), double f3(double u1, double u2), const domain& R); // f:R^2 -> R void plot(double f(double u1, double u2), const P& p1, const P& p2, const mesh& coarse, const mesh& fine); // f:R^2 -> R^3 void plot(P f(double, double), const domain&); void plot(P f(double, double), const domain_list&); // f:R^3 -> R^3 void plot(P f(double, double, double), const domain&); void plot(P f(double, double, double), const domain_list&); // Derivatives and integrals void plot_deriv(double f(double), double a, double b, unsigned int n); void plot_int(double f(double), double a, double b, unsigned int n); void plot_int(double f(double), double x0, double a, double b, unsigned int); void tan_line(double f1(double), double f2(double), double t0); void tan_line(double f(double), double t0); void tan_line(P f(double), double t0); void envelope(double f1(double), double f2(double), double, double, unsigned int); void envelope(double f(double), double, double, unsigned int); void envelope(P f(double), double, double, unsigned int); void tan_field(double f1(double), double f2(double), double, double, unsigned int); void tan_field(P f(double), double, double, unsigned int); // Slope, dart, and vector fields // For slope and dart fields, the optional scale argument affects the // (constant) drawn length of field elements. For vector fields, elements // are drawn at true length, and "scale" affects the arrowhead size. // planar fields void slope_field(P F(double, double), const P& p, const P& q, unsigned int, unsigned int, double scale=1.0); void dart_field(P F(double, double), const P& p, const P& q, unsigned int, unsigned int, double scale=1.0); void vector_field(P F(double, double), const P& p, const P& q, unsigned int, unsigned int, double scale=1.0); void slope_field(P F(double, double), const domain& R, double scale=1.0); void dart_field(P F(double, double), const domain& R, double scale=1.0); void vector_field(P F(double, double), const domain& R, double scale=1.0); // spatial fields void slope_field(P F(double, double, double), const P&, const P&, unsigned int, unsigned int, double scale=1.0); void dart_field(P F(double, double, double), const P&, const P&, unsigned int, unsigned int, double scale=1.0); void vector_field(P F(double, double, double), const P&, const P&, unsigned int, unsigned int, double scale=1.0); // spatial fields over a (3-D) domain void slope_field(P F(double, double, double), const domain&, double scale=1.0); void dart_field(P F(double, double, double), const domain&, double scale=1.0); void vector_field(P F(double, double, double), const domain&, double scale=1.0); // Solutions of ODE systems // start at time 0 void ode_plot (P F(double, double), const P& start, double t_max, unsigned int); void ode_plot (P F(double, double, double), const P& start, double t_max, unsigned int); // arbitrary start time void ode_plot (P F(double, double), const P& start, double t_min, double t_max, unsigned int); void ode_plot (P F(double, double, double), const P& start, double t_min, double t_max, unsigned int); // flow x0 under field for specified time P flow (P F(double, double), const P& start, double t_max, unsigned int n=0); P flow (P F(double, double, double), const P& start, double t_max, unsigned int n = 0); void riemann_sum(double f(double), double a, double b, unsigned int n, epix_integral_type TYPE); // Jay Belanger's shaded plot functions -- December 1, 2002 void shadeplot(double f1(double), double f2(double), double, double, unsigned int); void shadeplot(double f(double), double t_min, double t_max, unsigned int); void blackplot(double f1(double), double f2(double), double t_min, double t_max, unsigned int); void blackplot(double f(double), double t_min, double t_max, unsigned int); void whiteplot(double f1(double), double f2(double), double t_min, double t_max, unsigned int); void whiteplot(double f(double), double t_min, double t_max, unsigned int); // wiremesh surface plotting void plot(P Phi(double, double), const P&, const P&, const mesh& N, const mesh& num_pts); /* void clipplot(P Phi(double, double), const P&, const P&, const mesh& N, const mesh& num_pts); void cropplot(P Phi(double, double), const P&, const P&, const mesh& N, const mesh& num_pts); */ } // end of namespace #endif /* EPIX_PLOTS */ epix-1.2.14/paint_style.cc0000644000175000017500000000626010675346705014421 0ustar hwanghwang/* * paint_style.cc -- ePiX's current line and fill style. * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.1.21 * Last Change: September 22, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "camera.h" #include "length.h" #include "pen_data.h" #include "paint_style.h" namespace ePiX { // Magic numbers: initialization constants paint_state::paint_state() : m_line(pen_data()), m_base(Xfine()), m_tint(Neutral()), m_filling(false) { } paint_state* paint_state::clone() const { return new paint_state(*this); } // set void paint_state::line_pen(const pen_data& pen) { m_line = pen; } void paint_state::line_color(const Color& col) { m_line.color(col); } void paint_state::line_width(const length& len) { m_line.width(len); } void paint_state::base_pen(const pen_data& pen) { m_base = pen; } void paint_state::base_color(const Color& col) { m_base.color(col); } void paint_state::base_width(const length& len) { m_base.width(len); } void paint_state::fill_color(const Color& col) { m_tint = col; } void paint_state::fill_flag(bool fill) { m_filling = fill; } // get pen_data paint_state::line_pen() const { return m_line; } Color paint_state::line_color() const { return m_line.color(); } length paint_state::line_width() const { return m_line.width(); } pen_data paint_state::base_pen() const { return m_base; } Color paint_state::base_color() const { return m_base.color(); } length paint_state::base_width() const { return m_base.width(); } Color paint_state::fill_color() const { return m_tint; } bool paint_state::fill_flag() const { return m_filling; } paint_state paint_state::seen_through(const Camera& mycam) const { return paint_state(m_line.seen_through(mycam), m_base.seen_through(mycam), mycam(m_tint), m_filling); } paint_state::paint_state(const pen_data& lp, const pen_data& bp, const Color& fc, bool ff) : m_line(lp), m_base(bp), m_tint(fc), m_filling(ff) { } paint_state& the_paint_style() { static paint_state* the_paint_state(new paint_state()); return *the_paint_state; } } // end of namespace epix-1.2.14/Color_CMY.cc0000644000175000017500000000765110711730753013650 0ustar hwanghwang/* * Color_CMY.cc -- ePiX::CMY_Color functions * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.2.2 * * Last Change: October 30, 2007 * * * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA * * * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include "Color_Utils.h" #include "Color.h" #include "Color_CMY.h" namespace ePiX { CMY_Color::CMY_Color(double c, double m, double y) : cyan(make_r(c,m,y)), magenta(make_g(c,m,y)), yellow(make_b(c,m,y)) { } // private, no arg checking, bool unused CMY_Color::CMY_Color(double c, double m, double y, const bool arg) : cyan(c), magenta(m), yellow(y) { } CMY_Color::CMY_Color(const RGB_Densities& s) : cyan(1-s.m_dens_red), magenta(1-s.m_dens_green), yellow(1-s.m_dens_blue) { } Color_Base::RGB_Densities CMY_Color::to_rgb() const { // Use conventional formulas since our densities are already in [0,1] return Color_Base::RGB_Densities(1-cyan, 1-magenta, 1-yellow); } CMY_Color* CMY_Color::clone() const { return new CMY_Color(*this); } CMY_Color& CMY_Color::filter(const Color_Base& color) { Color_Base::RGB_Densities s(color.to_rgb()); // filter in RGB; 1 - min(1-x, 1-y) = max(x, y) cyan = std::max(cyan, 1-s.m_dens_red); magenta = std::max(magenta, 1-s.m_dens_green); yellow = std::max(yellow, 1-s.m_dens_blue); return *this; } CMY_Color& CMY_Color::operator*= (double sc) { Color_Base::RGB_Densities s(to_rgb()); // scale in RGB double r(sc*(s.m_dens_red)); double g(sc*(s.m_dens_green)); double b(sc*(s.m_dens_blue)); cyan = 1 - make_r(r, g, b); magenta = 1 - make_g(r, g, b); yellow = 1 - make_b(r, g, b); return *this; } CMY_Color& CMY_Color::blend(const Color_Base& color, double d) { Color_Base::RGB_Densities s(color.to_rgb()); double wt(clip_to_unit(d)); // blending is a convex lin. comb., may as well do in CMY cyan += wt*(1 - cyan - s.m_dens_red); magenta += wt*(1 - magenta - s.m_dens_green); yellow += wt*(1 - yellow - s.m_dens_blue); return *this; } CMY_Color& CMY_Color::superpose(const Color_Base& color) { Color_Base::RGB_Densities s(color.to_rgb()); // add in RGB cyan = 1 - clip_to_unit(1 - cyan + s.m_dens_red); magenta = 1 - clip_to_unit(1 - magenta + s.m_dens_green); yellow = 1 - clip_to_unit(1 - yellow + s.m_dens_blue); return *this; } CMY_Color& CMY_Color::invert() { cyan = 1 - cyan; magenta = 1 - magenta; yellow = 1 - yellow; return *this; } std::string CMY_Color::model() const { return "cmy"; } std::string CMY_Color::name() const { std::ostringstream nm; nm << "cmy_" << dtohex(cyan) << dtohex(magenta) << dtohex(yellow); return nm.str(); } std::vector CMY_Color::densities() const { std::vector val(3); val.at(0) = rd(cyan); val.at(1) = rd(magenta); val.at(2) = rd(yellow); return val; } } // end of namespace epix-1.2.14/path_data.h0000644000175000017500000000517211007501251013631 0ustar hwanghwang/* * path_data.h -- ePiX implementation classes for polygons and paths * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.2 * Last Change5: May 04, 2008 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef EPIX_PATH_DATA #define EPIX_PATH_DATA #include #include #include "triples.h" #include "edge_data.h" namespace ePiX { class Camera; class Color; class halfspace; class pen_data; class screen; class Sphere; // sequence of vertices class path_data { public: path_data(); path_data(const std::vector

&, bool closed=false, bool filled=false); path_data(const std::list&, bool closed=false, bool filled=false); path_data* clone() const; // add points path_data& pt(const P&); // concatenate path_data segments path_data& operator+= (path_data); // concatenate, reversing second sequence path_data& operator-= (path_data); bool is_closed() const; bool is_filled() const; // make loop and prevent subsequent additions of points path_data& close(); // (un)set fill flag if closed path_data& fill(const bool arg=true); path_data& clip(); path_data& clip_to(const halfspace&); // assumes path already lies on sphere path_data& clip_to(const Sphere&, const P& viewpt, bool back=false); void photo(screen&, const Camera&, const Color& fill, const pen_data& line, const pen_data& base) const; std::vector

data() const; void draw() const; void draw(const Color&, const pen_data&) const; private: bool m_closed; bool m_filled; std::list m_data; }; // end of class path_data } // end of namespace #endif /* EPIX_PATH_DATA */ epix-1.2.14/plots.cc0000644000175000017500000003713610676533764013241 0ustar hwanghwang/* * plots.cc: Plotting functions * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.2.0-2 * Last Change: September 26, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "constants.h" #include "errors.h" #include "triples.h" #include "functions.h" #include "camera.h" #include "map.h" #include "domain.h" #include "path.h" #include "markers.h" #include "curves.h" #include "deriv.h" #include "plot_algorithms.h" #include "plots.h" namespace ePiX { typedef std::list::const_iterator dolci; // f:R -> R^3 void plot(P f(double), double t_min, double t_max, unsigned int num_pts) { plot_map_dom(path_map(f), domain(t_min, t_max, num_pts)); } // f:R -> R x R x R void plot(double f1(double), double f2(double), double f3(double), double t_min, double t_max, unsigned int num_pts) { plot_map_dom(column_1var(f1,f2,f3), domain(t_min, t_max, num_pts)); } // f:R -> R void plot(double f(double), double t_min, double t_max, unsigned int num_pts) { plot(id, f, zero, t_min, t_max, num_pts); } void plot(const Deriv& f, double t_min, double t_max, unsigned int num_pts) { plot_map_dom(f, domain(t_min, t_max, num_pts)); } void plot(const Integral& f, double t_min, double t_max, unsigned int num_pts) { plot_map_dom(f, domain(t_min, t_max, num_pts)); } // f: R -> R x R void plot(double f1(double), double f2(double), double t_min, double t_max, unsigned int num_pts) { plot(f1, f2, zero, t_min, t_max, num_pts); } void polarplot (double f(double), double t_min, double t_max, unsigned int num_pts) { plot_map_dom(column_1var(f, id, zero, cylindrical), domain(t_min, t_max, num_pts)); } // surfaces // f:R^2 -> R x R x R void plot(double f1(double u1, double u2), double f2(double u1, double u2), double f3(double u1, double u2), const P& min, const P& max, const mesh& coarse, const mesh& fine) { plot_map_dom(column_2var(f1,f2,f3), domain(min, max, coarse, fine)); } void plot(double f1(double u1, double u2), double f2(double u1, double u2), double f3(double u1, double u2), const domain& R) { plot_map_dom(column_2var(f1,f2,f3), R); } // f:R^2 -> R void plot(double f(double u1, double u2), const P& p1, const P& p2, const mesh& coarse, const mesh& fine) { plot(proj1, proj2, f, p1, p2, coarse, fine); } // f:R^2 -> R^3 void plot(P f(double u1, double u2), const domain& R) { plot_map_dom(surface_map(f), R); } void plot(P f(double u1, double u2), const domain_list& R) { surface_map phi(f); for (dolci p=R.m_list.begin(); p != R.m_list.end(); ++p) plot_map_dom(phi, *p); } // f:R^3 -> R^3 void plot(P f(double, double, double), const domain& R) { plot_map_dom(space_map(f), R); } void plot(P f(double, double, double), const domain_list& R) { space_map phi(f); for (dolci p=R.m_list.begin(); p != R.m_list.end(); ++p) plot_map_dom(phi, *p); } // Derivatives and integrals void plot_deriv(double f(double t), double a, double b, unsigned int num_pts) { plot_function(Deriv(f), a, b, num_pts); } void plot_int(double f(double), double a, double b, unsigned int num_pts) { plot_function(Integral(f, a), a, b, num_pts); } void plot_int(double f(double), double x0, double a, double b, unsigned int num_pts) { plot_function(Integral(f, x0), a, b, num_pts); } // tuples of real-valued plot arguments void tan_line(double f1(double t), double f2(double t), double t0) { Line(P(f1(t0), f2(t0)), P(f1(t0), f2(t0)) + P(deriv(f1, t0), deriv(f2, t0))); } void tan_line(double f(double t), double t0) { Line(P(t0, f(t0)), P(t0, f(t0)) + P(1, deriv(f, t0))); } void envelope(double f1(double t), double f2(double t), double t_min, double t_max, unsigned int num_pts) { const double step((t_max - t_min)/num_pts); double t(t_min); for (unsigned int i=0; i <= num_pts; ++i, t += step) Line(P(f1(t), f2(t)), P(f1(t), f2(t)) + P(deriv(f1, t), deriv(f2, t))); } void envelope(double f(double t), double t_min, double t_max, unsigned int num_pts) { const double step((t_max - t_min)/num_pts); double t(t_min); for (unsigned int i=0; i <= num_pts; ++i, t += step) Line(P(t, f(t)), P(t, f(t)) + P(1, deriv(f, t))); } // P-valued plot argument void tan_line(P f(double t), double t0) { Line(f(t0), f(t0) + deriv(f, t0)); } void envelope(P f(double t), double t_min, double t_max, unsigned int num_pts) { const double step((t_max - t_min)/num_pts); double t(t_min); for (unsigned int i=0; i <= num_pts; ++i, t += step) Line(f(t), f(t) + deriv(f, t)); } // Tangent field along parametrized path void tan_field(double f1(double), double f2(double), double t_min, double t_max, unsigned int num_pts) { const double step((t_max - t_min)/num_pts); double t(t_min); for (unsigned int i=0; i <= num_pts; ++i, t += step) arrow(P(f1(t), f2(t)), P(f1(t), f2(t)) + step*P(deriv(f1, t), deriv(f2, t))); } // P-valued plot argument void tan_field(P f(double), double t_min, double t_max, unsigned int num_pts) { const double step((t_max - t_min)/num_pts); double t(t_min); for (unsigned int i=0; i <= num_pts; ++i, t += step) arrow(f(t), f(t) + step*deriv(f, t)); } // Slope, dart, and vector fields // utility functions // vector, dart, and slope fields void field_element(const P& tail, const P& head, epix_field_type TYPE, double head_scale=1.0) { switch(TYPE) { case VECTOR: arrow(tail, head, head_scale); break; case DART: dart(tail, head); break; case SLOPE: line(tail, head, 0, 1); break; default: ; // do nothing } // end of switch(TYPE) } // end of field_element void draw_field(P F(double, double, double), P p, P q, unsigned int n1, unsigned int n2, epix_field_type TYPE, double scale) { P diagonal(q-p); int perp_count(0); P jump1, jump2; if (fabs(diagonal|E_1) < EPIX_EPSILON) { ++perp_count; jump1 = E_2&diagonal; jump2 = E_3&diagonal; } if (fabs(diagonal|E_2) < EPIX_EPSILON) { ++perp_count; jump1 = E_3&diagonal; jump2 = E_1&diagonal; } if (fabs(diagonal|E_3) < EPIX_EPSILON) { ++perp_count; jump1 = E_1&diagonal; jump2 = E_2&diagonal; } if (perp_count == 0) { epix_warning("Projecting corners of vector field plot"); jump1 = E_1&diagonal; jump2 = E_2&diagonal; p %= E_3; // project corners to (x1, x2)-plane q %= E_3; } // grid line spacing jump1 *= 1.0/n1; jump2 *= 1.0/n2; const double d1(norm(jump1)); const double d2(norm(jump2)); for (unsigned int i=0; i <= n1; ++i) for (unsigned int j=0; j <= n2; ++j) { P base(p + (i*jump1 + j*jump2)); P vect(F(base.x1(), base.x2(), base.x3())); if (norm(camera(base+vect) - camera(base)) < EPIX_EPSILON) marker(base, BBOX); else if (TYPE == VECTOR) field_element(base, base + vect, VECTOR, scale); else { // N.B. May not work if page export bolloxes aspect ratio double object_len(norm(camera(base+vect)-camera(base))); pair dX(pair(d1, d2)); // Hardwired constant 0.4: Segment 80% of shorter grid length double minimum((dX.x1() > dX.x2()) ? 0.4*dX.x2() : 0.4*dX.x1()); if ( object_len > EPIX_EPSILON) // not projected to zero vect *= minimum/object_len; // scale affects length of element, not head size field_element(base - scale*vect, base + scale*vect, TYPE); } } } // end of draw_field F(x, y, z) void draw_field(P F(double, double), P p, P q, unsigned int n1, unsigned int n2, epix_field_type TYPE, double scale) { P diagonal(q-p); P jump1(E_1&diagonal); P jump2(E_2&diagonal); p %= E_3; // project corners to (x1, x2)-plane q %= E_3; // grid line spacing jump1 *= 1.0/n1; jump2 *= 1.0/n2; const double d1(norm(jump1)); const double d2(norm(jump2)); for (unsigned int i=0; i <= n1; ++i) for (unsigned int j=0; j <= n2; ++j) { P base(p + (i*jump1 + j*jump2)); P vect(F(base.x1(), base.x2())); if (norm(camera(base+vect) - camera(base)) < EPIX_EPSILON) marker(base, BBOX); // scale affects head size else if (TYPE == VECTOR) field_element(base, base + vect, VECTOR, scale); else { // see caution above double object_len(norm(camera(base+vect)-camera(base))); pair dX(pair(d1, d2)); // Hardwired constant 0.4: Segment 80% of shorter grid length double minimum((dX.x1() > dX.x2()) ? 0.4*dX.x2() : 0.4*dX.x1()); if ( object_len > EPIX_EPSILON) // not projected to zero vect *= minimum/object_len; // scale affects length of element, not head size field_element(base - scale*vect, base + scale*vect, TYPE); } } } // end of draw_field F(x, y) // planar fields void slope_field(P F(double, double), const P& p, const P& q, unsigned int n1, unsigned int n2, double scale) { draw_field(F, p, q, n1, n2, SLOPE, scale); } void dart_field(P F(double, double), const P& p, const P& q, unsigned int n1, unsigned int n2, double scale) { draw_field(F, p, q, n1, n2, DART, scale); } void vector_field(P F(double, double), const P& p, const P& q, unsigned int n1, unsigned int n2, double scale) { draw_field(F, p, q, n1, n2, VECTOR, scale); } void slope_field(P F(double, double), const domain& R, double scale) { draw_field(F, R.corner1(), R.corner2(), R.coarse_n1(), R.coarse_n2(), SLOPE, scale); } void dart_field(P F(double, double), const domain& R, double scale) { draw_field(F, R.corner1(), R.corner2(), R.coarse_n1(), R.coarse_n2(), DART, scale); } void vector_field(P F(double, double), const domain& R, double scale) { draw_field(F, R.corner1(), R.corner2(), R.coarse_n1(), R.coarse_n2(), VECTOR, scale); } // spatial fields void slope_field(P F(double, double, double), const P& p, const P& q, unsigned int n1, unsigned int n2, double scale) { draw_field(F, p, q, n1, n2, SLOPE, scale); } void dart_field(P F(double, double, double), const P& p, const P& q, unsigned int n1, unsigned int n2, double scale) { draw_field(F, p, q, n1, n2, DART, scale); } void vector_field(P F(double, double, double), const P& p, const P& q, unsigned int n1, unsigned int n2, double scale) { draw_field(F, p, q, n1, n2, VECTOR, scale); } // spatial fields over a domain void slope_field(P F(double, double, double), const domain& R, double scale) { P p(R.corner1()), q(R.corner2()); double height(q.x3() - p.x3()); q -= height*E_3; // p.x3() == q.x3() // horizontal/vertical subdivisions unsigned int i_max(R.coarse_n1()), j_max(R.coarse_n2()); unsigned int k_max((R.dx3() > 0) ? R.coarse_n3() : 0); for (unsigned int k = 0; k <= k_max; ++k) draw_field(F, p + (k*R.step3())*E_3, q + (k*R.step3())*E_3, i_max, j_max, SLOPE, scale); } void dart_field(P F(double, double, double), const domain& R, double scale) { P p(R.corner1()), q(R.corner2()); double height(q.x3() - p.x3()); q -= height*E_3; // p.x3() == q.x3() unsigned int i_max(R.coarse_n1()), j_max(R.coarse_n2()); unsigned int k_max((R.dx3() > 0) ? R.coarse_n3() : 0); for (unsigned int k = 0; k <= k_max; ++k) draw_field(F, p + (k*R.step3())*E_3, q + (k*R.step3())*E_3, i_max, j_max, DART, scale); } void vector_field(P F(double, double, double), const domain& R, double scale) { P p(R.corner1()), q(R.corner2()); double height(q.x3() - p.x3()); q -= height*E_3; // p.x3() == q.x3() unsigned int i_max(R.coarse_n1()), j_max(R.coarse_n2()); unsigned int k_max((R.dx3() > 0) ? R.coarse_n3() : 0); for (unsigned int k = 0; k <= k_max; ++k) draw_field(F, p + (k*R.step3())*E_3, q + (k*R.step3())*E_3, i_max, j_max, VECTOR, scale); } // Solutions of ODE systems // start at time 0 void ode_plot (P F(double, double), const P& start, double t_max, unsigned int n) { euler_plot(surface_map(F), start, 0, t_max, n); } void ode_plot (P F(double, double, double), const P& start, double t_max, unsigned int num_pts) { euler_plot(space_map(F), start, 0, t_max, num_pts); } // arbitrary start time void ode_plot (P F(double, double), const P& start, double t_min, double t_max, unsigned int num_pts) { euler_plot(surface_map(F), start, t_min, t_max, num_pts); } void ode_plot (P F(double, double, double), const P& start, double t_min, double t_max, unsigned int num_pts) { euler_plot(space_map(F), start, t_min, t_max, num_pts); } // flow x0 under field for specified time P flow (P F(double, double), const P& start, double t_max, unsigned int n) { return euler_flow(surface_map(F), start, t_max, n); } P flow (P F(double, double, double), const P& start, double t_max, unsigned int n) { return euler_flow(space_map(F), start, t_max, n); } void riemann_sum(double f(double), double a, double b, unsigned int n, epix_integral_type TYPE) { const double dx((b-a)/n); for (unsigned int i=0; i < n; ++i) { double x(a + i*dx); switch (TYPE) { case LEFT: rect(P(x, f(x)), P(x+dx,0)); break; case RIGHT: rect(P(x, 0), P(x+dx, f(x+dx))); break; case UPPER: rect(P(x, 0), P(x+dx, sup(f, x, x+dx))); break; case LOWER: rect(P(x, 0), P(x+dx, inf(f, x, x+dx))); break; case TRAP: quad(P(x, 0), P(x+dx, 0), P(x+dx, f(x+dx)), P(x, f(x))); break; case MIDPT: rect(P(x, 0), P(x+dx, f(x+0.5*dx))); break; default: ; } // end of switch(TYPE) } } // end of riemann_sum() // Jay Belanger's shaded plotting functions -- December 1, 2002 // Re-implemented using paths, July 16, 2004 // " for Version 1.2, June 2007 void shadeplot(double f1(double), double f2(double), double t_min, double t_max, unsigned int num_pts) { // build contour path boundary(f1, t_min, t_max, num_pts); path graph2(f2, t_min, t_max, num_pts); path right_edge(P(t_max, f1(t_max)), P(t_max, f2(t_max))); path left_edge(P(t_min, f2(t_min)), P(t_min, f1(t_min))); boundary += right_edge; boundary -= graph2; boundary += left_edge; boundary.close().fill(); boundary.draw(); } // end of shadeplot void shadeplot(double f(double), double t_min, double t_max, unsigned int num_pts) { shadeplot(f, zero, t_min, t_max, num_pts); } } // end of namespace epix-1.2.14/plane.cc0000644000175000017500000000571310726110003013140 0ustar hwanghwang/* * plane.cc -- ePiX::Plane class and mathematical operators * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.2.2 * Last Change: December 06, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "constants.h" #include "errors.h" #include "curves.h" // for draw() #include "plane.h" namespace ePiX { const double INF(2*EPIX_INFTY); Plane::Plane(const P& pt, const P& perp) : m_pt(pt), m_perp(perp), m_malformed(false) { double temp(norm(perp)); if (temp < EPIX_EPSILON) { epix_warning("Degenerate plane normal, using (0,0,1)"); m_perp=E_3; } else m_perp *= 1.0/temp; } Plane::Plane(const P& p1, const P& p2, const P& p3) : m_pt(p1), m_malformed(false) { P perp((p2-p1)*(p3-p1)); double norm_perp(norm(perp)); if (norm_perp < EPIX_EPSILON) { epix_warning("Collinear points in Plane constructor"); m_malformed = true; } else m_perp = (1/norm_perp)*perp; } P Plane::pt() const { return m_pt; } P Plane::perp() const { return m_perp; } bool Plane::malformed() const { return m_malformed; } // translate Plane& Plane::shift(const P& arg) { if (!m_malformed) m_pt += arg; return *this; } Plane& Plane::move_to(const P& arg) { if (!m_malformed) m_pt = arg; return *this; } void Plane::draw() const { if (m_malformed) return; // else const P ctr((m_pt|m_perp)*m_perp); // closest point to origin // construct an orthonormal basis P e1(m_perp*E_1); if (norm(e1) < 0.7) // ~sqrt(0.5) e1 = m_perp*E_2; e1 *= 1.0/norm(e1); P e2(m_perp*e1); // very large rectangle quad(ctr + INF*( e1 + e2), ctr + INF*(-e1 + e2), ctr + INF*(-e1 - e2), ctr + INF*( e1 - e2)); } //// global functions //// void plane(const P& point, const P& normal) { Plane pl(point, normal); pl.draw(); } void plane(const P& p1, const P& p2, const P& p3) { Plane pl(p1, p2, p3); pl.draw(); } } // end of namespace epix-1.2.14/Color_Sep.cc0000644000175000017500000001477210711730723013746 0ustar hwanghwang/* * Color_Sep.cc -- ePiX CMYK Color separation functions * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.2.2 * * Last Change: October 30, 2007 * * * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA * * * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include "Color_Utils.h" #include "Color.h" #include "Color_Sep.h" namespace ePiX { Cyan_Layer::Cyan_Layer(double arg) : m_dens(clip_to_unit(arg)) { } // Return Cyan channel of color Cyan_Layer& Cyan_Layer::filter(const Color_Base& color) { Color_Base::RGB_Densities s(color.to_rgb()); if (Color(color).is_unset()) s = Color_Base::RGB_Densities(1,1,1); m_dens = std::min(m_dens, 1-s.m_dens_red); return *this; } Cyan_Layer* Cyan_Layer::clone() const { return new Cyan_Layer(*this); } Color_Base::RGB_Densities Cyan_Layer::to_rgb() const { return Color_Base::RGB_Densities(1-m_dens, 1, 1); } std::string Cyan_Layer::model() const { return "cmyk"; } std::string Cyan_Layer::name() const { std::ostringstream nm; nm << "c_proc_" << dtohex(m_dens); return nm.str(); } std::vector Cyan_Layer::densities() const { std::vector val(4); val.at(0) = rd(m_dens); val.at(1) = 0; val.at(2) = 0; val.at(3) = 0; return val; } // Magenta_Layer Magenta_Layer::Magenta_Layer(double arg) : m_dens(clip_to_unit(arg)) { } // Return Magenta channel of color Magenta_Layer& Magenta_Layer::filter(const Color_Base& color) { Color_Base::RGB_Densities s(color.to_rgb()); if (Color(color).is_unset()) s = Color_Base::RGB_Densities(1,1,1); m_dens = std::min(m_dens, 1-s.m_dens_green); return *this; } Magenta_Layer* Magenta_Layer::clone() const { return new Magenta_Layer(*this); } Color_Base::RGB_Densities Magenta_Layer::to_rgb() const { return Color_Base::RGB_Densities(1, 1-m_dens, 1); } std::string Magenta_Layer::model() const { return "cmyk"; } std::string Magenta_Layer::name() const { std::ostringstream nm; nm << "m_proc_" << dtohex(m_dens); return nm.str(); } std::vector Magenta_Layer::densities() const { std::vector val(4); val.at(0) = 0; val.at(1) = rd(m_dens); val.at(2) = 0; val.at(3) = 0; return val; } // Yellow_Layer Yellow_Layer::Yellow_Layer(double arg) : m_dens(clip_to_unit(arg)) { } // Return Yellow channel of color Yellow_Layer& Yellow_Layer::filter(const Color_Base& color) { Color_Base::RGB_Densities s(color.to_rgb()); if (Color(color).is_unset()) s = Color_Base::RGB_Densities(1,1,1); m_dens = std::min(m_dens, 1-s.m_dens_blue); return *this; } Yellow_Layer* Yellow_Layer::clone() const { return new Yellow_Layer(*this); } Color_Base::RGB_Densities Yellow_Layer::to_rgb() const { return Color_Base::RGB_Densities(1, 1, 1-m_dens); } std::string Yellow_Layer::model() const { return "cmyk"; } std::string Yellow_Layer::name() const { std::ostringstream nm; nm << "y_proc_" << dtohex(m_dens); return nm.str(); } std::vector Yellow_Layer::densities() const { std::vector val(4); val.at(0) = 0; val.at(1) = 0; val.at(2) = rd(m_dens); val.at(3) = 0; return val; } // Black_Layer Black_Layer::Black_Layer(double arg) : m_dens(clip_to_unit(arg)) { } // Return Black channel of color Black_Layer& Black_Layer::filter(const Color_Base& color) { Color_Base::RGB_Densities s(color.to_rgb()); if (Color(color).is_unset()) s = Color_Base::RGB_Densities(1,1,1); double c(1-s.m_dens_red), m(1-s.m_dens_green), y(1-s.m_dens_blue); double k(std::min(std::min(c, m), y)); m_dens = std::min(m_dens, k); return *this; } Black_Layer* Black_Layer::clone() const { return new Black_Layer(*this); } Color_Base::RGB_Densities Black_Layer::to_rgb() const { return Color_Base::RGB_Densities(1-m_dens, 1-m_dens, 1-m_dens); } std::string Black_Layer::model() const { return "cmyk"; } std::string Black_Layer::name() const { std::ostringstream nm; nm << "k_proc_" << dtohex(m_dens); return nm.str(); } std::vector Black_Layer::densities() const { std::vector val(4); val.at(0) = 0; val.at(1) = 0; val.at(2) = 0; val.at(3) = rd(m_dens); return val; } // null operations Cyan_Layer& Cyan_Layer::operator*= (double x) { return *this; } Cyan_Layer& Cyan_Layer::blend(const Color_Base& col, double d) { return *this; } Cyan_Layer& Cyan_Layer::superpose(const Color_Base& col) { return *this; } Cyan_Layer& Cyan_Layer::invert() { return *this; } Magenta_Layer& Magenta_Layer::operator*= (double x) { return *this; } Magenta_Layer& Magenta_Layer::blend(const Color_Base& col, double d) { return *this; } Magenta_Layer& Magenta_Layer::superpose(const Color_Base& col) { return *this; } Magenta_Layer& Magenta_Layer::invert() { return *this; } Yellow_Layer& Yellow_Layer::operator*= (double x) { return *this; } Yellow_Layer& Yellow_Layer::blend(const Color_Base& col, double d) { return *this; } Yellow_Layer& Yellow_Layer::superpose(const Color_Base& col) { return *this; } Yellow_Layer& Yellow_Layer::invert() { return *this; } Black_Layer& Black_Layer::operator*= (double x) { return *this; } Black_Layer& Black_Layer::blend(const Color_Base& col, double d) { return *this; } Black_Layer& Black_Layer::superpose(const Color_Base& col) { return *this; } Black_Layer& Black_Layer::invert() { return *this; } } // end of namespace epix-1.2.14/markers.h0000644000175000017500000000776110671016774013377 0ustar hwanghwang/* * markers.h -- ePiX markers and labels * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.1.16 * Last Change: September 09, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* * label -- put string constant at Cartesian position * translated by (offset.x1, offset.x2) true points (i.e., 3rd component * of is discarded). * * Accepts an optional LaTeX-style positioning argument. * If no offset is specified, the label is centered at the given Cartesian * location. * masklabel requires the "color" package, and places the text in * a white box that masks whatever is underneath and earlier in the file. */ #ifndef EPIX_MARKERS #define EPIX_MARKERS #include #include "enums.h" namespace ePiX { class P; // position, [offset], label text, [alignment] void label(const P&, const P&, const std::string&); void label(const P&, const std::string&); void label(const P&, const P&, const std::string&, epix_label_posn); void masklabel(const P&, const P&, const std::string&); void masklabel(const P&, const std::string&); void masklabel(const P&, const P&, const std::string&, epix_label_posn); // Empty and filled LaTeX circles of diameter get_dotsize() true pt void marker (const P&, epix_mark_type); void circ(const P& posn, const P& offset=P(0,0), const std::string& label_text="", epix_label_posn align=none); // filled white circ void ring(const P& posn, const P& offset=P(0,0), const std::string& label_text="", epix_label_posn align=none); // unfilled circ void spot(const P& posn, const P& offset=P(0,0), const std::string& label_text="", epix_label_posn align=none); void dot(const P& posn, const P& offset=P(0,0), const std::string& label_text="", epix_label_posn align=none); void ddot(const P& posn, const P& offset=P(0,0), const std::string& label_text="", epix_label_posn align=none); void box(const P& posn, const P& offset=P(0,0), const std::string& label_text="", epix_label_posn align=none); void bbox(const P& posn, const P& offset=P(0,0), const std::string& label_text="", epix_label_posn align=none); void h_axis_tick(const P& location, epix_label_posn align=c); void v_axis_tick(const P& location, epix_label_posn align=c); // Arrow with aligned label at tail void arrow(const P& tail, const P& head, const P& offset, const std::string& label_text, epix_label_posn align, double scale=1); //// Path-like glyphs //// // angle indicators; default args are true sizes in pt void right_angle(const P& loc, P leg1, P leg2, double scale=8); void arc_measure(const P& loc, P leg1, P leg2, const P& offset, const std::string&, epix_label_posn, double scale=8); void arc_measure(const P& loc, P leg1, P leg2, double scale=8); void axis_break(const P& tail, const P& head, double scale=12); void h_error_bar(const P& loc, double err, epix_mark_type mk, double ht=6); void v_error_bar(const P& loc, double err, epix_mark_type mk, double wd=6); } // end of namespace #endif /* EPIX_MARKERS */ epix-1.2.14/spline.h0000644000175000017500000000315610654165453013217 0ustar hwanghwang/* * spline.h -- ePiX spline class * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.1.3 * Last Change: March 04, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef EPIX_SPLINE #define EPIX_SPLINE #include #include "triples.h" namespace ePiX { class path; class n_spline { public: n_spline(const std::vector

& data, bool loop=false); path data(const unsigned int) const; private: std::vector

m_vertices; // coefficient sequences std::vector m_k0; std::vector m_k1; std::vector m_k2; std::vector m_k3; }; // end of class n_spline } // end of namespace #endif /* EPIX_SPLINE */ epix-1.2.14/segment.cc0000644000175000017500000000456411007463460013521 0ustar hwanghwang/* * segment.cc -- ePiX::Segment class and mathematical operators * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.2.5 * Last Change: May 04, 2008 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "triples.h" #include "path.h" #include "segment.h" namespace ePiX { Segment::Segment(const P& p1, const P& p2) : m_endpt1(p1), m_endpt2(p2), m_malformed(false) { } Segment::Segment(bool tag) : m_malformed(true) { } P Segment::end1() const { return m_endpt1; } P Segment::end2() const { return m_endpt2; } bool Segment::malformed() const { return m_malformed; } // translate Segment& Segment::shift(const P& arg) { if (!m_malformed) { m_endpt1 += arg; m_endpt2 += arg; } return *this; } Segment& Segment::move_to(const P& arg) { if (!m_malformed) { const P dX(arg - 0.5*(m_endpt1 + m_endpt2)); m_endpt1 += dX; m_endpt2 += dX; } return *this; } Segment& Segment::scale(double c) { if (!m_malformed) { const P ctr(0.5*(m_endpt1 + m_endpt2)); m_endpt1 = ctr + c*(m_endpt1 - ctr); m_endpt2 = ctr + c*(m_endpt2 - ctr); } return *this; } P Segment::midpoint(double t) const { return m_endpt1 + t*(m_endpt2 - m_endpt1); } void Segment::draw(double stretch) const { if (m_malformed) return; // else path temp(m_endpt1, m_endpt2, stretch); temp.draw(); } } // end of namespace epix-1.2.14/flix.10000644000175000017500000000002010643225006012550 0ustar hwanghwang.so man1/epix.1 epix-1.2.14/pen_data.cc0000644000175000017500000000445010675347074013640 0ustar hwanghwang/* * pen_data.cc -- ePiX's pen class * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.1.20 * Last Change: September 19, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "constants.h" #include "camera.h" #include "pen_data.h" namespace ePiX { pen_data::pen_data(const Color& col, const length& wid) : m_color(col), m_width(wid) { } pen_data::pen_data(const Color& col) : m_color(col), m_width(PLAIN_WIDTH) { } // set void pen_data::color(const Color& col) { m_color = col; } void pen_data::width(const length& len) { m_width = len; } // get Color pen_data::color() const { return m_color; } length pen_data::width() const { return m_width; } bool pen_data::operator== (const pen_data& pen) const { return ((m_color == pen.m_color) && (m_width == pen.m_width)); } bool pen_data::operator!= (const pen_data& pen) const { return !(*this == pen); } pen_data pen_data::seen_through(const Camera& mycam) const { Color col(m_color); if (!col.is_unset()) col = mycam(col); return pen_data(col, m_width); } bool pen_data::is_unset() const { return m_color.is_unset() || (m_width < length(EPIX_EPSILON)); } // undrawn const pen_data& Xfine() { static const pen_data* const xfine_pen(new pen_data(Neutral(), length(0))); return *xfine_pen; } } // end of namespace epix-1.2.14/hatching.h0000644000175000017500000000561210676531204013504 0ustar hwanghwang/* * hatching.h -- ePiX hatched region data structures * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.1.13 * Last Change: August 29, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef EPIX_HATCHING #define EPIX_HATCHING #include #include #include "pairs.h" #include "edge_data.h" namespace ePiX { // edge, endpoint heights, orientation (+/-1 = up/down) class bd_edge { public: bd_edge(const edge2d&, double, double, int); pair tail() const; pair head() const; pair dir() const; double lo() const; double hi() const; int orient() const; private: edge2d m_edge; double m_lo; double m_hi; int m_orient; }; // location where scan line crosses bd_edge class cut { public: cut(pair loc, int sign); pair loc() const; int sign() const; private: pair m_loc; // location int m_sign; // orientation }; // ax + by + c = 0 class scan_line { public: scan_line(const pair& t, const pair& h); void add_cut(const cut&); // store what we find in value void draw(std::vector& value) const; private: pair m_perp; // (a, b) double m_ht; // c std::list m_cuts; }; // end of class scan_line // ctor converts a list of edge2d into a (large) vector of scan lines class hatch_data { public: // components of hatch direction, scanline separation, polygon to fill hatch_data(double, double, double sep, const std::list&); // angle, scanline separation, polygon to fill hatch_data(double th, double sep, const std::list&); std::vector data() const; private: std::list m_edges; std::vector m_scans; // convert polygon to scan lines parallel to dir, common to both ctors void hatch_init(const pair& dir, double sep, std::list polygon); }; // end of class hatch_data } // end of namespace #endif /* EPIX_HATCHING */ epix-1.2.14/screen_mask.h0000644000175000017500000000521110647303461014204 0ustar hwanghwang/* * screen_mask.h -- ePiX::screen_mask interface, for screen cropping * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.1.8 * Last Change: July 17, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef EPIX_SCREEN_MASK #define EPIX_SCREEN_MASK #include #include #include "edge_data.h" namespace ePiX { class pair; class Color; class length; class pen_fill; class pen_line; class screen_mask { public: virtual ~screen_mask() { } virtual screen_mask* clone() const = 0; // alignment points pair tr() const; pair tl() const; pair bl() const; pair br() const; pair t() const; pair b() const; pair l() const; pair r() const; pair c() const; // cropping facilities (for tiles: glyph, pen_line, pen_fill resp.) virtual bool crops(const pair& arg) const = 0; // false if arg visible virtual std::list& crop_path(std::list&) const = 0; virtual std::list& crop_loop(std::list&) const = 0; // extreme and average coordinates, dimensions virtual double h_min() const = 0; virtual double h_max() const = 0; virtual double h_size() const = 0; virtual double h_avg() const = 0; virtual double v_min() const = 0; virtual double v_max() const = 0; virtual double v_size() const = 0; virtual double v_avg() const = 0; // convert us to screen border or backing virtual pen_line border(const Color&, const length&) const = 0; virtual pen_fill backing(const Color&) const = 0; virtual pen_line border() const = 0; virtual pen_fill backing() const = 0; }; // end of class screen_mask } // end of namespace #endif /* EPIX_SCREEN_MASK */ epix-1.2.14/triples.cc0000644000175000017500000000772411137172574013551 0ustar hwanghwang/* * triples.cc -- ePiX::P class * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.2.6 * Last Change: January 25, 2009 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include "constants.h" #include "errors.h" #include "triples.h" namespace ePiX { P::P(double arg1, double arg2, double arg3) : m_x1(arg1), m_x2(arg2), m_x3(arg3) { } double P::x1() const { return m_x1; } double P::x2() const { return m_x2; } double P::x3() const { return m_x3; } bool P::is_valid() const { using std::isnan; using std::isinf; return !isinf(m_x3) && !isnan(m_x3) && !isinf(m_x2) && !isnan(m_x2) && !isinf(m_x1) && !isnan(m_x1); } // increment operators P& P::operator += (const P& arg) { m_x1 += arg.m_x1; m_x2 += arg.m_x2; m_x3 += arg.m_x3; return *this; } P& P::operator -= (const P& arg) { m_x1 -= arg.m_x1; m_x2 -= arg.m_x2; m_x3 -= arg.m_x3; return *this; } // scalar multipication P& P::operator *= (double c) { m_x1 *= c; m_x2 *= c; m_x3 *= c; return *this; } // cross product P& P::operator *= (const P& v) { P temp(*this); m_x1 = (temp.m_x2 * v.m_x3 - temp.m_x3 * v.m_x2); m_x2 = (temp.m_x3 * v.m_x1 - temp.m_x1 * v.m_x3); m_x3 = (temp.m_x1 * v.m_x2 - temp.m_x2 * v.m_x1); return *this; } // componentwise product P& P::operator &= (const P& v) { m_x1 *= v.m_x1; m_x2 *= v.m_x2; m_x3 *= v.m_x3; return *this; } // orthogonalization: u %= v is the vector of the form u-k*v perp to v P& P::operator%= (const P& v) { double denom(v.m_x1*v.m_x1 + v.m_x2*v.m_x2 + v.m_x3*v.m_x3); if (denom < EPIX_EPSILON) { epix_warning("Orthogonalizing by zero vector, no action"); return *this; } // else c=(u|v)/(v|v) double c((m_x1*v.m_x1 + m_x2*v.m_x2 + m_x3*v.m_x3)/denom); m_x1 -= c*v.m_x1; m_x2 -= c*v.m_x2; m_x3 -= c*v.m_x3; return *this; } // end of class functions // vector space operations P operator- (P u) { return u *= -1; } P operator+ (P u, const P& v) { return u += v; } P operator- (P u, const P& v) { return u -= v; } // scalar multiplication P operator* (double c, P v) { return v *= c; } // cross product P operator* (P u, const P& v) { return u *= v; } P J(P arg) { // E_3 * arg, but E_3 is const return arg *= -E_3; } // dot product double operator | (const P& u, const P& v) { return u.x1()*v.x1() + u.x2()*v.x2() + u.x3()*v.x3(); } double norm(const P& u) { return sqrt(u|u); } // componentwise product (a,b,c)&(x,y,z)=(ax,by,cz) P operator& (P u, const P& v) { return u &= v; } P operator% (P u, const P& v) { return u %= v; } // (in)equality bool operator == (const P& u, const P& v) { return (norm(u-v) < EPIX_EPSILON); } bool operator != (const P& u, const P& v) { return !(u==v); } } // end of namespace epix-1.2.14/plane.h0000644000175000017500000000344010672355512013015 0ustar hwanghwang/* * plane.h -- ePiX::Plane class * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.1.17 * Last Change: September 13, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef EPIX_PLANE #define EPIX_PLANE #include "triples.h" namespace ePiX { class Circle; class Plane; class Segment; class Sphere; class Plane { public: Plane(const P& pt=P(0,0,0), const P& perp=E_3); Plane(const P&, const P&, const P&); P pt() const; P perp() const; bool malformed() const; // affine operations Plane& shift(const P&); Plane& move_to(const P&); void draw() const; private: P m_pt; P m_perp; // unit normal bool m_malformed; }; // end of Plane class void plane(const P& pt=P(0,0,0), const P& perp=E_3); void plane(const P&, const P&, const P&); } // end of namespace #endif /* EPIX_PLANE */ epix-1.2.14/legend.cc0000644000175000017500000001120310677277516013322 0ustar hwanghwang/* * legend.cc -- ePiX legend class * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.2.1 * Last Change: September 28, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // #include #include #include #include #include "constants.h" #include "triples.h" #include "Color.h" #include "length.h" #include "camera.h" #include "curves.h" #include "screen.h" #include "active_screen.h" #include "screen_data.h" #include "label_data.h" #include "markers.h" #include "legend_item.h" #include "legend_tile.h" #include "legend.h" namespace ePiX { legend::legend() : m_backing(White()), m_bord(Black()), m_bord_width(PLAIN_WIDTH.magnitude()), m_item_bord(Black()), m_item_bord_width(0.5*PLAIN_WIDTH.magnitude()), m_key_size(12), m_label_skip(6) { } legend::legend(const legend& L) : m_backing(L.m_backing), m_bord(L.m_bord), m_bord_width(L.m_bord_width), m_item_bord(L.m_item_bord), m_item_bord_width(L.m_item_bord_width), m_key_size(L.m_key_size), m_label_skip(L.m_label_skip) { for (std::list::const_iterator ip = L.m_items.begin(); ip != L.m_items.end(); ++ip) m_items.push_back((*ip)->clone()); } legend& legend::operator=(const legend& L) { if (&L != this) { std::list tmp; for (std::list::const_iterator ip = L.m_items.begin(); ip != L.m_items.end(); ++ip) tmp.push_back((*ip)->clone()); m_backing = L.m_backing; m_bord = L.m_bord; m_bord_width = L.m_bord_width; m_item_bord = L.m_item_bord; m_item_bord_width = L.m_item_bord_width; m_key_size = L.m_key_size; m_label_skip = L.m_label_skip; swap(m_items, tmp); } return *this; } legend::~legend() { for (std::list::iterator ip = m_items.begin(); ip != m_items.end(); ++ip) delete *ip; } // add items legend& legend::fill_item(const std::string& text) { m_items.push_back(new ePiX::fill_item(text)); return *this; } legend& legend::path_item(const std::string& text) { m_items.push_back(new ePiX::path_item(text)); return *this; } legend& legend::mark_item(epix_mark_type mark, const std::string& text) { m_items.push_back(new ePiX::mark_item(mark, text)); return *this; } // decorations legend& legend::backing(const Color& col) { m_backing = col; return *this; } legend& legend::border(const Color& col, double len) { m_bord = col; m_bord_width = len; return *this; } legend& legend::border(double len) { m_bord = Black(); m_bord_width = len; return *this; } // item attributes legend& legend::item_border(const Color& col, double len) { m_item_bord = col; m_item_bord_width = len; return *this; } legend& legend::item_border(double len) { m_item_bord = Black(); m_item_bord_width = len; return *this; } legend& legend::key_size(double len) { m_key_size = len; return *this; } legend& legend::label_skip(double len) { m_label_skip = len; return *this; } void legend::draw(const P& loc, const P& off, epix_label_posn align) const { std::list::const_iterator ip(m_items.begin()); if (ip == m_items.end()) return; // else label_state ls(the_label_style()); ls.mask_color(m_backing); ls.label_border(pen_data(m_bord, length(m_bord_width))); ls.align_to(align); active_screen()->m_screen ->add_tile(legend_tile(pair(loc.x1(), loc.x2()), pair(off.x1(), off.x2()), align, ls.seen_through(cam()), pen_data(cam()(m_item_bord), length(m_item_bord_width)), m_key_size, m_label_skip, m_items)); } } // end of namespace epix-1.2.14/constants.h0000644000175000017500000000603711026303317013725 0ustar hwanghwang/* * constants.h -- ePiX's hidden compile-time constants * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.2.5 * Last Change: June 14, 2008 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef EPIX_CONSTANTS #define EPIX_CONSTANTS #include "length.h" namespace ePiX { // See lengths.cc for units conversion factors //// Style Parameters -- min, default, max //// // standard pen widths const length PLAIN_WIDTH("0.4pt"); const length BOLD_WIDTH("0.8pt"); const length BBOLD_WIDTH("1.2pt"); // dot diam in pt const double MIN_DOT(1); const double AVG_DOT(4); const double MAX_DOT(36); // page length of dash pattern in pt const double MIN_SEP(4); const double AVG_SEP(12); const double MAX_SEP(36); // axis tick half-lengths const double MIN_TICK(1); const double AVG_TICK(3); const double MAX_TICK(8); // arrow head parameters const double MIN_AWIDTH(1); const double AVG_AWIDTH(3); const double MAX_AWIDTH(12); const double MIN_ARATIO(1); const double AVG_ARATIO(5.5); const double MAX_ARATIO(8); const double MIN_INSET(-1); const double AVG_INSET(0); const double MAX_INSET(0.95); // not 1, so head can be hatched // too small/large const double EPIX_EPSILON(0.000001); // 10^-6 const double EPIX_INFTY(100000.0); // 10^5 // Numerical constants const double PI_180(0.01745329251994329577); const double TWO_PI(6.28318530717958647692); // smallest distance from camera to clipping plane const double MIN_CLIP(0.01); // No more than this many minor ticks per segment in log axis const unsigned int MAX_LOG_BASE(100); // For output const unsigned int DEF_PRECISION(6); const unsigned int MAX_PRECISION(20); // In calculus plotting, the interval between adjacent points is too large // for accuracy. Divide each such interval into this many subintervals const unsigned int EPIX_ITERATIONS(200); // Output-formatting constants: const unsigned int EPIX_NUM_PTS(120); // # of points in ellipses, splines const unsigned int EPIX_FILE_WIDTH(70); // Width of output file } // end of namespace #endif /* EPIX_CONSTANTS */ epix-1.2.14/length.cc0000644000175000017500000001420410676533421013336 0ustar hwanghwang/* * length.cc -- the ePiX::length class * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.2.0-2 * Last Change: September 26, 2007 * * * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA * * * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "errors.h" #include "constants.h" #include "length.h" namespace ePiX { // Inviolable "private" constants: number of pts per unit const double IN(72.27); // the gold standard const double CM(28.452755905512); // 2.54 cm = 72.27 pt const double MM(2.8452755905512); // 25.4 mm = 72.27 pt const double PC(6.0225); // 12 picas = 1 inch const double BP(1.00375); // 72 big pt = 72.27 pt // const double SP(0.0000152587890625); // 65536 scaled pt = 1 pt // extract length from "double [spaces] length unit" length::length(std::string arg) { char* tmp_units; m_mag = strtod(arg.c_str(), &tmp_units); std::string putative_units(tmp_units); // skip spaces, get first two non-space characters std::string::size_type i=putative_units.find_first_not_of(" "); if (i == std::string::npos) { epix_warning("Missing units, using pt"); m_units = "pt"; } else m_units = putative_units.substr(i, 2); // See what we found; ugly, but not going to change... if (m_units == "pt") pts_per_unit = 1.0; else if (m_units == "in") pts_per_unit = IN; else if (m_units == "cm") pts_per_unit = CM; else if (m_units == "mm") pts_per_unit = MM; else if (m_units == "pc") pts_per_unit = PC; else if (m_units == "bp") pts_per_unit = BP; /* else if (m_units == "sp") pts_per_unit = SP; */ else { std::string warn="Unrecognized units \""+m_units+"\", assuming pt"; epix_warning(warn); pts_per_unit = 1.0; m_units = "pt"; } } // end of string constructor length::length(double lgth) : m_mag(lgth), pts_per_unit(1.0), m_units("pt") { } length& length::operator+= (const length& increment) { m_mag += increment.m_mag*increment.pts_per_unit/pts_per_unit; return *this; } length& length::operator*= (double scale) { m_mag *= scale; return *this; } // convert to specified units length& length::to(std::string units) { units = units.substr(0,2); if (m_units == units) return *this; // null conversion if (units == "pt") { m_mag *= pts_per_unit; pts_per_unit = 1.0; m_units = units; } else if (units == "in") { m_mag *= pts_per_unit/IN; pts_per_unit = IN; m_units = units; } else if (units == "cm") { m_mag *= pts_per_unit/CM; pts_per_unit = CM; m_units = units; } else if (units == "mm") { m_mag *= pts_per_unit/MM; pts_per_unit = MM; m_units = units; } else if (units == "pc") { m_mag *= pts_per_unit/PC; pts_per_unit = PC; m_units = units; } else if (units == "bp") { m_mag *= pts_per_unit/BP; pts_per_unit = BP; m_units = units; } /* else if (units == "sp") { m_mag *= pts_per_unit/SP; pts_per_unit = SP; m_units = units; } */ else epix_warning("Ignoring conversion to unrecognized units \""+units+"\""); return *this; } bool length::operator== (const length& L) const { return (fabs(m_mag*pts_per_unit - L.m_mag*L.pts_per_unit) < EPIX_EPSILON); } double length::magnitude() const { return m_mag; } std::string length::units() const { return m_units; } std::string length::name() const { std::stringstream buf; buf << m_mag << m_units; return buf.str(); } // value-returning operators length operator+ (length len1, const length& len2) { return len1 += len2; } length operator* (double sc, length len) { return len *= sc; } bool operator< (length arg1, length arg2) { return (arg1.to("pt").magnitude()) < (arg2.to("pt").magnitude()); } // Parse a string into two lengths. void get_lengths(std::string sz, length& length1, length& length2) { std::string units1; std::string units2; double len1(0), len2(0); // find first digit std::string::size_type i=sz.find_first_of("-0123456789."); if (i == std::string::npos) epix_warning("Invalid width in size string"); else { sz.erase(0, i); // remove initial garbage const char* tmp = sz.c_str(); char* arg; len1 = strtod(tmp, &arg); sz=arg; } // expect either unitlength or multiplication character i=sz.find_first_not_of(" "); std::string::size_type j=sz.find_first_of("Xx*"); if (i != j) units1 = sz.substr(i, 2); // next digit i=sz.find_first_of("-0123456789."); if (i == std::string::npos) epix_warning("Invalid height in size string"); else { sz.erase(0, i); const char* tmp = sz.c_str(); char* arg; len2 = strtod(tmp, &arg); sz=arg; i=sz.find_first_not_of(" "); units2 = sz.substr(i, 2); } if (units1 == "") // e.g. sz = "4x6in" units1 = units2; // assign values std::stringstream buf1; buf1 << len1 << units1; length1=length(buf1.str()); std::stringstream buf2; buf2 << len2 << units2; length2=length(buf2.str()); } } // end of namespace epix-1.2.14/errors.h0000644000175000017500000000300710765126460013232 0ustar hwanghwang/* * errors.h -- ePiX warning/error functions * * This file is part of ePiX, a preprocessor for creating high-quality * line figures in LaTeX * * Version 1.2.3 * Last Change: March 09, 2008 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef EPIX_ERRORS #define EPIX_ERRORS #include #include #include namespace ePiX { inline void epix_warning(std::string msg) { std::cerr << "ePiX WARNING: " << msg << std::endl; } inline void epix_error(std::string msg) { std::cerr << "ePiX ERROR: " << msg << std::endl; exit(1); } } // end of namespace #endif /* EPIX_ERRORS */ epix-1.2.14/AUTHORS0000644000175000017500000000014210672010640012577 0ustar hwanghwangJay P. Belanger Marcus D. Hanwell Andrew D. Hwang Please see THANKS for the list of contributors.epix-1.2.14/Color.cc0000644000175000017500000001535210716112024013123 0ustar hwanghwang/* * Color.cc -- ePiX Color functions * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.2.2 * * Last Change: November 12, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA * */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include "Color_Base.h" #include "Color_Utils.h" #include "Color_CMY.h" #include "Color_CMYK.h" #include "Color_Gray.h" #include "Color_Neutral.h" #include "Color_RGB.h" #include "Color_Sep.h" #include "Color.h" namespace ePiX { Color::Color() : m_color(Neutral().m_color), m_alpha(1) { } Color::Color(const Color_Base& col) : m_color(col.clone()), m_alpha(1) { } Color::Color(const Color_Base* col) : m_color(col->clone()), m_alpha(1) { } Color::Color(const Color& col) : m_color(col.m_color->clone()), m_alpha(col.m_alpha) { } Color& Color::operator= (const Color& col) { if (*this != col) { Color_Base* tmp(col.m_color->clone()); delete m_color; m_color = tmp; m_alpha = col.m_alpha; } return *this; } Color::~Color() { delete m_color; } const Color_Base* Color::operator->() const { return m_color; } double Color::alpha() const { return m_alpha; } bool Color::is_unset() const { // we're Neutral() return (name() == ""); } // no effect if we or col are Neutral Color Color::filter(const Color& col) const { if (m_color->name() == "" || col.is_unset()) return col; else { Color_Base* fil(m_color->clone()); fil->filter(*(col.m_color)); Color val(fil); delete fil; return val; } } Color& Color::operator*= (double c) { (*m_color) *= c; return *this; } // Blending with Unset has no effect Color& Color::blend(const Color& col, double d) { if (!col.is_unset()) m_color->blend(*(col.m_color), d); return *this; } Color& Color::superpose(const Color& col) { if (!col.is_unset()) m_color->superpose(*(col.m_color)); return *this; } Color& Color::invert() { m_color->invert(); return *this; } Color& Color::alpha(double t) { m_alpha = t; return *this; } std::string Color::model() const { return m_color->model(); } std::string Color::name() const { return m_color->name(); } std::vector Color::densities() const { return m_color->densities(); } // non-member operators Color operator* (double c, const Color& col) { Color tmp(col); return tmp *= c; } const bool operator== (const Color& col1, const Color& col2) { return col1.name() == col2.name(); } const bool operator!= (const Color& col1, const Color& col2) { return col1.name() != col2.name(); } const bool operator< (const Color& col1, const Color& col2) { return col1.name() < col2.name(); } // Named constructors Color RGB(double r, double g, double b) { return Color(RGB_Color(r, g, b)); } Color CMY(double c, double m, double y) { return Color(CMY_Color(c, m, y)); } Color CMYK(double c, double m, double y, double k) { return Color(CMYK_Color(c, m, y, k)); } Color Gray(double d) { return Color(Gray_Color(d)); } /* * * Extended primaries in the global namespace * * */ Color Red(double d) { return RGB(clippy(d), clippy(-d), clippy(-d)); } Color Green(double d) { return RGB(clippy(-d), clippy(d), clippy(-d)); } Color Blue(double d) { return RGB(clippy(-d), clippy(-d), clippy(d)); } Color White(double d) { return RGB(clippy(d), clippy(d), clippy(d)); } Color Black(double d) { return RGB(clippy(1-d), clippy(1-d), clippy(1-d)); } /* * * CMY * * */ Color Cyan(double d) { return CMY_Color(clippy(d), clippy(-d), clippy(-d), true); } Color Magenta(double d) { return CMY_Color(clippy(-d), clippy(d), clippy(-d), true); } Color Yellow(double d) { return CMY_Color(clippy(-d), clippy(-d), clippy(d), true); } Color CMY_White(double d) { return CMY_Color(clippy(1-d), clippy(1-d), clippy(1-d), true); } Color CMY_Black(double d) { return CMY_Color(clippy(d), clippy(d), clippy(d), true); } /* * * CMYK * * */ Color CyanK(double d) { double c(clippy(d)); double m(clippy(-d)); double y(m); // [sic] double k(std::min(c,m)); // y=m return CMYK_Color(c-k, m-k, y-k, k, true); } Color MagentaK(double d) { double c(clippy(-d)); double m(clippy(d)); double y(c); double k(std::min(c,m)); // y=c return CMYK_Color(c-k, m-k, y-k, k, true); } Color YellowK(double d) { double c(clippy(-d)); double m(c); double y(clippy(d)); double k(std::min(c,y)); // m=c return CMYK_Color(c-k, m-k, y-k, k, true); } Color CMYK_White(double d) { return CMYK_Color(0, 0, 0, clippy(1-d), true); } Color CMYK_Black(double d) { return CMYK_Color(0, 0, 0, clippy(d), true); } Color C_Process(double d) { return Cyan_Layer(d); } Color M_Process(double d) { return Magenta_Layer(d); } Color Y_Process(double d) { return Yellow_Layer(d); } Color K_Process(double d) { return Black_Layer(d); } /* * * Neutral filters * * */ Color Neutral() { static Neutral_Color* neutral(new Neutral_Color()); return Color(*neutral); } Color RGB_Neutral() { static RGB_Color* rgb_neutral(new RGB_Color(1, 1, 1)); return Color(*rgb_neutral); } Color CMY_Neutral() { static CMY_Color* cmy_neutral(new CMY_Color(0, 0, 0, true)); return Color(*cmy_neutral); } Color CMYK_Neutral() { static CMYK_Color* cmyk_neutral(new CMYK_Color(0, 0, 0, 0, true)); return Color(*cmyk_neutral); } Color Gray_Neutral() { static Gray_Color* gray_neutral(new Gray_Color(1)); return Color(*gray_neutral); } } // end of namespace epix-1.2.14/utils.cc0000644000175000017500000000655112334457372013226 0ustar hwanghwang/* * utils.cc -- global utility functions for ePiX * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.2.5 * Last Change: June 18, 2008 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "constants.h" #include "utils.h" namespace ePiX { const std::string epix_version() { return "1.2.14"; } double truncate(double arg) { return fabs(arg) < 0.0001 ? 0 : arg; // 10^-4, avoid exponential notation } std::string date_and_time() { ////// N.B.: Revise this if time format string changes! const int max_len = 31; char buf[max_len]; time_t t=time(0); // strftime(buf, max_len, "%c", localtime(&t)); // Sat Jul 1 23:25:39 2006 (GMT) strftime(buf, max_len, "%a %b %d %X %Y (%Z)", gmtime(&t)); return std::string(buf); } // remove everything from arg except chars in srch std::string get_chars(std::string arg, const std::string& srch) { std::string::size_type curr(0); std::string::size_type next(arg.find_first_of(srch)); while (next != std::string::npos) { arg.erase(curr, next-curr); curr = arg.find_first_not_of(srch); next = arg.find_first_of(srch, curr); } if (next != curr) arg.erase(curr, next); return arg; } // add linebreaks before opening parentheses to make lines at most // FILE_WIDTH characters long; return reference to arg std::string break_lines(std::string arg, const std::string& path_break) { std::string value; // append here; swap with arg at end // initialize markers prev, curr, next std::string::size_type prev(0); // position of last line break std::string::size_type next(arg.find_first_of("(")); std::string::size_type curr(next); unsigned int pbk_sz(path_break.size()); while (next != std::string::npos) { // seek next break points while (next-prev <= EPIX_FILE_WIDTH - pbk_sz) { curr = next; next = arg.find_first_of("(", ++next); } value.append(arg, prev, curr-prev); // append current line // Magic number 20 (greater than width of a printed pair) if (next - prev <= 20+EPIX_FILE_WIDTH) // not at end of data value += path_break; // and formatting string prev = curr; // update front of line } // get remaining characters value.append(arg, prev, next-prev); swap(arg, value); return arg; } } // end of namespace epix-1.2.14/NEWS0000644000175000017500000000666210671775370012264 0ustar hwanghwangePiX-1.2 -- NEWS Last Change: September 12, 2007 Please consult the following files as appropriate: INSTALL -- Detailed installation instructions NEWS (this file) -- Recent major changes (see ChangeLog for code changes) README -- General overview and information If you are new to ePiX, you may safely ignore this file. OVERVIEW ePiX 1.2.x has been written almost entirely from scratch. The drawing model is unchanged, and some old files will compile as is, but there are a few changes of syntax. SYNTAX CHANGES Generally, global variables have been deprecated or removed, and should be replaced by function calls in new files. * (Recommended) The global size variables x_min, x_max, y_min, y_max, x_size, and y_size should be replaced by the function calls xmin(), etc. (No underscores.) * (Mandatory) The global variable tix in a flix file must be manipulated through the function tix(). * (Suggested) The camera may be accessed through the function the_camera(). * (Mandatory) Camera orientation is controlled with functions named tilt, pan, and roll; each rotates the camera about an axis through the viewpoint, not through the target. * (Suggested) The size and bounding box may be given in one command, such as picture(P(-1,0), P(1,1), "4x3in"). The old syntax will be retained indefinitely. * (Mandatory) The command use_pstricks() is obsolete. * (Mandatory) Deprecated aliases no longer exist: triple (for the P class), D (for Deriv), and I (for Integral). Lowercase trig function names conflicted with the standard namespace and have been removed. * (Mandatory) The geometric object commands (circle, plane, segment, sphere) which used to create class objects now perform drawing. The classes are available with capitalized names (Circle, Plane, Segment, Sphere). NEW FEATURES * Output is cleanly separated from the internal representation. Figures may be written with a choice of macros---PSTricks, tikz, and eepic at present---and new output types are easily coded so long as the format supports arbitrary line segments, color, and the ability to place a LaTeX box at a specified location. * Colors are a manipulable data type, available in RGB, CMY, CMYK, and Gray models. xcolor-style operations, such as color model conversion, blending, superposition, and inversion are provided. The camera has a filter which affects the colors of all scene elements. Filters performing CMYK separation are provided. * Color filling is controlled with declarations, similarly to line colors in ePiX 1.0.x. Arrows and markers of type spot, dot, ddot, and~circ are now colored like other markers. Shaded surfaces may be colored with position-dependent functions. If a figure contains many shaded elements, a color-capable output format (PSTricks or tikz) should be used for efficiency. Filled regions are implemented as fine hatching in eepic. * An axis class provides coordinate axes with labels in a variety of styles: decimals or scientific notation of specified precision, fractions, trig fractions, logarithmic labels in arbitrary (integer) base, and user-supplied styles. * ePiX 1.2.x performs page layout. Sub-figures may be manipulated flexibly. The sample files give several applications. * Non-member intersection operators for Circles, Planes, Segments, and Spheres are provided. A ``non-generic'' intersection does not throw an exception, but instead returns an undrawable ``malformed'' object. epix-1.2.14/frac.h0000600000175000017500000000437110676531204012623 0ustar hwanghwang/* * frac.h -- ePiX::rational number class * * This file is part of ePiX, a C++ library for creating high-quality * figures in LaTeX * * Version 1.1.10 * Last Change: August 07, 2007 */ /* * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 * Andrew D. Hwang * Department of Mathematics and Computer Science * College of the Holy Cross * Worcester, MA, 01610-2395, USA */ /* * ePiX is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ePiX is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with ePiX; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef EPIX_FRACTION #define EPIX_FRACTION namespace ePiX { class frac { public: frac(const int n, const unsigned int d=1); explicit frac(double); // increment operators frac& operator += (const frac& arg); frac& operator -= (const frac& arg); frac& operator *= (const frac& arg); frac& operator /= (const frac& arg); frac& reduce(); double eval() const; int num() const; unsigned int denom() const; bool is_int() const; private: int m_num; unsigned int m_denom; }; // end of class frac frac operator+ (frac arg1, const frac& arg2); frac operator- (frac arg1); frac operator- (frac arg1, const frac& arg2); frac operator* (frac arg1, const frac& arg2); frac operator/ (frac arg1, const frac& arg2); // (in)equality bool operator == (const frac& u, const frac& v); bool operator != (const frac& u, const frac& v); bool operator < (const frac& u, const frac& v); bool operator > (const frac& u, const frac& v); bool operator <= (const frac& u, const frac& v); bool operator >= (const frac& u, const frac& v); } // end of namespace #endif /* EPIX_FRACTION */ epix-1.2.14/doc/0000755000175000017500000000000012334457372012315 5ustar hwanghwangepix-1.2.14/doc/arrow.xp0000644000175000017500000000025111617264472014016 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; int main() { picture(P(-2,-1),P(2,1), "24x12pt"); begin(); arrow(P(xmin(),0), P(xmax(),0)); end(); } epix-1.2.14/doc/camera.eepic0000644000175000017500000003015210675302312014542 0ustar hwanghwang%% Generated from camera.xp on Sat Sep 22 17:10:34 EDT 2007 by %% ePiX-1.2.0 %% %% Cartesian bounding box: [-3.5,3.5] x [-3.5,2.5] %% Actual size: 2.625 x 2.25in %% Figure offset: left by 0in, down by 0in %% %% usepackages epic,eepic,xcolor %% \xdefinecolor{rgb_000000}{rgb}{0,0,0}% \xdefinecolor{rgb_7f7f7f}{rgb}{0.498039,0.498039,0.498039}% \xdefinecolor{rgb_e5e5e5}{rgb}{0.898039,0.898039,0.898039}% \xdefinecolor{rgb_ffffff}{rgb}{1,1,1}% \setlength{\unitlength}{1in}% \begin{picture}(2.625,2.25)(0,0)% \path(1.42243,1.30711)(1.4086,1.26997)(1.29561,1.27568) \path(1.3125,1.3125)(1.4523,1.30564)(1.59359,1.29871) \path(1.3125,1.3125)(1.3125,1.44704)(1.3125,1.58496) \path(0.307912,0.721822)(0.173332,2.09409)(2.55902,2.04543) (2.39965,0.566596)(0.307912,0.721822) \put(1.58249,0.490175){\makebox(0,0)[l]{\colorbox{rgb_ffffff}{\hbox{\color{rgb_000000}\footnotesize \textbf{Sea}}}}} \put(0.937572,1.11972){\makebox(0,0)[b]{\colorbox{rgb_ffffff}{\hbox{\color{rgb_000000}\footnotesize \textbf{Sky}}}}} \put(0.735053,0.174015){\makebox(0,0)[r]{\colorbox{rgb_ffffff}{\hbox{\color{rgb_000000}\footnotesize \textbf{Eye}}}}} \put(0.929482,0.537641){\makebox(0,0)[r]{\colorbox{rgb_ffffff}{\hbox{\color{rgb_000000}\footnotesize Viewpoint}}}} \put(0.957156,0.537641){\color{rgb_000000}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \put(2.476,2.01776){\makebox(0,0)[tr]{\colorbox{rgb_ffffff}{\hbox{\color{rgb_000000}\footnotesize Canvas}}}} \path(0.957156,0.537641)(1.17567,1.01413)(1.3125,1.3125) \color{rgb_7f7f7f}% \path(1.83216,0.911179)(1.84054,0.911179) \path(1.82052,0.916691)(1.83729,0.916691) \path(1.80888,0.922203)(1.83404,0.922203) \path(1.79724,0.927715)(1.83079,0.927715) \path(1.7856,0.933227)(1.82754,0.933227) \path(1.77396,0.938739)(1.82429,0.938739) \path(1.76232,0.944251)(1.82104,0.944251) \path(1.75068,0.949763)(1.81779,0.949763) \path(1.73904,0.955275)(1.81454,0.955275) \path(1.7274,0.960787)(1.81129,0.960787) \path(1.71576,0.966299)(1.80804,0.966299) \path(1.70412,0.971811)(1.80479,0.971811) \path(1.69248,0.977323)(1.80154,0.977323) \path(1.68084,0.982835)(1.79829,0.982835) \path(1.6692,0.988347)(1.79503,0.988347) \path(1.65756,0.993859)(1.79178,0.993859) \path(1.64592,0.999371)(1.78853,0.999371) \path(1.63428,1.00488)(1.78528,1.00488) \path(1.62264,1.0104)(1.78203,1.0104) \path(1.611,1.01591)(1.77878,1.01591) \path(1.60612,1.02142)(1.77553,1.02142) \path(1.60892,1.02693)(1.77228,1.02693) \path(1.61172,1.03244)(1.76903,1.03244) \path(1.61452,1.03796)(1.76578,1.03796) \path(1.61732,1.04347)(1.76253,1.04347) \path(1.62012,1.04898)(1.75928,1.04898) \path(1.62292,1.05449)(1.75603,1.05449) \path(1.62572,1.06)(1.75278,1.06) \path(1.62852,1.06551)(1.74952,1.06551) \path(1.63132,1.07103)(1.74627,1.07103) \path(1.63412,1.07654)(1.74302,1.07654) \path(1.63692,1.08205)(1.73977,1.08205) \path(1.63972,1.08756)(1.73652,1.08756) \path(1.64252,1.09307)(1.73327,1.09307) \path(1.64532,1.09859)(1.73002,1.09859) \path(1.64812,1.1041)(1.72677,1.1041) \path(1.65091,1.10961)(1.72352,1.10961) \path(1.65371,1.11512)(1.72027,1.11512) \path(1.65651,1.12063)(1.71702,1.12063) \path(1.65931,1.12615)(1.71377,1.12615) \path(1.66211,1.13166)(1.71052,1.13166) \path(1.66491,1.13717)(1.70726,1.13717) \path(1.66771,1.14268)(1.70401,1.14268) \path(1.67051,1.14819)(1.70076,1.14819) \path(1.67331,1.15371)(1.69751,1.15371) \path(1.67611,1.15922)(1.69426,1.15922) \path(1.67891,1.16473)(1.69101,1.16473) \path(1.68171,1.17024)(1.68776,1.17024) \path(1.83836,0.908239)(1.83836,0.914877) \path(1.83293,0.910811)(1.83293,0.924087) \path(1.8275,0.913384)(1.8275,0.933297) \path(1.82207,0.915956)(1.82207,0.942506) \path(1.81664,0.918528)(1.81664,0.951716) \path(1.81121,0.9211)(1.81121,0.960926) \path(1.80577,0.923672)(1.80577,0.970136) \path(1.80034,0.926244)(1.80034,0.979345) \path(1.79491,0.928816)(1.79491,0.988555) \path(1.78948,0.931388)(1.78948,0.997765) \path(1.78405,0.93396)(1.78405,1.00697) \path(1.77862,0.936532)(1.77862,1.01618) \path(1.77319,0.939104)(1.77319,1.02539) \path(1.76775,0.941676)(1.76775,1.0346) \path(1.76232,0.944248)(1.76232,1.04381) \path(1.75689,0.94682)(1.75689,1.05302) \path(1.75146,0.949392)(1.75146,1.06223) \path(1.74603,0.951964)(1.74603,1.07144) \path(1.7406,0.954536)(1.7406,1.08065) \path(1.73517,0.957108)(1.73517,1.08986) \path(1.72973,0.95968)(1.72973,1.09907) \path(1.7243,0.962252)(1.7243,1.10828) \path(1.71887,0.964824)(1.71887,1.11749) \path(1.71344,0.967396)(1.71344,1.1267) \path(1.70801,0.969968)(1.70801,1.13591) \path(1.70258,0.97254)(1.70258,1.14512) \path(1.69715,0.975112)(1.69715,1.15433) \path(1.69171,0.977684)(1.69171,1.16354) \path(1.68628,0.980256)(1.68628,1.17275) \path(1.68085,0.982828)(1.68085,1.16855) \path(1.67542,0.9854)(1.67542,1.15786) \path(1.66999,0.987972)(1.66999,1.14716) \path(1.66456,0.990544)(1.66456,1.13647) \path(1.65912,0.993116)(1.65912,1.12577) \path(1.65369,0.995689)(1.65369,1.11508) \path(1.64826,0.998261)(1.64826,1.10439) \path(1.64283,1.00083)(1.64283,1.09369) \path(1.6374,1.0034)(1.6374,1.083) \path(1.63197,1.00598)(1.63197,1.07231) \path(1.62654,1.00855)(1.62654,1.06161) \path(1.6211,1.01112)(1.6211,1.05092) \path(1.61567,1.01369)(1.61567,1.04022) \path(1.61024,1.01626)(1.61024,1.02953) \color{rgb_000000}% \path(1.68451,1.17575)(1.8438,0.905667)(1.60481,1.01884)(1.68451,1.17575) \path(1.55858,1.06528)(1.62462,1.12321)(1.68451,1.17575) \path(1.64966,0.825085)(1.75291,0.867943)(1.8438,0.905667) \path(1.42984,0.888834)(1.52409,0.958865)(1.60481,1.01884) \path(0.957156,0.537641)(1.4039,0.929569)(1.68451,1.17575) \path(0.957156,0.537641)(1.50556,0.765274)(1.8438,0.905667) \path(0.957156,0.537641)(1.35769,0.835234)(1.60481,1.01884) \color{rgb_e5e5e5}% \path(1.64572,0.826226)(1.5548,1.06009) \path(1.63918,0.828123)(1.55101,1.0549) \path(1.63264,0.830021)(1.54722,1.04971) \path(1.6261,0.831918)(1.54344,1.04452) \path(1.61955,0.833815)(1.53965,1.03933) \path(1.61301,0.835712)(1.53586,1.03414) \path(1.60647,0.837609)(1.53208,1.02895) \path(1.59993,0.839507)(1.52829,1.02376) \path(1.59339,0.841404)(1.5245,1.01857) \path(1.58684,0.843301)(1.52072,1.01338) \path(1.5803,0.845198)(1.51693,1.00819) \path(1.57376,0.847095)(1.51314,1.003) \path(1.56722,0.848993)(1.50936,0.997814) \path(1.56068,0.85089)(1.50557,0.992624) \path(1.55413,0.852787)(1.50178,0.987435) \path(1.54759,0.854684)(1.498,0.982245) \path(1.54105,0.856581)(1.49421,0.977056) \path(1.53451,0.858479)(1.49042,0.971866) \path(1.52797,0.860376)(1.48664,0.966677) \path(1.52142,0.862273)(1.48285,0.961487) \path(1.51488,0.86417)(1.47906,0.956298) \path(1.50834,0.866067)(1.47528,0.951108) \path(1.5018,0.867965)(1.47149,0.945919) \path(1.49526,0.869862)(1.4677,0.940729) \path(1.48871,0.871759)(1.46392,0.93554) \path(1.48217,0.873656)(1.46013,0.93035) \path(1.47563,0.875553)(1.45634,0.925161) \path(1.46909,0.877451)(1.45256,0.919971) \path(1.46255,0.879348)(1.44877,0.914781) \path(1.456,0.881245)(1.44498,0.909592) \path(1.44946,0.883142)(1.4412,0.904402) \path(1.44292,0.885039)(1.43741,0.899213) \path(1.43638,0.886937)(1.43362,0.894023) \path(1.56052,1.06017)(1.55261,1.05709) \path(1.56246,1.05506)(1.54664,1.04891) \path(1.5644,1.04995)(1.54066,1.04072) \path(1.56633,1.04484)(1.53469,1.03253) \path(1.56827,1.03973)(1.52872,1.02435) \path(1.57021,1.03461)(1.52274,1.01616) \path(1.57215,1.0295)(1.51677,1.00797) \path(1.57409,1.02439)(1.5108,0.999787) \path(1.57602,1.01928)(1.50482,0.991601) \path(1.57796,1.01417)(1.49885,0.983414) \path(1.5799,1.00906)(1.49288,0.975228) \path(1.58184,1.00395)(1.4869,0.967042) \path(1.58377,0.998841)(1.48093,0.958855) \path(1.58571,0.993731)(1.47496,0.950669) \path(1.58765,0.988621)(1.46898,0.942483) \path(1.58959,0.98351)(1.46301,0.934296) \path(1.59152,0.9784)(1.45704,0.92611) \path(1.59346,0.973289)(1.45106,0.917923) \path(1.5954,0.968179)(1.44509,0.909737) \path(1.59734,0.963068)(1.43911,0.901551) \path(1.59928,0.957958)(1.43314,0.893364) \path(1.60121,0.952847)(1.43369,0.887715) \path(1.60315,0.947737)(1.44233,0.88521) \path(1.60509,0.942626)(1.45097,0.882705) \path(1.60703,0.937516)(1.45961,0.880199) \path(1.60896,0.932405)(1.46825,0.877694) \path(1.6109,0.927295)(1.47689,0.875189) \path(1.61284,0.922184)(1.48552,0.872684) \path(1.61478,0.917074)(1.49416,0.870179) \path(1.61672,0.911963)(1.5028,0.867673) \path(1.61865,0.906853)(1.51144,0.865168) \path(1.62059,0.901742)(1.52008,0.862663) \path(1.62253,0.896632)(1.52872,0.860158) \path(1.62447,0.891521)(1.53736,0.857653) \path(1.6264,0.886411)(1.54599,0.855147) \path(1.62834,0.8813)(1.55463,0.852642) \path(1.63028,0.87619)(1.56327,0.850137) \path(1.63222,0.871079)(1.57191,0.847632) \path(1.63416,0.865969)(1.58055,0.845127) \path(1.63609,0.860858)(1.58919,0.842621) \path(1.63803,0.855748)(1.59783,0.840116) \path(1.63997,0.850637)(1.60646,0.837611) \path(1.64191,0.845527)(1.6151,0.835106) \path(1.64384,0.840416)(1.62374,0.8326) \path(1.64578,0.835306)(1.63238,0.830095) \path(1.64772,0.830195)(1.64102,0.82759) \color{rgb_000000}% \path(1.55858,1.06528)(1.64966,0.825085)(1.42984,0.888834)(1.55858,1.06528) \path(1.69177,1.3845)(1.6229,1.16677)(1.54714,0.927292) \put(1.69177,1.3845){\makebox(0,0)[b]{\colorbox{rgb_ffffff}{\hbox{\color{rgb_000000}\footnotesize Object}}}} \path(2.05075,0.923554)(1.88188,0.980517)(1.71366,1.03726) \put(2.05075,0.923554){\makebox(0,0)[l]{\colorbox{rgb_ffffff}{\hbox{\color{rgb_000000}\footnotesize Shadow}}}} \put(1.12218,1.68556){\makebox(0,0)[b]{\colorbox{rgb_ffffff}{\hbox{\color{rgb_000000}\footnotesize Target}}}} \path(1.12218,1.68556)(1.29391,1.34894) \path(1.27634,1.40359)(1.2621,1.39054) \path(1.27896,1.39892)(1.26528,1.38638) \path(1.28062,1.39336)(1.26846,1.38222) \path(1.28229,1.38781)(1.27164,1.37806) \path(1.28395,1.38226)(1.27482,1.3739) \path(1.28561,1.3767)(1.278,1.36974) \path(1.28727,1.37115)(1.28118,1.36558) \path(1.28893,1.3656)(1.28437,1.36142) \path(1.29059,1.36005)(1.28755,1.35726) \path(1.29225,1.35449)(1.29073,1.3531) \path(1.25949,1.39395)(1.29061,1.35998) \path(1.26348,1.39703)(1.28731,1.37102) \path(1.26812,1.39939)(1.28401,1.38205) \path(1.27276,1.40176)(1.28071,1.39309) \path(1.26816,1.39941)(1.25892,1.3947)(1.29391,1.34894) (1.2774,1.40413)(1.26816,1.39941) \put(1.3125,1.3125){\color{rgb_000000}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \allinethickness{0.8pt}% \path(0.957156,0.537641)(1.55482,0.490175) \allinethickness{0.0055348in}% \path(1.4989,0.489651)(1.50786,0.485229) \path(1.49933,0.495061)(1.51726,0.486218) \path(1.49976,0.500472)(1.52665,0.487207) \path(1.50454,0.503736)(1.53604,0.488197) \path(1.52968,0.496955)(1.54543,0.489186) \path(1.54888,0.489549)(1.54985,0.491516) \path(1.54293,0.488923)(1.54487,0.492858) \path(1.53699,0.488297)(1.5399,0.494199) \path(1.53104,0.487671)(1.53493,0.495541) \path(1.5251,0.487045)(1.52995,0.496882) \path(1.51916,0.486419)(1.52498,0.498223) \path(1.51321,0.485792)(1.52001,0.499565) \path(1.50727,0.485166)(1.51504,0.500906) \path(1.50133,0.48454)(1.51006,0.502247) \path(1.49903,0.491318)(1.50509,0.503589) \allinethickness{0.8pt}% \path(1.49929,0.494585)(1.49847,0.48424)(1.55482,0.490175) (1.50012,0.50493)(1.49929,0.494585) \path(0.957156,0.537641)(0.790401,0.174015) \allinethickness{0.0055348in}% \path(0.807364,0.192334)(0.808098,0.200697) \path(0.80171,0.186228)(0.803178,0.202954) \path(0.796055,0.180122)(0.798257,0.20521) \path(0.807022,0.201191)(0.793617,0.202367) \path(0.810836,0.196084)(0.793081,0.197642) \path(0.806749,0.19167)(0.792545,0.192917) \path(0.802662,0.187256)(0.792009,0.188191) \path(0.798575,0.182843)(0.791473,0.183466) \path(0.794488,0.178429)(0.790937,0.178741) \allinethickness{0.8pt}% \path(0.803586,0.202767)(0.794153,0.207092)(0.790401,0.174015) (0.813019,0.198441)(0.803586,0.202767) \path(0.957156,0.537641)(0.937572,1.09205) \allinethickness{0.0055348in}% \path(0.938782,1.08718)(0.936611,1.08655) \path(0.939993,1.08231)(0.935649,1.08104) \path(0.941204,1.07743)(0.934688,1.07554) \path(0.942414,1.07256)(0.933727,1.07003) \path(0.943625,1.06769)(0.932765,1.06453) \path(0.944835,1.06282)(0.931804,1.05902) \path(0.946046,1.05794)(0.930842,1.05352) \path(0.947256,1.05307)(0.929881,1.04801) \path(0.948467,1.0482)(0.929251,1.04261) \path(0.931094,1.05496)(0.934635,1.0428) \path(0.933253,1.06732)(0.940334,1.043) \path(0.935413,1.07969)(0.946034,1.0432) \allinethickness{0.8pt}% \path(0.939306,1.04296)(0.949677,1.04333)(0.937572,1.09205) (0.928935,1.0426)(0.939306,1.04296) \end{picture}% epix-1.2.14/doc/ePiX.eepic0000644000175000017500000016505710675330103014173 0ustar hwanghwang%% Generated from ePiX.xp on Sat Sep 22 20:16:03 EDT 2007 by %% ePiX-1.2.0 %% %% Cartesian bounding box: [-0.5,5.75] x [2,10] %% Actual size: 4 x 7.5in %% Figure offset: left by 0in, down by 0in %% %% usepackages epic,eepic,xcolor %% \xdefinecolor{cmy_000019}{cmyk}{0,0,0.0980392,0}% \xdefinecolor{rgb_0000ff}{rgb}{0,0,1}% \xdefinecolor{rgb_009800}{rgb}{0,0.596078,0}% \xdefinecolor{rgb_7f7f7f}{rgb}{0.498039,0.498039,0.498039}% \xdefinecolor{rgb_ff0000}{rgb}{1,0,0}% \setlength{\unitlength}{1in}% \begin{picture}(4,7.5)(0,0)% \color{rgb_7f7f7f}% \path(0.32,7.03125)(0.96,7.03125) \path(0.902922,7.02606)(0.931461,7.02606) \path(0.902922,7.03125)(0.96,7.03125) \path(0.902922,7.03644)(0.931461,7.03644) \path(0.954811,7.03031)(0.954811,7.03219) \path(0.949622,7.02936)(0.949622,7.03314) \path(0.944433,7.02842)(0.944433,7.03408) \path(0.939244,7.02748)(0.939244,7.03502) \path(0.934056,7.02653)(0.934056,7.03597) \path(0.928867,7.02559)(0.928867,7.03691) \path(0.923678,7.02465)(0.923678,7.03785) \path(0.918489,7.0237)(0.918489,7.0388) \path(0.9133,7.02276)(0.9133,7.03974) \path(0.908111,7.02182)(0.908111,7.04068) \path(0.902922,7.02087)(0.902922,7.04163) \path(0.902922,7.03125)(0.902922,7.02087)(0.96,7.03125) (0.902922,7.04163)(0.902922,7.03125) \put(0.32,7.0866){\makebox(0,0)[b]{\hbox{\color{rgb_7f7f7f}\footnotesize \texttt{xp}, \texttt{flx}}}} \put(0.32,7.03125){\color{rgb_7f7f7f}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \put(0.97999,7.08981){\makebox(0,0)[b]{\hbox{\color{rgb_7f7f7f}\footnotesize \texttt{eepic}}}} \put(0.96,7.03125){\color{rgb_7f7f7f}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \allinethickness{1.2pt}% \color{rgb_ff0000}% \path(0.96,7.03125)(0.963187,7.03115)(0.966347,7.03086) (0.969482,7.03039)(0.972591,7.02972)(0.975676,7.02888) (0.978736,7.02785)(0.981772,7.02665)(0.984785,7.02528) (0.987774,7.02374)(0.990741,7.02203)(0.993685,7.02016) (0.996608,7.01813)(0.999509,7.01594)(1.00239,7.0136) (1.00525,7.01111)(1.00809,7.00847)(1.01091,7.00569) (1.01371,7.00277)(1.01649,6.99972)(1.01926,6.99653) (1.02201,6.99321)(1.02474,6.98976)(1.02745,6.98619)(1.03014,6.9825) (1.03282,6.97869)(1.03549,6.97477)(1.03814,6.97074)(1.04077,6.9666) (1.04339,6.96235)(1.046,6.95801)(1.04859,6.95356)(1.05117,6.94903) (1.05374,6.9444)(1.0563,6.93968)(1.05884,6.93488)(1.06138,6.93) (1.0639,6.92504)(1.06641,6.92)(1.06891,6.9149)(1.07141,6.90972) (1.07389,6.90448)(1.07637,6.89918)(1.07884,6.89382)(1.0813,6.8884) (1.08375,6.88293)(1.0862,6.87742)(1.08864,6.87185)(1.09107,6.86625) (1.0935,6.86061)(1.09593,6.85493)(1.09835,6.84921)(1.10076,6.84347) (1.10317,6.8377)(1.10558,6.83191)(1.10799,6.8261)(1.1104,6.82028) (1.1128,6.81444)(1.1152,6.80859)(1.1176,6.80273)(1.12,6.79688) (1.1224,6.79102)(1.1248,6.78516)(1.1272,6.77931)(1.1296,6.77347) (1.13201,6.76765)(1.13442,6.76184)(1.13683,6.75605) (1.13924,6.75028)(1.14165,6.74454)(1.14407,6.73882)(1.1465,6.73314) (1.14893,6.7275)(1.15136,6.7219)(1.1538,6.71633)(1.15625,6.71082) (1.1587,6.70535)(1.16116,6.69993)(1.16363,6.69457)(1.16611,6.68927) (1.16859,6.68403)(1.17109,6.67885)(1.17359,6.67375)(1.1761,6.66871) (1.17862,6.66375)(1.18116,6.65887)(1.1837,6.65407)(1.18626,6.64935) (1.18883,6.64472)(1.19141,6.64019)(1.194,6.63574)(1.19661,6.6314) (1.19923,6.62715)(1.20186,6.62301)(1.20451,6.61898) (1.20718,6.61506)(1.20986,6.61125)(1.21255,6.60756) (1.21526,6.60399)(1.21799,6.60054)(1.22074,6.59722) (1.22351,6.59403)(1.22629,6.59098)(1.22909,6.58806) (1.23191,6.58528)(1.23475,6.58264)(1.23761,6.58015) (1.24049,6.57781)(1.24339,6.57562)(1.24631,6.57359) (1.24926,6.57172)(1.25223,6.57001)(1.25522,6.56847)(1.25823,6.5671) (1.26126,6.5659)(1.26432,6.56487)(1.26741,6.56403)(1.27052,6.56336) (1.27365,6.56289)(1.27681,6.5626)(1.28,6.5625) \path(1.28,6.5625)(1.6,6.5625) \allinethickness{0.0055348in}% \path(1.59481,6.56156)(1.59402,6.56359) \path(1.58962,6.56061)(1.58804,6.56467) \path(1.58443,6.55967)(1.58207,6.56576) \path(1.57924,6.55873)(1.57609,6.56685) \path(1.57406,6.55778)(1.57011,6.56793) \path(1.56887,6.55684)(1.56413,6.56902) \path(1.56368,6.5559)(1.55815,6.57011) \path(1.55849,6.55495)(1.55217,6.5712) \path(1.5533,6.55401)(1.5462,6.57228) \path(1.54811,6.55307)(1.54292,6.56641) \path(1.55244,6.57115)(1.54292,6.56745) \path(1.56195,6.56942)(1.54292,6.56202) \path(1.57146,6.56769)(1.54292,6.55659) \path(1.58097,6.56596)(1.54755,6.55296) \path(1.59049,6.56423)(1.57377,6.55773) \allinethickness{1.2pt}% \path(1.54292,6.5625)(1.54292,6.55212)(1.6,6.5625)(1.54292,6.57288)(1.54292,6.5625) \path(1.6,6.5625)(2.24,6.5625) \allinethickness{0.0055348in}% \path(2.18926,6.57172)(2.18292,6.56591) \path(2.19561,6.57057)(2.18292,6.55895) \path(2.20195,6.56942)(2.1831,6.55216) \path(2.20829,6.56827)(2.19259,6.55388) \path(2.21463,6.56711)(2.20207,6.5556) \path(2.22097,6.56596)(2.21155,6.55733) \path(2.22732,6.56481)(2.22103,6.55905) \path(2.23366,6.56365)(2.23052,6.56078) \path(2.18292,6.5602)(2.18926,6.55328) \path(2.18292,6.56827)(2.19561,6.55443) \path(2.18674,6.57218)(2.20195,6.55558) \path(2.19562,6.57057)(2.20829,6.55673) \path(2.20449,6.56896)(2.21463,6.55789) \path(2.21337,6.56734)(2.22097,6.55904) \path(2.22225,6.56573)(2.22732,6.56019) \path(2.23112,6.56411)(2.23366,6.56135) \allinethickness{1.2pt}% \path(2.18292,6.5625)(2.18292,6.55212)(2.24,6.5625) (2.18292,6.57288)(2.18292,6.5625) \put(1.6,6.61785){\makebox(0,0)[b]{\fboxrule0.1pt% \fcolorbox{rgb_ff0000}{cmy_000019}{\hbox{\color{rgb_0000ff}\footnotesize \texttt{dvi}}}}} \put(1.6,6.5625){\color{rgb_0000ff}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \put(2.21793,6.59482){\makebox(0,0)[br]{\fboxrule0.1pt% \fcolorbox{rgb_ff0000}{cmy_000019}{\hbox{\color{rgb_0000ff}\footnotesize \texttt{ps}}}}} \put(2.24,6.5625){\color{rgb_0000ff}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \path(0.96,6.09375)(0.963187,6.09385)(0.966347,6.09414) (0.969482,6.09461)(0.972591,6.09528)(0.975676,6.09612) (0.978736,6.09715)(0.981772,6.09835)(0.984785,6.09972) (0.987774,6.10126)(0.990741,6.10297)(0.993685,6.10484) (0.996608,6.10687)(0.999509,6.10906)(1.00239,6.1114) (1.00525,6.11389)(1.00809,6.11653)(1.01091,6.11931) (1.01371,6.12223)(1.01649,6.12528)(1.01926,6.12847) (1.02201,6.13179)(1.02474,6.13524)(1.02745,6.13881)(1.03014,6.1425) (1.03282,6.14631)(1.03549,6.15023)(1.03814,6.15426)(1.04077,6.1584) (1.04339,6.16265)(1.046,6.16699)(1.04859,6.17144)(1.05117,6.17597) (1.05374,6.1806)(1.0563,6.18532)(1.05884,6.19012)(1.06138,6.195) (1.0639,6.19996)(1.06641,6.205)(1.06891,6.2101)(1.07141,6.21528) (1.07389,6.22052)(1.07637,6.22582)(1.07884,6.23118)(1.0813,6.2366) (1.08375,6.24207)(1.0862,6.24758)(1.08864,6.25315)(1.09107,6.25875) (1.0935,6.26439)(1.09593,6.27007)(1.09835,6.27579)(1.10076,6.28153) (1.10317,6.2873)(1.10558,6.29309)(1.10799,6.2989)(1.1104,6.30472) (1.1128,6.31056)(1.1152,6.31641)(1.1176,6.32227)(1.12,6.32812) (1.1224,6.33398)(1.1248,6.33984)(1.1272,6.34569)(1.1296,6.35153) (1.13201,6.35735)(1.13442,6.36316)(1.13683,6.36895) (1.13924,6.37472)(1.14165,6.38046)(1.14407,6.38618)(1.1465,6.39186) (1.14893,6.3975)(1.15136,6.4031)(1.1538,6.40867)(1.15625,6.41418) (1.1587,6.41965)(1.16116,6.42507)(1.16363,6.43043)(1.16611,6.43573) (1.16859,6.44097)(1.17109,6.44615)(1.17359,6.45125)(1.1761,6.45629) (1.17862,6.46125)(1.18116,6.46613)(1.1837,6.47093)(1.18626,6.47565) (1.18883,6.48028)(1.19141,6.48481)(1.194,6.48926)(1.19661,6.4936) (1.19923,6.49785)(1.20186,6.50199)(1.20451,6.50602) (1.20718,6.50994)(1.20986,6.51375)(1.21255,6.51744) (1.21526,6.52101)(1.21799,6.52446)(1.22074,6.52778) (1.22351,6.53097)(1.22629,6.53402)(1.22909,6.53694) (1.23191,6.53972)(1.23475,6.54236)(1.23761,6.54485) (1.24049,6.54719)(1.24339,6.54938)(1.24631,6.55141) (1.24926,6.55328)(1.25223,6.55499)(1.25522,6.55653)(1.25823,6.5579) (1.26126,6.5591)(1.26432,6.56013)(1.26741,6.56097)(1.27052,6.56164) (1.27365,6.56211)(1.27681,6.5624)(1.28,6.5625) \put(0.97999,6.03519){\makebox(0,0)[t]{\fboxrule0.1pt% \fcolorbox{rgb_ff0000}{cmy_000019}{\hbox{\color{rgb_0000ff}\footnotesize \texttt{tex}}}}} \put(0.96,6.09375){\color{rgb_0000ff}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \path(2.24,6.5625)(2.24533,6.55472)(2.25067,6.54701)(2.256,6.53936) (2.26133,6.53177)(2.26667,6.52425)(2.272,6.5168)(2.27733,6.50941) (2.28267,6.50208)(2.288,6.49482)(2.29333,6.48763)(2.29867,6.4805) (2.304,6.47344)(2.30933,6.46644)(2.31467,6.45951)(2.32,6.45264) (2.32533,6.44583)(2.33067,6.4391)(2.336,6.43242)(2.34133,6.42581) (2.34667,6.41927)(2.352,6.41279)(2.35733,6.40638)(2.36267,6.40003) (2.368,6.39375)(2.37333,6.38753)(2.37867,6.38138)(2.384,6.37529) (2.38933,6.36927)(2.39467,6.36331)(2.4,6.35742)(2.40533,6.3516) (2.41067,6.34583)(2.416,6.34014)(2.42133,6.33451)(2.42667,6.32894) (2.432,6.32344)(2.43733,6.318)(2.44267,6.31263)(2.448,6.30732) (2.45333,6.30208)(2.45867,6.29691)(2.464,6.2918)(2.46933,6.28675) (2.47467,6.28177)(2.48,6.27686)(2.48533,6.27201)(2.49067,6.26722) (2.496,6.2625)(2.50133,6.25785)(2.50667,6.25326)(2.512,6.24873) (2.51733,6.24427)(2.52267,6.23988)(2.528,6.23555)(2.53333,6.23128) (2.53867,6.22708)(2.544,6.22295)(2.54933,6.21888)(2.55467,6.21488) (2.56,6.21094)(2.56533,6.20706)(2.57067,6.20326)(2.576,6.19951) (2.58133,6.19583)(2.58667,6.19222)(2.592,6.18867)(2.59733,6.18519) (2.60267,6.18177)(2.608,6.17842)(2.61333,6.17513)(2.61867,6.17191) (2.624,6.16875)(2.62933,6.16566)(2.63467,6.16263)(2.64,6.15967) (2.64533,6.15677)(2.65067,6.15394)(2.656,6.15117)(2.66133,6.14847) (2.66667,6.14583)(2.672,6.14326)(2.67733,6.14076)(2.68267,6.13831) (2.688,6.13594)(2.69333,6.13363)(2.69867,6.13138)(2.704,6.1292) (2.70933,6.12708)(2.71467,6.12503)(2.72,6.12305)(2.72533,6.12113) (2.73067,6.11927)(2.736,6.11748)(2.74133,6.11576)(2.74667,6.1141) (2.752,6.1125)(2.75733,6.11097)(2.76267,6.10951)(2.768,6.10811) (2.77333,6.10677)(2.77867,6.1055)(2.784,6.1043)(2.78933,6.10316) (2.79467,6.10208)(2.8,6.10107)(2.80533,6.10013)(2.81067,6.09925) (2.816,6.09844)(2.82133,6.09769)(2.82667,6.09701)(2.832,6.09639) (2.83733,6.09583)(2.84267,6.09535)(2.848,6.09492)(2.85333,6.09456) (2.85867,6.09427)(2.864,6.09404)(2.86933,6.09388)(2.87467,6.09378)(2.88,6.09375) \allinethickness{0.0055348in}% \path(2.82289,6.08916)(2.83102,6.08515) \path(2.82293,6.09461)(2.83919,6.08659) \path(2.82296,6.10005)(2.84735,6.08802) \path(2.82634,6.10385)(2.85551,6.08945) \path(2.84423,6.10048)(2.86367,6.09088) \path(2.86211,6.09712)(2.87184,6.09232) \path(2.8738,6.09266)(2.87482,6.09473) \path(2.8676,6.09157)(2.86963,6.0957) \path(2.8614,6.09048)(2.86445,6.09668) \path(2.8552,6.0894)(2.85927,6.09765) \path(2.84899,6.08831)(2.85408,6.09863) \path(2.84279,6.08722)(2.8489,6.0996) \path(2.83659,6.08613)(2.84372,6.10058) \path(2.83039,6.08504)(2.83854,6.10155) \path(2.82419,6.08395)(2.83335,6.10253) \path(2.82292,6.09285)(2.82817,6.1035) \allinethickness{1.2pt}% \path(2.82292,6.0941)(2.82286,6.08372)(2.88,6.09375) (2.82299,6.10448)(2.82292,6.0941) \put(2.93535,6.09375){\makebox(0,0)[l]{\fboxrule0.1pt% \fcolorbox{rgb_ff0000}{cmy_000019}{\hbox{\color{rgb_0000ff}\footnotesize \texttt{pdf}}}}} \put(2.88,6.09375){\color{rgb_0000ff}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \allinethickness{0.4pt}% \color{rgb_7f7f7f}% \path(2.24,6.5625)(2.24533,6.57028)(2.25067,6.57799)(2.256,6.58564) (2.26133,6.59323)(2.26667,6.60075)(2.272,6.6082)(2.27733,6.61559) (2.28267,6.62292)(2.288,6.63018)(2.29333,6.63737)(2.29867,6.6445) (2.304,6.65156)(2.30933,6.65856)(2.31467,6.66549)(2.32,6.67236) (2.32533,6.67917)(2.33067,6.6859)(2.336,6.69258)(2.34133,6.69919) (2.34667,6.70573)(2.352,6.71221)(2.35733,6.71862)(2.36267,6.72497) (2.368,6.73125)(2.37333,6.73747)(2.37867,6.74362)(2.384,6.74971) (2.38933,6.75573)(2.39467,6.76169)(2.4,6.76758)(2.40533,6.7734) (2.41067,6.77917)(2.416,6.78486)(2.42133,6.79049)(2.42667,6.79606) (2.432,6.80156)(2.43733,6.807)(2.44267,6.81237)(2.448,6.81768) (2.45333,6.82292)(2.45867,6.82809)(2.464,6.8332)(2.46933,6.83825) (2.47467,6.84323)(2.48,6.84814)(2.48533,6.85299)(2.49067,6.85778) (2.496,6.8625)(2.50133,6.86715)(2.50667,6.87174)(2.512,6.87627) (2.51733,6.88073)(2.52267,6.88512)(2.528,6.88945)(2.53333,6.89372) (2.53867,6.89792)(2.544,6.90205)(2.54933,6.90612)(2.55467,6.91012) (2.56,6.91406)(2.56533,6.91794)(2.57067,6.92174)(2.576,6.92549) (2.58133,6.92917)(2.58667,6.93278)(2.592,6.93633)(2.59733,6.93981) (2.60267,6.94323)(2.608,6.94658)(2.61333,6.94987)(2.61867,6.95309) (2.624,6.95625)(2.62933,6.95934)(2.63467,6.96237)(2.64,6.96533) (2.64533,6.96823)(2.65067,6.97106)(2.656,6.97383)(2.66133,6.97653) (2.66667,6.97917)(2.672,6.98174)(2.67733,6.98424)(2.68267,6.98669) (2.688,6.98906)(2.69333,6.99137)(2.69867,6.99362)(2.704,6.9958) (2.70933,6.99792)(2.71467,6.99997)(2.72,7.00195)(2.72533,7.00387) (2.73067,7.00573)(2.736,7.00752)(2.74133,7.00924)(2.74667,7.0109) (2.752,7.0125)(2.75733,7.01403)(2.76267,7.01549)(2.768,7.01689) (2.77333,7.01823)(2.77867,7.0195)(2.784,7.0207)(2.78933,7.02184) (2.79467,7.02292)(2.8,7.02393)(2.80533,7.02487)(2.81067,7.02575) (2.816,7.02656)(2.82133,7.02731)(2.82667,7.02799)(2.832,7.02861) (2.83733,7.02917)(2.84267,7.02965)(2.848,7.03008)(2.85333,7.03044) (2.85867,7.03073)(2.864,7.03096)(2.86933,7.03112)(2.87467,7.03122)(2.88,7.03125) \path(2.87464,7.03024)(2.87481,7.03216) \path(2.86927,7.02923)(2.86961,7.03307) \path(2.86391,7.02822)(2.86442,7.03399) \path(2.85855,7.02721)(2.85922,7.0349) \path(2.85318,7.02621)(2.85403,7.03581) \path(2.84782,7.0252)(2.84883,7.03672) \path(2.84246,7.02419)(2.84364,7.03763) \path(2.8371,7.02318)(2.83844,7.03854) \path(2.83173,7.02217)(2.83325,7.03946) \path(2.82637,7.02116)(2.82805,7.04037) \path(2.87938,7.03113)(2.82289,7.03609) \path(2.86058,7.0276)(2.82292,7.0309) \path(2.84178,7.02406)(2.82296,7.02571) \path(2.82292,7.0309)(2.82299,7.02052)(2.88,7.03125) (2.82286,7.04128)(2.82292,7.0309) \put(2.86001,7.08981){\makebox(0,0)[b]{\hbox{\color{rgb_7f7f7f}\footnotesize \texttt{eps}}}} \put(2.88,7.03125){\color{rgb_7f7f7f}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \path(2.88,7.03125)(3.52,7.03125) \path(3.47434,7.03955)(3.46292,7.03623) \path(3.48575,7.03748)(3.46292,7.03083) \path(3.49717,7.0354)(3.46292,7.02543) \path(3.50858,7.03333)(3.4706,7.02227) \path(3.46292,7.03964)(3.46811,7.02182) \path(3.46808,7.04069)(3.4733,7.02276) \path(3.47385,7.03964)(3.47849,7.0237) \path(3.47962,7.03859)(3.48368,7.02465) \path(3.48539,7.03754)(3.48887,7.02559) \path(3.49116,7.03649)(3.49406,7.02653) \path(3.49692,7.03545)(3.49924,7.02748) \path(3.50269,7.0344)(3.50443,7.02842) \path(3.50846,7.03335)(3.50962,7.02936) \path(3.51423,7.0323)(3.51481,7.03031) \path(3.46292,7.03125)(3.46292,7.02087)(3.52,7.03125) (3.46292,7.04163)(3.46292,7.03125) \put(3.57535,7.03125){\makebox(0,0)[l]{\hbox{\color{rgb_7f7f7f}\footnotesize \begin{minipage}{0.225in}\texttt{png mng gif}\end{minipage}}}} \put(3.52,7.03125){\color{rgb_7f7f7f}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \put(1.92,6.09375){\makebox(0,0)[c]{\hbox{\color{rgb_009800}\texttt{\Large laps}}}} \allinethickness{1.2pt}% \color{rgb_ff0000}% \path(0.32,5.15625)(0.96,5.15625) \allinethickness{0.0055348in}% \path(0.902922,5.15435)(0.90863,5.14691) \path(0.902922,5.16284)(0.914338,5.14795) \path(0.907102,5.16587)(0.920046,5.14899) \path(0.914659,5.16449)(0.925753,5.15002) \path(0.922216,5.16312)(0.931461,5.15106) \path(0.929773,5.16175)(0.937169,5.1521) \path(0.93733,5.16037)(0.942877,5.15314) \path(0.944886,5.159)(0.948584,5.15417) \path(0.952443,5.15762)(0.954292,5.15521) \path(0.948429,5.15415)(0.952865,5.15755) \path(0.936859,5.15204)(0.945731,5.15884) \path(0.925288,5.14994)(0.938596,5.16014) \path(0.913717,5.14783)(0.931461,5.16144) \path(0.902922,5.14633)(0.924326,5.16274) \path(0.902922,5.15309)(0.917192,5.16403) \path(0.902922,5.15986)(0.910057,5.16533) \allinethickness{1.2pt}% \path(0.902922,5.15625)(0.902922,5.14587)(0.96,5.15625) (0.902922,5.16663)(0.902922,5.15625) \put(0.32,5.2116){\makebox(0,0)[b]{\fboxrule0.1pt% \fcolorbox{rgb_ff0000}{cmy_000019}{\hbox{\color{rgb_0000ff}\texttt{\footnotesize \texttt{xp}, \texttt{flx}}}}}} \put(0.32,5.15625){\color{rgb_0000ff}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \put(0.97999,5.21481){\makebox(0,0)[b]{\fboxrule0.1pt% \fcolorbox{rgb_ff0000}{cmy_000019}{\hbox{\color{rgb_0000ff}\texttt{\footnotesize \texttt{eepic}}}}}} \put(0.96,5.15625){\color{rgb_0000ff}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \allinethickness{0.4pt}% \color{rgb_7f7f7f}% \path(0.96,5.15625)(0.963187,5.15615)(0.966347,5.15586) (0.969482,5.15539)(0.972591,5.15472)(0.975676,5.15388) (0.978736,5.15285)(0.981772,5.15165)(0.984785,5.15028) (0.987774,5.14874)(0.990741,5.14703)(0.993685,5.14516) (0.996608,5.14313)(0.999509,5.14094)(1.00239,5.1386) (1.00525,5.13611)(1.00809,5.13347)(1.01091,5.13069) (1.01371,5.12777)(1.01649,5.12472)(1.01926,5.12153) (1.02201,5.11821)(1.02474,5.11476)(1.02745,5.11119)(1.03014,5.1075) (1.03282,5.10369)(1.03549,5.09977)(1.03814,5.09574)(1.04077,5.0916) (1.04339,5.08735)(1.046,5.08301)(1.04859,5.07856)(1.05117,5.07403) (1.05374,5.0694)(1.0563,5.06468)(1.05884,5.05988)(1.06138,5.055) (1.0639,5.05004)(1.06641,5.045)(1.06891,5.0399)(1.07141,5.03472) (1.07389,5.02948)(1.07637,5.02418)(1.07884,5.01882)(1.0813,5.0134) (1.08375,5.00793)(1.0862,5.00242)(1.08864,4.99685)(1.09107,4.99125) (1.0935,4.98561)(1.09593,4.97993)(1.09835,4.97421)(1.10076,4.96847) (1.10317,4.9627)(1.10558,4.95691)(1.10799,4.9511)(1.1104,4.94528) (1.1128,4.93944)(1.1152,4.93359)(1.1176,4.92773)(1.12,4.92188) (1.1224,4.91602)(1.1248,4.91016)(1.1272,4.90431)(1.1296,4.89847) (1.13201,4.89265)(1.13442,4.88684)(1.13683,4.88105) (1.13924,4.87528)(1.14165,4.86954)(1.14407,4.86382)(1.1465,4.85814) (1.14893,4.8525)(1.15136,4.8469)(1.1538,4.84133)(1.15625,4.83582) (1.1587,4.83035)(1.16116,4.82493)(1.16363,4.81957)(1.16611,4.81427) (1.16859,4.80903)(1.17109,4.80385)(1.17359,4.79875)(1.1761,4.79371) (1.17862,4.78875)(1.18116,4.78387)(1.1837,4.77907)(1.18626,4.77435) (1.18883,4.76972)(1.19141,4.76519)(1.194,4.76074)(1.19661,4.7564) (1.19923,4.75215)(1.20186,4.74801)(1.20451,4.74398) (1.20718,4.74006)(1.20986,4.73625)(1.21255,4.73256) (1.21526,4.72899)(1.21799,4.72554)(1.22074,4.72222) (1.22351,4.71903)(1.22629,4.71598)(1.22909,4.71306) (1.23191,4.71028)(1.23475,4.70764)(1.23761,4.70515) (1.24049,4.70281)(1.24339,4.70063)(1.24631,4.69859) (1.24926,4.69672)(1.25223,4.69501)(1.25522,4.69347)(1.25823,4.6921) (1.26126,4.6909)(1.26432,4.68987)(1.26741,4.68903)(1.27052,4.68836) (1.27365,4.68789)(1.27681,4.6876)(1.28,4.6875) \path(1.28,4.6875)(1.6,4.6875) \path(1.59287,4.6862)(1.59429,4.68854) \path(1.58575,4.68491)(1.58858,4.68958) \path(1.57862,4.68361)(1.58288,4.69061) \path(1.5715,4.68232)(1.57717,4.69165) \path(1.56437,4.68102)(1.57146,4.69269) \path(1.55725,4.67973)(1.56575,4.69373) \path(1.55012,4.67843)(1.56005,4.69476) \path(1.543,4.67714)(1.55434,4.6958) \path(1.54292,4.68744)(1.54863,4.69684) \path(1.59185,4.68602)(1.58488,4.69025) \path(1.58369,4.68453)(1.56976,4.693) \path(1.57554,4.68305)(1.55464,4.69575) \path(1.56738,4.68157)(1.54292,4.69643) \path(1.55923,4.68009)(1.54292,4.68999) \path(1.55108,4.6786)(1.54292,4.68356) \path(1.54292,4.6875)(1.54292,4.67712)(1.6,4.6875)(1.54292,4.69788)(1.54292,4.6875) \path(1.6,4.6875)(2.24,4.6875) \path(2.22632,4.68501)(2.18292,4.69269) \path(2.21185,4.68238)(2.18292,4.6875) \path(2.19739,4.67975)(2.18292,4.68231) \path(2.18811,4.69693)(2.18466,4.67744) \path(2.1933,4.69599)(2.1902,4.67844) \path(2.19849,4.69505)(2.19573,4.67945) \path(2.20368,4.6941)(2.20126,4.68046) \path(2.20887,4.69316)(2.2068,4.68146) \path(2.21406,4.69222)(2.21233,4.68247) \path(2.21924,4.69127)(2.21787,4.68348) \path(2.22443,4.69033)(2.2234,4.68448) \path(2.22962,4.68939)(2.22893,4.68549) \path(2.23481,4.68844)(2.23447,4.68649) \path(2.18292,4.6875)(2.18292,4.67712)(2.24,4.6875) (2.18292,4.69788)(2.18292,4.6875) \put(1.6,4.74285){\makebox(0,0)[b]{\hbox{\color{rgb_7f7f7f}\texttt{\footnotesize \texttt{dvi}}}}} \put(1.6,4.6875){\color{rgb_7f7f7f}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \put(2.21793,4.71982){\makebox(0,0)[br]{\hbox{\color{rgb_7f7f7f}\texttt{\footnotesize \texttt{ps}}}}} \put(2.24,4.6875){\color{rgb_7f7f7f}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \path(0.96,4.21875)(0.963187,4.21885)(0.966347,4.21914) (0.969482,4.21961)(0.972591,4.22028)(0.975676,4.22112) (0.978736,4.22215)(0.981772,4.22335)(0.984785,4.22472) (0.987774,4.22626)(0.990741,4.22797)(0.993685,4.22984) (0.996608,4.23188)(0.999509,4.23406)(1.00239,4.2364) (1.00525,4.23889)(1.00809,4.24153)(1.01091,4.24431) (1.01371,4.24723)(1.01649,4.25028)(1.01926,4.25347) (1.02201,4.25679)(1.02474,4.26024)(1.02745,4.26381)(1.03014,4.2675) (1.03282,4.27131)(1.03549,4.27523)(1.03814,4.27926)(1.04077,4.2834) (1.04339,4.28765)(1.046,4.29199)(1.04859,4.29644)(1.05117,4.30097) (1.05374,4.3056)(1.0563,4.31032)(1.05884,4.31512)(1.06138,4.32) (1.0639,4.32496)(1.06641,4.33)(1.06891,4.3351)(1.07141,4.34028) (1.07389,4.34552)(1.07637,4.35082)(1.07884,4.35618)(1.0813,4.3616) (1.08375,4.36707)(1.0862,4.37258)(1.08864,4.37815)(1.09107,4.38375) (1.0935,4.38939)(1.09593,4.39507)(1.09835,4.40079)(1.10076,4.40653) (1.10317,4.4123)(1.10558,4.41809)(1.10799,4.4239)(1.1104,4.42972) (1.1128,4.43556)(1.1152,4.44141)(1.1176,4.44727)(1.12,4.45312) (1.1224,4.45898)(1.1248,4.46484)(1.1272,4.47069)(1.1296,4.47653) (1.13201,4.48235)(1.13442,4.48816)(1.13683,4.49395) (1.13924,4.49972)(1.14165,4.50546)(1.14407,4.51118)(1.1465,4.51686) (1.14893,4.5225)(1.15136,4.5281)(1.1538,4.53367)(1.15625,4.53918) (1.1587,4.54465)(1.16116,4.55007)(1.16363,4.55543)(1.16611,4.56073) (1.16859,4.56597)(1.17109,4.57115)(1.17359,4.57625)(1.1761,4.58129) (1.17862,4.58625)(1.18116,4.59113)(1.1837,4.59593)(1.18626,4.60065) (1.18883,4.60528)(1.19141,4.60981)(1.194,4.61426)(1.19661,4.6186) (1.19923,4.62285)(1.20186,4.62699)(1.20451,4.63102) (1.20718,4.63494)(1.20986,4.63875)(1.21255,4.64244) (1.21526,4.64601)(1.21799,4.64946)(1.22074,4.65278) (1.22351,4.65597)(1.22629,4.65902)(1.22909,4.66194) (1.23191,4.66472)(1.23475,4.66736)(1.23761,4.66985) (1.24049,4.67219)(1.24339,4.67437)(1.24631,4.67641) (1.24926,4.67828)(1.25223,4.67999)(1.25522,4.68153)(1.25823,4.6829) (1.26126,4.6841)(1.26432,4.68513)(1.26741,4.68597)(1.27052,4.68664) (1.27365,4.68711)(1.27681,4.6874)(1.28,4.6875) \put(0.97999,4.16019){\makebox(0,0)[t]{\hbox{\color{rgb_7f7f7f}\texttt{\footnotesize \texttt{tex}}}}} \put(0.96,4.21875){\color{rgb_7f7f7f}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \path(2.24,4.6875)(2.24533,4.67972)(2.25067,4.67201)(2.256,4.66436) (2.26133,4.65677)(2.26667,4.64925)(2.272,4.6418)(2.27733,4.63441) (2.28267,4.62708)(2.288,4.61982)(2.29333,4.61263)(2.29867,4.6055) (2.304,4.59844)(2.30933,4.59144)(2.31467,4.58451)(2.32,4.57764) (2.32533,4.57083)(2.33067,4.5641)(2.336,4.55742)(2.34133,4.55081) (2.34667,4.54427)(2.352,4.53779)(2.35733,4.53138)(2.36267,4.52503) (2.368,4.51875)(2.37333,4.51253)(2.37867,4.50638)(2.384,4.50029) (2.38933,4.49427)(2.39467,4.48831)(2.4,4.48242)(2.40533,4.4766) (2.41067,4.47083)(2.416,4.46514)(2.42133,4.45951)(2.42667,4.45394) (2.432,4.44844)(2.43733,4.443)(2.44267,4.43763)(2.448,4.43232) (2.45333,4.42708)(2.45867,4.42191)(2.464,4.4168)(2.46933,4.41175) (2.47467,4.40677)(2.48,4.40186)(2.48533,4.39701)(2.49067,4.39222) (2.496,4.3875)(2.50133,4.38285)(2.50667,4.37826)(2.512,4.37373) (2.51733,4.36927)(2.52267,4.36488)(2.528,4.36055)(2.53333,4.35628) (2.53867,4.35208)(2.544,4.34795)(2.54933,4.34388)(2.55467,4.33988) (2.56,4.33594)(2.56533,4.33206)(2.57067,4.32826)(2.576,4.32451) (2.58133,4.32083)(2.58667,4.31722)(2.592,4.31367)(2.59733,4.31019) (2.60267,4.30677)(2.608,4.30342)(2.61333,4.30013)(2.61867,4.29691) (2.624,4.29375)(2.62933,4.29066)(2.63467,4.28763)(2.64,4.28467) (2.64533,4.28177)(2.65067,4.27894)(2.656,4.27617)(2.66133,4.27347) (2.66667,4.27083)(2.672,4.26826)(2.67733,4.26576)(2.68267,4.26331) (2.688,4.26094)(2.69333,4.25863)(2.69867,4.25638)(2.704,4.2542) (2.70933,4.25208)(2.71467,4.25003)(2.72,4.24805)(2.72533,4.24613) (2.73067,4.24427)(2.736,4.24248)(2.74133,4.24076)(2.74667,4.2391) (2.752,4.2375)(2.75733,4.23597)(2.76267,4.23451)(2.768,4.23311) (2.77333,4.23177)(2.77867,4.2305)(2.784,4.2293)(2.78933,4.22816) (2.79467,4.22708)(2.8,4.22607)(2.80533,4.22513)(2.81067,4.22425) (2.816,4.22344)(2.82133,4.22269)(2.82667,4.22201)(2.832,4.22139) (2.83733,4.22083)(2.84267,4.22035)(2.848,4.21992)(2.85333,4.21956) (2.85867,4.21927)(2.864,4.21904)(2.86933,4.21888)(2.87467,4.21878)(2.88,4.21875) \path(2.82416,4.22925)(2.82805,4.20963) \path(2.82975,4.2282)(2.83325,4.21054) \path(2.83533,4.22715)(2.83844,4.21146) \path(2.84091,4.2261)(2.84364,4.21237) \path(2.8465,4.22505)(2.84883,4.21328) \path(2.85208,4.224)(2.85403,4.21419) \path(2.85767,4.22295)(2.85922,4.2151) \path(2.86325,4.2219)(2.86442,4.21601) \path(2.86883,4.22085)(2.86961,4.21693) \path(2.87442,4.2198)(2.87481,4.21784) \path(2.82289,4.21293)(2.86575,4.22143) \path(2.82292,4.21845)(2.85149,4.22411) \path(2.82295,4.22396)(2.83724,4.22679) \path(2.82292,4.2191)(2.82286,4.20872)(2.88,4.21875) (2.82299,4.22948)(2.82292,4.2191) \put(2.93535,4.21875){\makebox(0,0)[l]{\hbox{\color{rgb_7f7f7f}\texttt{\footnotesize \texttt{pdf}}}}} \put(2.88,4.21875){\color{rgb_7f7f7f}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \path(2.24,4.6875)(2.24533,4.69528)(2.25067,4.70299)(2.256,4.71064) (2.26133,4.71823)(2.26667,4.72575)(2.272,4.7332)(2.27733,4.74059) (2.28267,4.74792)(2.288,4.75518)(2.29333,4.76237)(2.29867,4.7695) (2.304,4.77656)(2.30933,4.78356)(2.31467,4.79049)(2.32,4.79736) (2.32533,4.80417)(2.33067,4.8109)(2.336,4.81758)(2.34133,4.82419) (2.34667,4.83073)(2.352,4.83721)(2.35733,4.84362)(2.36267,4.84997) (2.368,4.85625)(2.37333,4.86247)(2.37867,4.86862)(2.384,4.87471) (2.38933,4.88073)(2.39467,4.88669)(2.4,4.89258)(2.40533,4.8984) (2.41067,4.90417)(2.416,4.90986)(2.42133,4.91549)(2.42667,4.92106) (2.432,4.92656)(2.43733,4.932)(2.44267,4.93737)(2.448,4.94268) (2.45333,4.94792)(2.45867,4.95309)(2.464,4.9582)(2.46933,4.96325) (2.47467,4.96823)(2.48,4.97314)(2.48533,4.97799)(2.49067,4.98278) (2.496,4.9875)(2.50133,4.99215)(2.50667,4.99674)(2.512,5.00127) (2.51733,5.00573)(2.52267,5.01012)(2.528,5.01445)(2.53333,5.01872) (2.53867,5.02292)(2.544,5.02705)(2.54933,5.03112)(2.55467,5.03512) (2.56,5.03906)(2.56533,5.04294)(2.57067,5.04674)(2.576,5.05049) (2.58133,5.05417)(2.58667,5.05778)(2.592,5.06133)(2.59733,5.06481) (2.60267,5.06823)(2.608,5.07158)(2.61333,5.07487)(2.61867,5.07809) (2.624,5.08125)(2.62933,5.08434)(2.63467,5.08737)(2.64,5.09033) (2.64533,5.09323)(2.65067,5.09606)(2.656,5.09883)(2.66133,5.10153) (2.66667,5.10417)(2.672,5.10674)(2.67733,5.10924)(2.68267,5.11169) (2.688,5.11406)(2.69333,5.11637)(2.69867,5.11862)(2.704,5.1208) (2.70933,5.12292)(2.71467,5.12497)(2.72,5.12695)(2.72533,5.12887) (2.73067,5.13073)(2.736,5.13252)(2.74133,5.13424)(2.74667,5.1359) (2.752,5.1375)(2.75733,5.13903)(2.76267,5.14049)(2.768,5.14189) (2.77333,5.14323)(2.77867,5.1445)(2.784,5.1457)(2.78933,5.14684) (2.79467,5.14792)(2.8,5.14893)(2.80533,5.14987)(2.81067,5.15075) (2.816,5.15156)(2.82133,5.15231)(2.82667,5.15299)(2.832,5.15361) (2.83733,5.15417)(2.84267,5.15465)(2.848,5.15508)(2.85333,5.15544) (2.85867,5.15573)(2.864,5.15596)(2.86933,5.15612)(2.87467,5.15622)(2.88,5.15625) \path(2.86706,5.15382)(2.87286,5.1575) \path(2.85412,5.15138)(2.86572,5.15876) \path(2.84118,5.14895)(2.85857,5.16001) \path(2.82824,5.14651)(2.85143,5.16126) \path(2.82297,5.14896)(2.84429,5.16252) \path(2.82293,5.15473)(2.83715,5.16377) \path(2.8229,5.1605)(2.83,5.16503) \path(2.8743,5.15518)(2.87281,5.15751) \path(2.8686,5.1541)(2.86563,5.15877) \path(2.8629,5.15303)(2.85844,5.16003) \path(2.85719,5.15196)(2.85126,5.1613) \path(2.85149,5.15089)(2.84407,5.16256) \path(2.84579,5.14981)(2.83688,5.16382) \path(2.84009,5.14874)(2.8297,5.16508) \path(2.83439,5.14767)(2.82286,5.16579) \path(2.82869,5.1466)(2.82292,5.15566) \path(2.82292,5.1559)(2.82299,5.14552)(2.88,5.15625) (2.82286,5.16628)(2.82292,5.1559) \put(2.86001,5.21481){\makebox(0,0)[b]{\hbox{\color{rgb_7f7f7f}\texttt{\footnotesize \texttt{eps}}}}} \put(2.88,5.15625){\color{rgb_7f7f7f}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \path(2.88,5.15625)(3.52,5.15625) \path(3.51287,5.15495)(3.50817,5.1584) \path(3.50573,5.15366)(3.49634,5.16055) \path(3.4986,5.15236)(3.48451,5.1627) \path(3.49146,5.15106)(3.47268,5.16485) \path(3.48433,5.14976)(3.46292,5.16548) \path(3.47719,5.14847)(3.46292,5.15895) \path(3.47006,5.14717)(3.46292,5.15241) \path(3.46863,5.16559)(3.46292,5.15782) \path(3.47434,5.16455)(3.46292,5.14901) \path(3.48005,5.16351)(3.46773,5.14675) \path(3.48575,5.16248)(3.4752,5.1481) \path(3.49146,5.16144)(3.48267,5.14946) \path(3.49717,5.1604)(3.49013,5.15082) \path(3.50288,5.15936)(3.4976,5.15218) \path(3.50858,5.15833)(3.50507,5.15353) \path(3.51429,5.15729)(3.51253,5.15489) \path(3.46292,5.15625)(3.46292,5.14587)(3.52,5.15625) (3.46292,5.16663)(3.46292,5.15625) \put(3.57535,5.15625){\makebox(0,0)[l]{\hbox{\color{rgb_7f7f7f}\texttt{\footnotesize \begin{minipage}{0.225in}\texttt{png mng gif}\end{minipage}}}}} \put(3.52,5.15625){\color{rgb_7f7f7f}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \put(1.92,4.21875){\makebox(0,0)[c]{\hbox{\color{rgb_009800}\texttt{\Large epix}}}} \allinethickness{1.2pt}% \color{rgb_ff0000}% \path(0.32,3.28125)(0.96,3.28125) \allinethickness{0.0055348in}% \path(0.908111,3.29068)(0.902922,3.27138) \path(0.9133,3.28974)(0.9085,3.27189) \path(0.918489,3.2888)(0.914223,3.27293) \path(0.923678,3.28785)(0.919945,3.27397) \path(0.928867,3.28691)(0.925667,3.27501) \path(0.934056,3.28597)(0.931389,3.27605) \path(0.939244,3.28502)(0.937111,3.27709) \path(0.944433,3.28408)(0.942833,3.27813) \path(0.949622,3.28314)(0.948556,3.27917) \path(0.954811,3.28219)(0.954278,3.28021) \path(0.902922,3.27602)(0.914338,3.27295) \path(0.902922,3.28116)(0.925753,3.27502) \path(0.902922,3.28631)(0.937169,3.2771) \path(0.902922,3.29145)(0.948584,3.27917) \allinethickness{1.2pt}% \path(0.902922,3.28125)(0.902922,3.27087)(0.96,3.28125) (0.902922,3.29163)(0.902922,3.28125) \put(0.32,3.3366){\makebox(0,0)[b]{\fboxrule0.1pt% \fcolorbox{rgb_ff0000}{cmy_000019}{\hbox{\color{rgb_0000ff}\texttt{\footnotesize \texttt{xp}, \texttt{flx}}}}}} \put(0.32,3.28125){\color{rgb_0000ff}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \put(0.97999,3.33981){\makebox(0,0)[b]{\fboxrule0.1pt% \fcolorbox{rgb_ff0000}{cmy_000019}{\hbox{\color{rgb_0000ff}\texttt{\footnotesize \texttt{eepic}}}}}} \put(0.96,3.28125){\color{rgb_0000ff}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \path(0.96,3.28125)(0.963187,3.28115)(0.966347,3.28086) (0.969482,3.28039)(0.972591,3.27972)(0.975676,3.27888) (0.978736,3.27785)(0.981772,3.27665)(0.984785,3.27528) (0.987774,3.27374)(0.990741,3.27203)(0.993685,3.27016) (0.996608,3.26813)(0.999509,3.26594)(1.00239,3.2636) (1.00525,3.26111)(1.00809,3.25847)(1.01091,3.25569) (1.01371,3.25277)(1.01649,3.24972)(1.01926,3.24653) (1.02201,3.24321)(1.02474,3.23976)(1.02745,3.23619)(1.03014,3.2325) (1.03282,3.22869)(1.03549,3.22477)(1.03814,3.22074)(1.04077,3.2166) (1.04339,3.21235)(1.046,3.20801)(1.04859,3.20356)(1.05117,3.19903) (1.05374,3.1944)(1.0563,3.18968)(1.05884,3.18488)(1.06138,3.18) (1.0639,3.17504)(1.06641,3.17)(1.06891,3.1649)(1.07141,3.15972) (1.07389,3.15448)(1.07637,3.14918)(1.07884,3.14382)(1.0813,3.1384) (1.08375,3.13293)(1.0862,3.12742)(1.08864,3.12185)(1.09107,3.11625) (1.0935,3.11061)(1.09593,3.10493)(1.09835,3.09921)(1.10076,3.09347) (1.10317,3.0877)(1.10558,3.08191)(1.10799,3.0761)(1.1104,3.07028) (1.1128,3.06444)(1.1152,3.05859)(1.1176,3.05273)(1.12,3.04688) (1.1224,3.04102)(1.1248,3.03516)(1.1272,3.02931)(1.1296,3.02347) (1.13201,3.01765)(1.13442,3.01184)(1.13683,3.00605) (1.13924,3.00028)(1.14165,2.99454)(1.14407,2.98882)(1.1465,2.98314) (1.14893,2.9775)(1.15136,2.9719)(1.1538,2.96633)(1.15625,2.96082) (1.1587,2.95535)(1.16116,2.94993)(1.16363,2.94457)(1.16611,2.93927) (1.16859,2.93403)(1.17109,2.92885)(1.17359,2.92375)(1.1761,2.91871) (1.17862,2.91375)(1.18116,2.90887)(1.1837,2.90407)(1.18626,2.89935) (1.18883,2.89472)(1.19141,2.89019)(1.194,2.88574)(1.19661,2.8814) (1.19923,2.87715)(1.20186,2.87301)(1.20451,2.86898) (1.20718,2.86506)(1.20986,2.86125)(1.21255,2.85756) (1.21526,2.85399)(1.21799,2.85054)(1.22074,2.84722) (1.22351,2.84403)(1.22629,2.84098)(1.22909,2.83806) (1.23191,2.83528)(1.23475,2.83264)(1.23761,2.83015) (1.24049,2.82781)(1.24339,2.82563)(1.24631,2.82359) (1.24926,2.82172)(1.25223,2.82001)(1.25522,2.81847)(1.25823,2.8171) (1.26126,2.8159)(1.26432,2.81487)(1.26741,2.81403)(1.27052,2.81336) (1.27365,2.81289)(1.27681,2.8126)(1.28,2.8125) \path(1.28,2.8125)(1.6,2.8125) \allinethickness{0.0055348in}% \path(1.54292,2.80731)(1.59652,2.81313) \path(1.54292,2.8125)(1.57865,2.81638) \path(1.54292,2.81769)(1.56079,2.81963) \path(1.59481,2.81156)(1.5946,2.81348) \path(1.58962,2.81061)(1.5892,2.81446) \path(1.58443,2.80967)(1.58381,2.81544) \path(1.57924,2.80873)(1.57841,2.81643) \path(1.57406,2.80778)(1.57301,2.81741) \path(1.56887,2.80684)(1.56761,2.81839) \path(1.56368,2.8059)(1.56221,2.81937) \path(1.55849,2.80495)(1.55682,2.82035) \path(1.5533,2.80401)(1.55142,2.82133) \path(1.54811,2.80307)(1.54602,2.82231) \allinethickness{1.2pt}% \path(1.54292,2.8125)(1.54292,2.80212)(1.6,2.8125)(1.54292,2.82288)(1.54292,2.8125) \path(1.6,2.8125)(2.24,2.8125) \allinethickness{0.0055348in}% \path(2.23481,2.81156)(2.23373,2.81364) \path(2.22962,2.81061)(2.22746,2.81478) \path(2.22443,2.80967)(2.22119,2.81592) \path(2.21924,2.80873)(2.21492,2.81706) \path(2.21406,2.80778)(2.20864,2.8182) \path(2.20887,2.80684)(2.20237,2.81934) \path(2.20368,2.8059)(2.1961,2.82048) \path(2.19849,2.80495)(2.18983,2.82162) \path(2.1933,2.80401)(2.18356,2.82276) \path(2.18811,2.80307)(2.18292,2.81306) \path(2.19108,2.8214)(2.18292,2.81716) \path(2.19923,2.81991)(2.18292,2.81144) \path(2.20738,2.81843)(2.18292,2.80573) \path(2.21554,2.81695)(2.18919,2.80326) \path(2.22369,2.81547)(2.20612,2.80634) \path(2.23185,2.81398)(2.22306,2.80942) \allinethickness{1.2pt}% \path(2.18292,2.8125)(2.18292,2.80212)(2.24,2.8125) (2.18292,2.82288)(2.18292,2.8125) \put(1.6,2.86785){\makebox(0,0)[b]{\fboxrule0.1pt% \fcolorbox{rgb_ff0000}{cmy_000019}{\hbox{\color{rgb_0000ff}\texttt{\footnotesize \texttt{dvi}}}}}} \put(1.6,2.8125){\color{rgb_0000ff}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \put(2.21793,2.84482){\makebox(0,0)[br]{\fboxrule0.1pt% \fcolorbox{rgb_ff0000}{cmy_000019}{\hbox{\color{rgb_0000ff}\texttt{\footnotesize \texttt{ps}}}}}} \put(2.24,2.8125){\color{rgb_0000ff}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \allinethickness{0.4pt}% \color{rgb_7f7f7f}% \path(0.96,2.34375)(0.963187,2.34385)(0.966347,2.34414) (0.969482,2.34461)(0.972591,2.34528)(0.975676,2.34612) (0.978736,2.34715)(0.981772,2.34835)(0.984785,2.34972) (0.987774,2.35126)(0.990741,2.35297)(0.993685,2.35484) (0.996608,2.35688)(0.999509,2.35906)(1.00239,2.3614) (1.00525,2.36389)(1.00809,2.36653)(1.01091,2.36931) (1.01371,2.37223)(1.01649,2.37528)(1.01926,2.37847) (1.02201,2.38179)(1.02474,2.38524)(1.02745,2.38881)(1.03014,2.3925) (1.03282,2.39631)(1.03549,2.40023)(1.03814,2.40426)(1.04077,2.4084) (1.04339,2.41265)(1.046,2.41699)(1.04859,2.42144)(1.05117,2.42597) (1.05374,2.4306)(1.0563,2.43532)(1.05884,2.44012)(1.06138,2.445) (1.0639,2.44996)(1.06641,2.455)(1.06891,2.4601)(1.07141,2.46528) (1.07389,2.47052)(1.07637,2.47582)(1.07884,2.48118)(1.0813,2.4866) (1.08375,2.49207)(1.0862,2.49758)(1.08864,2.50315)(1.09107,2.50875) (1.0935,2.51439)(1.09593,2.52007)(1.09835,2.52579)(1.10076,2.53153) (1.10317,2.5373)(1.10558,2.54309)(1.10799,2.5489)(1.1104,2.55472) (1.1128,2.56056)(1.1152,2.56641)(1.1176,2.57227)(1.12,2.57812) (1.1224,2.58398)(1.1248,2.58984)(1.1272,2.59569)(1.1296,2.60153) (1.13201,2.60735)(1.13442,2.61316)(1.13683,2.61895) (1.13924,2.62472)(1.14165,2.63046)(1.14407,2.63618)(1.1465,2.64186) (1.14893,2.6475)(1.15136,2.6531)(1.1538,2.65867)(1.15625,2.66418) (1.1587,2.66965)(1.16116,2.67507)(1.16363,2.68043)(1.16611,2.68573) (1.16859,2.69097)(1.17109,2.69615)(1.17359,2.70125)(1.1761,2.70629) (1.17862,2.71125)(1.18116,2.71613)(1.1837,2.72093)(1.18626,2.72565) (1.18883,2.73028)(1.19141,2.73481)(1.194,2.73926)(1.19661,2.7436) (1.19923,2.74785)(1.20186,2.75199)(1.20451,2.75602) (1.20718,2.75994)(1.20986,2.76375)(1.21255,2.76744) (1.21526,2.77101)(1.21799,2.77446)(1.22074,2.77778) (1.22351,2.78097)(1.22629,2.78402)(1.22909,2.78694) (1.23191,2.78972)(1.23475,2.79236)(1.23761,2.79485) (1.24049,2.79719)(1.24339,2.79937)(1.24631,2.80141) (1.24926,2.80328)(1.25223,2.80499)(1.25522,2.80653)(1.25823,2.8079) (1.26126,2.8091)(1.26432,2.81013)(1.26741,2.81097)(1.27052,2.81164) (1.27365,2.81211)(1.27681,2.8124)(1.28,2.8125) \put(0.97999,2.28519){\makebox(0,0)[t]{\hbox{\color{rgb_7f7f7f}\texttt{\footnotesize \texttt{tex}}}}} \put(0.96,2.34375){\color{rgb_7f7f7f}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \allinethickness{1.2pt}% \color{rgb_ff0000}% \path(2.24,2.8125)(2.24533,2.80472)(2.25067,2.79701)(2.256,2.78936) (2.26133,2.78177)(2.26667,2.77425)(2.272,2.7668)(2.27733,2.75941) (2.28267,2.75208)(2.288,2.74482)(2.29333,2.73763)(2.29867,2.7305) (2.304,2.72344)(2.30933,2.71644)(2.31467,2.70951)(2.32,2.70264) (2.32533,2.69583)(2.33067,2.6891)(2.336,2.68242)(2.34133,2.67581) (2.34667,2.66927)(2.352,2.66279)(2.35733,2.65638)(2.36267,2.65003) (2.368,2.64375)(2.37333,2.63753)(2.37867,2.63138)(2.384,2.62529) (2.38933,2.61927)(2.39467,2.61331)(2.4,2.60742)(2.40533,2.6016) (2.41067,2.59583)(2.416,2.59014)(2.42133,2.58451)(2.42667,2.57894) (2.432,2.57344)(2.43733,2.568)(2.44267,2.56263)(2.448,2.55732) (2.45333,2.55208)(2.45867,2.54691)(2.464,2.5418)(2.46933,2.53675) (2.47467,2.53177)(2.48,2.52686)(2.48533,2.52201)(2.49067,2.51722) (2.496,2.5125)(2.50133,2.50785)(2.50667,2.50326)(2.512,2.49873) (2.51733,2.49427)(2.52267,2.48988)(2.528,2.48555)(2.53333,2.48128) (2.53867,2.47708)(2.544,2.47295)(2.54933,2.46888)(2.55467,2.46488) (2.56,2.46094)(2.56533,2.45706)(2.57067,2.45326)(2.576,2.44951) (2.58133,2.44583)(2.58667,2.44222)(2.592,2.43867)(2.59733,2.43519) (2.60267,2.43177)(2.608,2.42842)(2.61333,2.42513)(2.61867,2.42191) (2.624,2.41875)(2.62933,2.41566)(2.63467,2.41263)(2.64,2.40967) (2.64533,2.40677)(2.65067,2.40394)(2.656,2.40117)(2.66133,2.39847) (2.66667,2.39583)(2.672,2.39326)(2.67733,2.39076)(2.68267,2.38831) (2.688,2.38594)(2.69333,2.38363)(2.69867,2.38138)(2.704,2.3792) (2.70933,2.37708)(2.71467,2.37503)(2.72,2.37305)(2.72533,2.37113) (2.73067,2.36927)(2.736,2.36748)(2.74133,2.36576)(2.74667,2.3641) (2.752,2.3625)(2.75733,2.36097)(2.76267,2.35951)(2.768,2.35811) (2.77333,2.35677)(2.77867,2.3555)(2.784,2.3543)(2.78933,2.35316) (2.79467,2.35208)(2.8,2.35107)(2.80533,2.35013)(2.81067,2.34925) (2.816,2.34844)(2.82133,2.34769)(2.82667,2.34701)(2.832,2.34639) (2.83733,2.34583)(2.84267,2.34535)(2.848,2.34492)(2.85333,2.34456) (2.85867,2.34427)(2.864,2.34404)(2.86933,2.34388)(2.87467,2.34378)(2.88,2.34375) \allinethickness{0.0055348in}% \path(2.82869,2.3534)(2.82294,2.34686) \path(2.83439,2.35233)(2.82289,2.33925) \path(2.84009,2.35126)(2.82501,2.3341) \path(2.84579,2.35019)(2.83287,2.33548) \path(2.85149,2.34911)(2.84072,2.33686) \path(2.85719,2.34804)(2.84858,2.33823) \path(2.8629,2.34697)(2.85643,2.33961) \path(2.8686,2.3459)(2.86429,2.34099) \path(2.8743,2.34482)(2.87214,2.34237) \path(2.8229,2.34038)(2.82921,2.33484) \path(2.82294,2.34704)(2.83556,2.33595) \path(2.82298,2.35369)(2.84191,2.33706) \path(2.83154,2.35287)(2.84826,2.33818) \path(2.84123,2.35104)(2.8546,2.33929) \path(2.85092,2.34922)(2.86095,2.34041) \path(2.86062,2.3474)(2.8673,2.34152) \path(2.87031,2.34557)(2.87365,2.34264) \allinethickness{1.2pt}% \path(2.82292,2.3441)(2.82286,2.33372)(2.88,2.34375) (2.82299,2.35448)(2.82292,2.3441) \put(2.93535,2.34375){\makebox(0,0)[l]{\fboxrule0.1pt% \fcolorbox{rgb_ff0000}{cmy_000019}{\hbox{\color{rgb_0000ff}\texttt{\footnotesize \texttt{pdf}}}}}} \put(2.88,2.34375){\color{rgb_0000ff}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \path(2.24,2.8125)(2.24533,2.82028)(2.25067,2.82799)(2.256,2.83564) (2.26133,2.84323)(2.26667,2.85075)(2.272,2.8582)(2.27733,2.86559) (2.28267,2.87292)(2.288,2.88018)(2.29333,2.88737)(2.29867,2.8945) (2.304,2.90156)(2.30933,2.90856)(2.31467,2.91549)(2.32,2.92236) (2.32533,2.92917)(2.33067,2.9359)(2.336,2.94258)(2.34133,2.94919) (2.34667,2.95573)(2.352,2.96221)(2.35733,2.96862)(2.36267,2.97497) (2.368,2.98125)(2.37333,2.98747)(2.37867,2.99362)(2.384,2.99971) (2.38933,3.00573)(2.39467,3.01169)(2.4,3.01758)(2.40533,3.0234) (2.41067,3.02917)(2.416,3.03486)(2.42133,3.04049)(2.42667,3.04606) (2.432,3.05156)(2.43733,3.057)(2.44267,3.06237)(2.448,3.06768) (2.45333,3.07292)(2.45867,3.07809)(2.464,3.0832)(2.46933,3.08825) (2.47467,3.09323)(2.48,3.09814)(2.48533,3.10299)(2.49067,3.10778) (2.496,3.1125)(2.50133,3.11715)(2.50667,3.12174)(2.512,3.12627) (2.51733,3.13073)(2.52267,3.13512)(2.528,3.13945)(2.53333,3.14372) (2.53867,3.14792)(2.544,3.15205)(2.54933,3.15612)(2.55467,3.16012) (2.56,3.16406)(2.56533,3.16794)(2.57067,3.17174)(2.576,3.17549) (2.58133,3.17917)(2.58667,3.18278)(2.592,3.18633)(2.59733,3.18981) (2.60267,3.19323)(2.608,3.19658)(2.61333,3.19987)(2.61867,3.20309) (2.624,3.20625)(2.62933,3.20934)(2.63467,3.21237)(2.64,3.21533) (2.64533,3.21823)(2.65067,3.22106)(2.656,3.22383)(2.66133,3.22653) (2.66667,3.22917)(2.672,3.23174)(2.67733,3.23424)(2.68267,3.23669) (2.688,3.23906)(2.69333,3.24137)(2.69867,3.24362)(2.704,3.2458) (2.70933,3.24792)(2.71467,3.24997)(2.72,3.25195)(2.72533,3.25387) (2.73067,3.25573)(2.736,3.25752)(2.74133,3.25924)(2.74667,3.2609) (2.752,3.2625)(2.75733,3.26403)(2.76267,3.26549)(2.768,3.26689) (2.77333,3.26823)(2.77867,3.2695)(2.784,3.2707)(2.78933,3.27184) (2.79467,3.27292)(2.8,3.27393)(2.80533,3.27487)(2.81067,3.27575) (2.816,3.27656)(2.82133,3.27731)(2.82667,3.27799)(2.832,3.27861) (2.83733,3.27917)(2.84267,3.27965)(2.848,3.28008)(2.85333,3.28044) (2.85867,3.28073)(2.864,3.28096)(2.86933,3.28112)(2.87467,3.28122)(2.88,3.28125) \allinethickness{0.0055348in}% \path(2.82295,3.27579)(2.83249,3.27231) \path(2.82292,3.28106)(2.84199,3.2741) \path(2.82289,3.28633)(2.85149,3.27589) \path(2.82456,3.29098)(2.861,3.27767) \path(2.85228,3.28612)(2.8705,3.27946) \path(2.87406,3.28013)(2.87481,3.28216) \path(2.86813,3.27902)(2.86961,3.28307) \path(2.86219,3.2779)(2.86442,3.28399) \path(2.85626,3.27678)(2.85922,3.2849) \path(2.85032,3.27567)(2.85403,3.28581) \path(2.84439,3.27455)(2.84883,3.28672) \path(2.83845,3.27343)(2.84364,3.28763) \path(2.83252,3.27232)(2.83844,3.28854) \path(2.82658,3.2712)(2.83325,3.28946) \path(2.82295,3.27639)(2.82805,3.29037) \allinethickness{1.2pt}% \path(2.82292,3.2809)(2.82299,3.27052)(2.88,3.28125) (2.82286,3.29128)(2.82292,3.2809) \put(2.86001,3.33981){\makebox(0,0)[b]{\fboxrule0.1pt% \fcolorbox{rgb_ff0000}{cmy_000019}{\hbox{\color{rgb_0000ff}\texttt{\footnotesize \texttt{eps}}}}}} \put(2.88,3.28125){\color{rgb_0000ff}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \allinethickness{0.4pt}% \color{rgb_7f7f7f}% \path(2.88,3.28125)(3.52,3.28125) \path(3.51481,3.28031)(3.51477,3.2822) \path(3.50962,3.27936)(3.50954,3.28315) \path(3.50443,3.27842)(3.50432,3.2841) \path(3.49924,3.27748)(3.49909,3.28505) \path(3.49406,3.27653)(3.49386,3.286) \path(3.48887,3.27559)(3.48863,3.28695) \path(3.48368,3.27465)(3.4834,3.2879) \path(3.47849,3.2737)(3.47818,3.28885) \path(3.4733,3.27276)(3.47295,3.2898) \path(3.46811,3.27182)(3.46772,3.29076) \path(3.48855,3.28697)(3.46292,3.28644) \path(3.51417,3.28231)(3.46292,3.28125) \path(3.49512,3.27673)(3.46292,3.27606) \path(3.46292,3.28125)(3.46292,3.27087)(3.52,3.28125) (3.46292,3.29163)(3.46292,3.28125) \put(3.57535,3.28125){\makebox(0,0)[l]{\hbox{\color{rgb_7f7f7f}\texttt{\footnotesize \begin{minipage}{0.225in}\texttt{png mng gif}\end{minipage}}}}} \put(3.52,3.28125){\color{rgb_7f7f7f}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \put(1.92,2.34375){\makebox(0,0)[c]{\hbox{\color{rgb_009800}\texttt{\Large elaps}}}} \allinethickness{1.2pt}% \color{rgb_ff0000}% \path(0.32,1.40625)(0.96,1.40625) \allinethickness{0.0055348in}% \path(0.912435,1.4149)(0.902922,1.41097) \path(0.921948,1.41317)(0.902922,1.40531) \path(0.931461,1.41144)(0.902922,1.39966) \path(0.940974,1.40971)(0.91102,1.39734) \path(0.950487,1.40798)(0.93551,1.4018) \path(0.902922,1.40939)(0.908111,1.39682) \path(0.905721,1.41612)(0.9133,1.39776) \path(0.911752,1.41502)(0.918489,1.3987) \path(0.917783,1.41393)(0.923678,1.39965) \path(0.923814,1.41283)(0.928867,1.40059) \path(0.929845,1.41173)(0.934056,1.40153) \path(0.935876,1.41064)(0.939244,1.40248) \path(0.941907,1.40954)(0.944433,1.40342) \path(0.947938,1.40844)(0.949622,1.40436) \path(0.953969,1.40735)(0.954811,1.40531) \allinethickness{1.2pt}% \path(0.902922,1.40625)(0.902922,1.39587)(0.96,1.40625) (0.902922,1.41663)(0.902922,1.40625) \put(0.32,1.4616){\makebox(0,0)[b]{\fboxrule0.1pt% \fcolorbox{rgb_ff0000}{cmy_000019}{\hbox{\color{rgb_0000ff}\texttt{\footnotesize \texttt{xp}, \texttt{flx}}}}}} \put(0.32,1.40625){\color{rgb_0000ff}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \put(0.97999,1.46481){\makebox(0,0)[b]{\fboxrule0.1pt% \fcolorbox{rgb_ff0000}{cmy_000019}{\hbox{\color{rgb_0000ff}\texttt{\footnotesize \texttt{eepic}}}}}} \put(0.96,1.40625){\color{rgb_0000ff}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \path(0.96,1.40625)(0.963187,1.40615)(0.966347,1.40586) (0.969482,1.40539)(0.972591,1.40472)(0.975676,1.40388) (0.978736,1.40285)(0.981772,1.40165)(0.984785,1.40028) (0.987774,1.39874)(0.990741,1.39703)(0.993685,1.39516) (0.996608,1.39313)(0.999509,1.39094)(1.00239,1.3886) (1.00525,1.38611)(1.00809,1.38347)(1.01091,1.38069) (1.01371,1.37777)(1.01649,1.37472)(1.01926,1.37153) (1.02201,1.36821)(1.02474,1.36476)(1.02745,1.36119)(1.03014,1.3575) (1.03282,1.35369)(1.03549,1.34977)(1.03814,1.34574)(1.04077,1.3416) (1.04339,1.33735)(1.046,1.33301)(1.04859,1.32856)(1.05117,1.32403) (1.05374,1.3194)(1.0563,1.31468)(1.05884,1.30988)(1.06138,1.305) (1.0639,1.30004)(1.06641,1.295)(1.06891,1.2899)(1.07141,1.28472) (1.07389,1.27948)(1.07637,1.27418)(1.07884,1.26882)(1.0813,1.2634) (1.08375,1.25793)(1.0862,1.25242)(1.08864,1.24685)(1.09107,1.24125) (1.0935,1.23561)(1.09593,1.22993)(1.09835,1.22421)(1.10076,1.21847) (1.10317,1.2127)(1.10558,1.20691)(1.10799,1.2011)(1.1104,1.19528) (1.1128,1.18944)(1.1152,1.18359)(1.1176,1.17773)(1.12,1.17188) (1.1224,1.16602)(1.1248,1.16016)(1.1272,1.15431)(1.1296,1.14847) (1.13201,1.14265)(1.13442,1.13684)(1.13683,1.13105) (1.13924,1.12528)(1.14165,1.11954)(1.14407,1.11382)(1.1465,1.10814) (1.14893,1.1025)(1.15136,1.0969)(1.1538,1.09133)(1.15625,1.08582) (1.1587,1.08035)(1.16116,1.07493)(1.16363,1.06957)(1.16611,1.06427) (1.16859,1.05903)(1.17109,1.05385)(1.17359,1.04875)(1.1761,1.04371) (1.17862,1.03875)(1.18116,1.03387)(1.1837,1.02907)(1.18626,1.02435) (1.18883,1.01972)(1.19141,1.01519)(1.194,1.01074)(1.19661,1.0064) (1.19923,1.00215)(1.20186,0.998013)(1.20451,0.99398) (1.20718,0.990058)(1.20986,0.98625)(1.21255,0.982559) (1.21526,0.978989)(1.21799,0.975542)(1.22074,0.972222) (1.22351,0.969033)(1.22629,0.965977)(1.22909,0.963057) (1.23191,0.960278)(1.23475,0.957642)(1.23761,0.955152) (1.24049,0.952812)(1.24339,0.950625)(1.24631,0.948594) (1.24926,0.946723)(1.25223,0.945015)(1.25522,0.943472) (1.25823,0.942099)(1.26126,0.940898)(1.26432,0.939874) (1.26741,0.939028)(1.27052,0.938364)(1.27365,0.937886) (1.27681,0.937597)(1.28,0.9375) \path(1.28,0.9375)(1.6,0.9375) \allinethickness{0.0055348in}% \path(1.54292,0.934917)(1.54926,0.928275) \path(1.54292,0.942712)(1.55561,0.929428) \path(1.54596,0.947325)(1.56195,0.930581) \path(1.55497,0.945688)(1.56829,0.931735) \path(1.56397,0.94405)(1.57463,0.932888) \path(1.57298,0.942413)(1.58097,0.934041) \path(1.58199,0.940775)(1.58732,0.935194) \path(1.59099,0.939138)(1.59366,0.936347) \path(1.59067,0.935804)(1.59366,0.938653) \path(1.58135,0.934109)(1.58732,0.939806) \path(1.57202,0.932413)(1.58097,0.940959) \path(1.5627,0.930718)(1.57463,0.942112) \path(1.55337,0.929022)(1.56829,0.943265) \path(1.54405,0.927327)(1.56195,0.944419) \path(1.54292,0.933461)(1.55561,0.945572) \path(1.54292,0.940669)(1.54926,0.946725) \allinethickness{1.2pt}% \path(1.54292,0.9375)(1.54292,0.927122)(1.6,0.9375) (1.54292,0.947878)(1.54292,0.9375) \path(1.6,0.9375)(2.24,0.9375) \allinethickness{0.0055348in}% \path(2.23385,0.936381)(2.23481,0.938443) \path(2.22769,0.935262)(2.22962,0.939387) \path(2.22154,0.934143)(2.22443,0.94033) \path(2.21538,0.933024)(2.21924,0.941274) \path(2.20923,0.931905)(2.21406,0.942217) \path(2.20308,0.930787)(2.20887,0.943161) \path(2.19692,0.929668)(2.20368,0.944104) \path(2.19077,0.928549)(2.19849,0.945047) \path(2.18461,0.92743)(2.1933,0.945991) \path(2.18292,0.935846)(2.18811,0.946934) \path(2.23185,0.936017)(2.22148,0.940867) \path(2.22369,0.934535)(2.20297,0.944233) \path(2.21554,0.933052)(2.18445,0.9476) \path(2.20738,0.93157)(2.18292,0.943017) \path(2.19923,0.930087)(2.18292,0.937719) \path(2.19108,0.928605)(2.18292,0.93242) \allinethickness{1.2pt}% \path(2.18292,0.9375)(2.18292,0.927122)(2.24,0.9375) (2.18292,0.947878)(2.18292,0.9375) \put(1.6,0.992848){\makebox(0,0)[b]{\fboxrule0.1pt% \fcolorbox{rgb_ff0000}{cmy_000019}{\hbox{\color{rgb_0000ff}\texttt{\footnotesize \texttt{dvi}}}}}} \put(1.6,0.9375){\color{rgb_0000ff}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \put(2.21793,0.969823){\makebox(0,0)[br]{\fboxrule0.1pt% \fcolorbox{rgb_ff0000}{cmy_000019}{\hbox{\color{rgb_0000ff}\texttt{\footnotesize \texttt{ps}}}}}} \put(2.24,0.9375){\color{rgb_0000ff}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \allinethickness{0.4pt}% \color{rgb_7f7f7f}% \path(0.96,0.46875)(0.963187,0.468847)(0.966347,0.469136) (0.969482,0.469614)(0.972591,0.470278)(0.975676,0.471124) (0.978736,0.472148)(0.981772,0.473349)(0.984785,0.474722) (0.987774,0.476265)(0.990741,0.477973)(0.993685,0.479844) (0.996608,0.481875)(0.999509,0.484062)(1.00239,0.486402) (1.00525,0.488892)(1.00809,0.491528)(1.01091,0.494307) (1.01371,0.497227)(1.01649,0.500283)(1.01926,0.503472) (1.02201,0.506792)(1.02474,0.510239)(1.02745,0.513809) (1.03014,0.5175)(1.03282,0.521308)(1.03549,0.52523) (1.03814,0.529263)(1.04077,0.533403)(1.04339,0.537647) (1.046,0.541992)(1.04859,0.546435)(1.05117,0.550972) (1.05374,0.555601)(1.0563,0.560317)(1.05884,0.565118)(1.06138,0.57) (1.0639,0.57496)(1.06641,0.579996)(1.06891,0.585103) (1.07141,0.590278)(1.07389,0.595518)(1.07637,0.60082) (1.07884,0.606181)(1.0813,0.611597)(1.08375,0.617065) (1.0862,0.622582)(1.08864,0.628145)(1.09107,0.63375) (1.0935,0.639394)(1.09593,0.645074)(1.09835,0.650786) (1.10076,0.656528)(1.10317,0.662295)(1.10558,0.668086) (1.10799,0.673896)(1.1104,0.679722)(1.1128,0.685562) (1.1152,0.691411)(1.1176,0.697266)(1.12,0.703125)(1.1224,0.708984) (1.1248,0.714839)(1.1272,0.720688)(1.1296,0.726528) (1.13201,0.732354)(1.13442,0.738164)(1.13683,0.743955) (1.13924,0.749722)(1.14165,0.755464)(1.14407,0.761176) (1.1465,0.766856)(1.14893,0.7725)(1.15136,0.778105) (1.1538,0.783668)(1.15625,0.789185)(1.1587,0.794653) (1.16116,0.800069)(1.16363,0.80543)(1.16611,0.810732) (1.16859,0.815972)(1.17109,0.821147)(1.17359,0.826254) (1.1761,0.83129)(1.17862,0.83625)(1.18116,0.841132) (1.1837,0.845933)(1.18626,0.850649)(1.18883,0.855278) (1.19141,0.859815)(1.194,0.864258)(1.19661,0.868603) (1.19923,0.872847)(1.20186,0.876987)(1.20451,0.88102) (1.20718,0.884942)(1.20986,0.88875)(1.21255,0.892441) (1.21526,0.896011)(1.21799,0.899458)(1.22074,0.902778) (1.22351,0.905967)(1.22629,0.909023)(1.22909,0.911943) (1.23191,0.914722)(1.23475,0.917358)(1.23761,0.919848) (1.24049,0.922188)(1.24339,0.924375)(1.24631,0.926406) (1.24926,0.928277)(1.25223,0.929985)(1.25522,0.931528) (1.25823,0.932901)(1.26126,0.934102)(1.26432,0.935126) (1.26741,0.935972)(1.27052,0.936636)(1.27365,0.937114) (1.27681,0.937403)(1.28,0.9375) \put(0.97999,0.410187){\makebox(0,0)[t]{\hbox{\color{rgb_7f7f7f}\texttt{\footnotesize \texttt{tex}}}}} \put(0.96,0.46875){\color{rgb_7f7f7f}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \path(2.24,0.9375)(2.24533,0.92972)(2.25067,0.922005) (2.256,0.914355)(2.26133,0.906771)(2.26667,0.899251) (2.272,0.891797)(2.27733,0.884408)(2.28267,0.877083) (2.288,0.869824)(2.29333,0.86263)(2.29867,0.855501)(2.304,0.848438) (2.30933,0.841439)(2.31467,0.834505)(2.32,0.827637) (2.32533,0.820833)(2.33067,0.814095)(2.336,0.807422) (2.34133,0.800814)(2.34667,0.794271)(2.352,0.787793) (2.35733,0.78138)(2.36267,0.775033)(2.368,0.76875) (2.37333,0.762533)(2.37867,0.75638)(2.384,0.750293) (2.38933,0.744271)(2.39467,0.738314)(2.4,0.732422) (2.40533,0.726595)(2.41067,0.720833)(2.416,0.715137) (2.42133,0.709505)(2.42667,0.703939)(2.432,0.698438) (2.43733,0.693001)(2.44267,0.68763)(2.448,0.682324) (2.45333,0.677083)(2.45867,0.671908)(2.464,0.666797) (2.46933,0.661751)(2.47467,0.656771)(2.48,0.651855) (2.48533,0.647005)(2.49067,0.64222)(2.496,0.6375)(2.50133,0.632845) (2.50667,0.628255)(2.512,0.62373)(2.51733,0.619271) (2.52267,0.614876)(2.528,0.610547)(2.53333,0.606283) (2.53867,0.602083)(2.544,0.597949)(2.54933,0.59388) (2.55467,0.589876)(2.56,0.585938)(2.56533,0.582064) (2.57067,0.578255)(2.576,0.574512)(2.58133,0.570833) (2.58667,0.56722)(2.592,0.563672)(2.59733,0.560189) (2.60267,0.556771)(2.608,0.553418)(2.61333,0.55013) (2.61867,0.546908)(2.624,0.54375)(2.62933,0.540658) (2.63467,0.53763)(2.64,0.534668)(2.64533,0.531771) (2.65067,0.528939)(2.656,0.526172)(2.66133,0.52347) (2.66667,0.520833)(2.672,0.518262)(2.67733,0.515755) (2.68267,0.513314)(2.688,0.510937)(2.69333,0.508626) (2.69867,0.50638)(2.704,0.504199)(2.70933,0.502083) (2.71467,0.500033)(2.72,0.498047)(2.72533,0.496126) (2.73067,0.494271)(2.736,0.49248)(2.74133,0.490755) (2.74667,0.489095)(2.752,0.4875)(2.75733,0.48597)(2.76267,0.484505) (2.768,0.483105)(2.77333,0.481771)(2.77867,0.480501) (2.784,0.479297)(2.78933,0.478158)(2.79467,0.477083)(2.8,0.476074) (2.80533,0.47513)(2.81067,0.474251)(2.816,0.473437) (2.82133,0.472689)(2.82667,0.472005)(2.832,0.471387) (2.83733,0.470833)(2.84267,0.470345)(2.848,0.469922) (2.85333,0.469564)(2.85867,0.469271)(2.864,0.469043) (2.86933,0.46888)(2.87467,0.468783)(2.88,0.46875) \path(2.86583,0.471416)(2.82296,0.474287) \path(2.86567,0.466235)(2.82292,0.469098) \path(2.84427,0.462478)(2.82289,0.46391) \path(2.82817,0.478501)(2.82689,0.459429) \path(2.83335,0.477526)(2.8322,0.460361) \path(2.83854,0.476551)(2.83751,0.461293) \path(2.84372,0.475576)(2.84282,0.462225) \path(2.8489,0.474601)(2.84814,0.463157) \path(2.85408,0.473625)(2.85345,0.464089) \path(2.85927,0.47265)(2.85876,0.465021) \path(2.86445,0.471675)(2.86407,0.465954) \path(2.86963,0.4707)(2.86938,0.466886) \path(2.87482,0.469725)(2.87469,0.467818) \path(2.82292,0.469098)(2.82286,0.458721)(2.88,0.46875) (2.82299,0.479476)(2.82292,0.469098) \put(2.93535,0.46875){\makebox(0,0)[l]{\hbox{\color{rgb_7f7f7f}\texttt{\footnotesize \texttt{pdf}}}}} \put(2.88,0.46875){\color{rgb_7f7f7f}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \allinethickness{1.2pt}% \color{rgb_ff0000}% \path(2.24,0.9375)(2.24533,0.94528)(2.25067,0.952995) (2.256,0.960645)(2.26133,0.968229)(2.26667,0.975749) (2.272,0.983203)(2.27733,0.990592)(2.28267,0.997917)(2.288,1.00518) (2.29333,1.01237)(2.29867,1.0195)(2.304,1.02656)(2.30933,1.03356) (2.31467,1.04049)(2.32,1.04736)(2.32533,1.05417)(2.33067,1.0609) (2.336,1.06758)(2.34133,1.07419)(2.34667,1.08073)(2.352,1.08721) (2.35733,1.09362)(2.36267,1.09997)(2.368,1.10625)(2.37333,1.11247) (2.37867,1.11862)(2.384,1.12471)(2.38933,1.13073)(2.39467,1.13669) (2.4,1.14258)(2.40533,1.1484)(2.41067,1.15417)(2.416,1.15986) (2.42133,1.16549)(2.42667,1.17106)(2.432,1.17656)(2.43733,1.182) (2.44267,1.18737)(2.448,1.19268)(2.45333,1.19792)(2.45867,1.20309) (2.464,1.2082)(2.46933,1.21325)(2.47467,1.21823)(2.48,1.22314) (2.48533,1.22799)(2.49067,1.23278)(2.496,1.2375)(2.50133,1.24215) (2.50667,1.24674)(2.512,1.25127)(2.51733,1.25573)(2.52267,1.26012) (2.528,1.26445)(2.53333,1.26872)(2.53867,1.27292)(2.544,1.27705) (2.54933,1.28112)(2.55467,1.28512)(2.56,1.28906)(2.56533,1.29294) (2.57067,1.29674)(2.576,1.30049)(2.58133,1.30417)(2.58667,1.30778) (2.592,1.31133)(2.59733,1.31481)(2.60267,1.31823)(2.608,1.32158) (2.61333,1.32487)(2.61867,1.32809)(2.624,1.33125)(2.62933,1.33434) (2.63467,1.33737)(2.64,1.34033)(2.64533,1.34323)(2.65067,1.34606) (2.656,1.34883)(2.66133,1.35153)(2.66667,1.35417)(2.672,1.35674) (2.67733,1.35924)(2.68267,1.36169)(2.688,1.36406)(2.69333,1.36637) (2.69867,1.36862)(2.704,1.3708)(2.70933,1.37292)(2.71467,1.37497) (2.72,1.37695)(2.72533,1.37887)(2.73067,1.38073)(2.736,1.38252) (2.74133,1.38424)(2.74667,1.3859)(2.752,1.3875)(2.75733,1.38903) (2.76267,1.39049)(2.768,1.39189)(2.77333,1.39323)(2.77867,1.3945) (2.784,1.3957)(2.78933,1.39684)(2.79467,1.39792)(2.8,1.39893) (2.80533,1.39987)(2.81067,1.40075)(2.816,1.40156)(2.82133,1.40231) (2.82667,1.40299)(2.832,1.40361)(2.83733,1.40417)(2.84267,1.40465) (2.848,1.40508)(2.85333,1.40544)(2.85867,1.40573)(2.864,1.40596) (2.86933,1.40612)(2.87467,1.40622)(2.88,1.40625) \allinethickness{0.0055348in}% \path(2.82288,1.41337)(2.82817,1.3965) \path(2.82772,1.41543)(2.83335,1.39747) \path(2.83353,1.41441)(2.83854,1.39845) \path(2.83934,1.41339)(2.84372,1.39942) \path(2.84515,1.41237)(2.8489,1.4004) \path(2.85096,1.41135)(2.85408,1.40137) \path(2.85677,1.41033)(2.85927,1.40235) \path(2.86257,1.40931)(2.86445,1.40332) \path(2.86838,1.40829)(2.86963,1.4043) \path(2.87419,1.40727)(2.87482,1.40527) \path(2.83547,1.39787)(2.86857,1.40826) \path(2.82296,1.39954)(2.85714,1.41026) \path(2.82293,1.40512)(2.84572,1.41227) \path(2.82289,1.4107)(2.83429,1.41427) \allinethickness{1.2pt}% \path(2.82292,1.4059)(2.82299,1.39552)(2.88,1.40625) (2.82286,1.41628)(2.82292,1.4059) \put(2.86001,1.46481){\makebox(0,0)[b]{\fboxrule0.1pt% \fcolorbox{rgb_ff0000}{cmy_000019}{\hbox{\color{rgb_0000ff}\texttt{\footnotesize \texttt{eps}}}}}} \put(2.88,1.40625){\color{rgb_0000ff}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \path(2.88,1.40625)(3.52,1.40625) \allinethickness{0.0055348in}% \path(3.50867,1.40419)(3.51287,1.40755) \path(3.49734,1.40213)(3.50573,1.40884) \path(3.48601,1.40007)(3.4986,1.41014) \path(3.47467,1.39801)(3.49146,1.41144) \path(3.46334,1.39595)(3.48433,1.41274) \path(3.46292,1.40262)(3.47719,1.41403) \path(3.46292,1.40962)(3.47006,1.41533) \path(3.51429,1.40521)(3.51235,1.40764) \path(3.50858,1.40417)(3.5047,1.40903) \path(3.50288,1.40314)(3.49705,1.41042) \path(3.49717,1.4021)(3.4894,1.41181) \path(3.49146,1.40106)(3.48175,1.41321) \path(3.48575,1.40002)(3.47409,1.4146) \path(3.48005,1.39899)(3.46644,1.41599) \path(3.47434,1.39795)(3.46292,1.41222) \path(3.46863,1.39691)(3.46292,1.40404) \allinethickness{1.2pt}% \path(3.46292,1.40625)(3.46292,1.39587)(3.52,1.40625) (3.46292,1.41663)(3.46292,1.40625) \put(3.57535,1.40625){\makebox(0,0)[l]{\fboxrule0.1pt% \fcolorbox{rgb_ff0000}{cmy_000019}{\hbox{\color{rgb_0000ff}\texttt{\footnotesize \begin{minipage}{0.225in}\texttt{png mng gif}\end{minipage}}}}}} \put(3.52,1.40625){\color{rgb_0000ff}$\allinethickness{0.0207555in}\circle{0.0207555}$}% \put(1.92,0.46875){\makebox(0,0)[c]{\hbox{\color{rgb_009800}\texttt{\Large flix}}}} \end{picture}% epix-1.2.14/doc/cb.xp0000644000175000017500000000043610643225006013241 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; int main() { bounding_box(P(-2,-1),P(2,1)); unitlength("1in"); picture(1.5,0.75); begin(); h_axis(4); v_axis(1); bold(); plot(cb, x_min, x_max, 4); label(P(0,y_min), P(0,-4), "\\code{cb}", b); end(); } epix-1.2.14/doc/dots.xp0000644000175000017500000000055210643225006013625 0ustar hwanghwang/* -*-ePiX-*- */ /* dots.c -- Dot primitives */ #include "epix.h" using namespace ePiX; int main() { unitlength("1pt"); bounding_box(P(0,0), P(8,1)); picture(P(72,12)); offset(P(10,2)); begin(); spot(P(0,0)); dot(P(1,0)); ddot(P(2,0)); box(P(4,0)); bbox(P(5,0)); line(P(6.5,0), P(8.75,0)); ring(P(7,0)); circ(P(8,0)); end(); } epix-1.2.14/doc/my_code.cc0000644000175000017500000000045310643225006014231 0ustar hwanghwang/* my_code.cc */ #include "my_code.h" using namespace ePiX; namespace Mine { double lorentz_norm(P arg) { double x=arg.x1(), y=arg.x2(), z=arg.x3(); // extract coords return -x*x + y*y + z*z; } bool spacelike(P arg) { return (lorentz_norm(arg) > 0); } } // end of namespace epix-1.2.14/doc/koch.xp0000644000175000017500000000066510643225006013605 0ustar hwanghwang/* -*-ePiX-*- */ /* koch.c -- Simple fractal "curve" generation. -- June 6, 2002 */ #include "epix.h" using namespace ePiX; // const int koch_seed[] = {6, 4, 0, 1, -1, 0}; const int seed[] = {4, 8, 0, 1, 0, 3, 3, 0, 1, 0}; int main() { bounding_box(P(0,0), P(3, 0.5)); picture(P(3, 0.5)); unitlength("1in"); offset(P(0,0.25)); begin(); for (int i=1; i <= 3; ++i) fractal(P(i-1,0), P(i,0), i, seed); end(); } epix-1.2.14/doc/sinx.xp0000644000175000017500000000046410643225006013637 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; int main() { bounding_box(P(-2,-1),P(2,1)); unitlength("1in"); picture(1.5,0.75); begin(); revolutions(); h_axis(4); v_axis(1); bold(); plot(sinx, x_min, x_max, 60); label(P(0,y_min), P(0,-4), "\\code{sinx}", b); end(); } epix-1.2.14/doc/color_density.eepic0000644000175000017500000001064610643225006016174 0ustar hwanghwang%% Generated from color_density.xp on Thu Jul 5 10:01:14 EDT 2007 by %% ePiX-1.1.6 %% %% Cartesian bounding box: [-2,2] x [0,1.375] %% Actual size: 4 x 1.5in %% Figure offset: left by 0in, down by 0in %% \newrgbcolor{rgb_000000}{0 0 0} \newrgbcolor{rgb_005454}{0 0.329412 0.329412} \newrgbcolor{rgb_00a9a9}{0 0.662745 0.662745} \newrgbcolor{rgb_00fefe}{0 0.996078 0.996078} \newrgbcolor{rgb_00ffff}{0 1 1} \newrgbcolor{rgb_540000}{0.329412 0 0} \newrgbcolor{rgb_54ffff}{0.329412 1 1} \newrgbcolor{rgb_a90000}{0.662745 0 0} \newrgbcolor{rgb_a9ffff}{0.662745 1 1} \newrgbcolor{rgb_fe0000}{0.996078 0 0} \newrgbcolor{rgb_feffff}{0.996078 1 1} \newrgbcolor{rgb_ff0000}{1 0 0} \newrgbcolor{rgb_ff5454}{1 0.329412 0.329412} \newrgbcolor{rgb_ffa9a9}{1 0.662745 0.662745} \newrgbcolor{rgb_fffefe}{1 0.996078 0.996078} \psset{unit=1in,linewidth=0.4pt} \begin{pspicture}(4,1.5)(-0,-0) \psset{fillcolor=rgb_feffff}% \psline[fillstyle=solid] (-0.123,1.22727)(0.127,1.22727)(0.127,1.5)(-0.123,1.5)(-0.123,1.22727) %% \psline(-0.123,1.22727)(0.127,1.22727)(0.127,1.5)(-0.123,1.5)(-0.123,1.22727) %% \psset{fillcolor=rgb_a9ffff}% \psline[fillstyle=solid] (0.21,1.22727)(0.46,1.22727)(0.46,1.5)(0.21,1.5)(0.21,1.22727) %% \psline(0.21,1.22727)(0.46,1.22727)(0.46,1.5)(0.21,1.5)(0.21,1.22727) %% \psset{fillcolor=rgb_54ffff}% \psline[fillstyle=solid] (0.543,1.22727)(0.793,1.22727)(0.793,1.5)(0.543,1.5)(0.543,1.22727) %% \psline(0.543,1.22727)(0.793,1.22727)(0.793,1.5)(0.543,1.5)(0.543,1.22727) %% \psset{fillcolor=rgb_00fefe}% \psline[fillstyle=solid] (0.876,1.22727)(1.126,1.22727)(1.126,1.5)(0.876,1.5)(0.876,1.22727) %% \psline(0.876,1.22727)(1.126,1.22727)(1.126,1.5)(0.876,1.5)(0.876,1.22727) %% \psset{fillcolor=rgb_00a9a9}% \psline[fillstyle=solid] (1.209,1.22727)(1.459,1.22727)(1.459,1.5)(1.209,1.5)(1.209,1.22727) %% \psline(1.209,1.22727)(1.459,1.22727)(1.459,1.5)(1.209,1.5)(1.209,1.22727) %% \psset{fillcolor=rgb_005454}% \psline[fillstyle=solid] (1.542,1.22727)(1.792,1.22727)(1.792,1.5)(1.542,1.5)(1.542,1.22727) %% \psline(1.542,1.22727)(1.792,1.22727)(1.792,1.5)(1.542,1.5)(1.542,1.22727) %% \psset{fillcolor=rgb_000000}% \psline[fillstyle=solid] (1.875,1.22727)(2.125,1.22727)(2.125,1.5)(1.875,1.5)(1.875,1.22727) %% \psline(1.875,1.22727)(2.125,1.22727)(2.125,1.5)(1.875,1.5)(1.875,1.22727) %% \psset{fillcolor=rgb_540000}% \psline[fillstyle=solid] (2.208,1.22727)(2.458,1.22727)(2.458,1.5)(2.208,1.5)(2.208,1.22727) %% \psline(2.208,1.22727)(2.458,1.22727)(2.458,1.5)(2.208,1.5)(2.208,1.22727) %% \psset{fillcolor=rgb_a90000}% \psline[fillstyle=solid] (2.541,1.22727)(2.791,1.22727)(2.791,1.5)(2.541,1.5)(2.541,1.22727) %% \psline(2.541,1.22727)(2.791,1.22727)(2.791,1.5)(2.541,1.5)(2.541,1.22727) %% \psset{fillcolor=rgb_fe0000}% \psline[fillstyle=solid] (2.874,1.22727)(3.124,1.22727)(3.124,1.5)(2.874,1.5)(2.874,1.22727) %% \psline(2.874,1.22727)(3.124,1.22727)(3.124,1.5)(2.874,1.5)(2.874,1.22727) %% \psset{fillcolor=rgb_ff5454}% \psline[fillstyle=solid] (3.207,1.22727)(3.457,1.22727)(3.457,1.5)(3.207,1.5)(3.207,1.22727) %% \psline(3.207,1.22727)(3.457,1.22727)(3.457,1.5)(3.207,1.5)(3.207,1.22727) %% \psset{fillcolor=rgb_ffa9a9}% \psline[fillstyle=solid] (3.54,1.22727)(3.79,1.22727)(3.79,1.5)(3.54,1.5)(3.54,1.22727) %% \psline(3.54,1.22727)(3.79,1.22727)(3.79,1.5)(3.54,1.5)(3.54,1.22727) %% \psset{fillcolor=rgb_fffefe}% \psline[fillstyle=solid] (3.873,1.22727)(4.123,1.22727)(4.123,1.5)(3.873,1.5)(3.873,1.22727) %% \psline(3.873,1.22727)(4.123,1.22727)(4.123,1.5)(3.873,1.5)(3.873,1.22727) %% \psline(0,0)(4,0) %% \rput(0,0){\makebox(0,0){{$\rule{0.5pt}{4pt}$}}} \rput(1,0){\makebox(0,0){{$\rule{0.5pt}{4pt}$}}} \rput(2,0){\makebox(0,0){{$\rule{0.5pt}{4pt}$}}} \rput(3,0){\makebox(0,0){{$\rule{0.5pt}{4pt}$}}} \rput(4,0){\makebox(0,0){{$\rule{0.5pt}{4pt}$}}} \psline(2,0)(2,1.09091) %% \rput(2,0){\makebox(0,0){{$\rule{4pt}{0.5pt}$}}} \rput(2,1.09091){\makebox(0,0){{$\rule{4pt}{0.5pt}$}}} \rput(0,-0.055348){\makebox(0,0)[t]{{$-2$}}} \rput(1,-0.055348){\makebox(0,0)[t]{{$-1$}}} \rput(2,-0.055348){\makebox(0,0)[t]{{$\phantom{-}0$}}} \rput(3,-0.055348){\makebox(0,0)[t]{{$\phantom{-}1$}}} \rput(4,-0.055348){\makebox(0,0)[t]{{$\phantom{-}2$}}} \psset{linecolor=rgb_00ffff}% \psline(0,1.09091)(1,1.09091) %% \psline(1,1.09091)(2,0) %% \psline(2,0)(3,0) %% \psline(3,0)(4,1.09091) %% \psset{linewidth=0.8pt}% \psset{linecolor=rgb_ff0000}% \psline (0,1.09091)(1,0) %% \psline(1,0)(2,0) %% \psline(2,0)(3,1.09091) %% \psline(3,1.09091)(4,1.09091) %% \end{pspicture} epix-1.2.14/doc/arrow25.eepic0000644000175000017500000000313611617264754014633 0ustar hwanghwang%% Generated from arrow25.xp on Sat Aug 6 12:21:00 EDT 2011 by %% ePiX-1.2.4 %% %% Cartesian bounding box: [-2,2] x [-1,1] %% Actual size: 24 x 12pt %% Figure offset: left by 0pt, down by 0pt %% %% usepackages epic,eepic,xcolor %% \xdefinecolor{rgb_000000}{rgb}{0,0,0}% \setlength{\unitlength}{1pt}% \begin{picture}(24,12)(0,0)% \path(0,6)(24,6) \path(16.2656,4.875)(17.8125,4.875) \path(16.7813,5.25)(19.875,5.25) \path(17.2969,5.625)(21.9375,5.625) \path(17.8125,6)(24,6) \path(17.2969,6.375)(21.9375,6.375) \path(16.7813,6.75)(19.875,6.75) \path(16.2656,7.125)(17.8125,7.125) \path(23.6071,5.92857)(23.6071,6.07143) \path(23.2143,5.85714)(23.2143,6.14286) \path(22.8214,5.78571)(22.8214,6.21429) \path(22.4286,5.71429)(22.4286,6.28571) \path(22.0357,5.64286)(22.0357,6.35714) \path(21.6429,5.57143)(21.6429,6.42857) \path(21.25,5.5)(21.25,6.5) \path(20.8571,5.42857)(20.8571,6.57143) \path(20.4643,5.35714)(20.4643,6.64286) \path(20.0714,5.28571)(20.0714,6.71429) \path(19.6786,5.21429)(19.6786,6.78571) \path(19.2857,5.14286)(19.2857,6.85714) \path(18.8929,5.07143)(18.8929,6.92857) \path(18.5,5)(18.5,7) \path(18.1071,4.92857)(18.1071,7.07143) \path(17.7143,4.85714)(17.7143,5.92857) \path(17.7143,6.07143)(17.7143,7.14286) \path(17.3214,4.78571)(17.3214,5.64286) \path(17.3214,6.35714)(17.3214,7.21429) \path(16.9286,4.71429)(16.9286,5.35714) \path(16.9286,6.64286)(16.9286,7.28571) \path(16.5357,4.64286)(16.5357,5.07143) \path(16.5357,6.92857)(16.5357,7.35714) \path(16.1429,4.57143)(16.1429,4.78571) \path(16.1429,7.21429)(16.1429,7.42857) \path(17.8125,6)(15.75,4.5)(24,6)(15.75,7.5)(17.8125,6) \end{picture}% epix-1.2.14/doc/sgn.xp0000644000175000017500000000057210643225006013445 0ustar hwanghwang/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; int main() { bounding_box(P(-2,-1),P(2,1)); unitlength("1in"); picture(1.5,0.75); begin(); h_axis(4); v_axis(1); bold(); line(P(x_min,-1), P(0,-1)); line(P(x_max, 1), P(0, 1)); plain(); dot(P(0,0)); circ(P(0,-1)); circ(P(0,1)); label(P(0,y_min), P(0,-4), "\\code{sgn}", b); end(); } epix-1.2.14/doc/alignment_lr.eepic0000644000175000017500000000104710643225006015765 0ustar hwanghwang%% Generated from alignment_lr.xp on Fri Jan 7 14:18:31 EST 2005 by %% ePiX-1.0.3 %% %% Cartesian bounding box: [-1,1] x [-1,1] %% Actual size: 72pt x 24pt %% Figure offset: right by 0pt, up by 0pt %% \setlength{\unitlength}{1pt} \begin{picture}(72,24)(-0,-0) %% --- \put(0,12){\makebox(0,0)[r]{\texttt{[l]}}} \put(0,12){\makebox(0,0)[c]{{\circle*{3}}}} \put(0,12){\makebox(0,0)[l]{\texttt{[r]}}} \put(72,12){\makebox(0,0)[b]{\texttt{[t]}}} \put(72,12){\makebox(0,0)[c]{{\circle*{3}}}} \put(72,12){\makebox(0,0)[t]{\texttt{[b]}}} \end{picture} epix-1.2.14/doc/epix.info0000644000175000017500000064611412226632774014154 0ustar hwanghwangThis is epix.info, produced by makeinfo version 4.13 from epix.texi. This is the manual for ePiX, Version 1.2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Andrew D. Hwang INFO-DIR-SECTION TeX START-INFO-DIR-ENTRY * ePiX: (epix). Drawing mathematically accurate figures. END-INFO-DIR-ENTRY  File: epix.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) ePiX manual *********** This is the manual for ePiX, Version 1.2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Andrew D. Hwang * Menu: * Introduction :: * Getting Started :: * Reference Manual :: * Advanced Topics :: * Software Freedom:: * Acknowledgments:: * Function Index:: * Concept Index:: --- The Detailed Node Listing --- Introduction * Changes in Version 1.2:: * Software Dependencies:: * Installation:: Getting Started * Running `ePiX':: * The Drawing Model:: * Tutorial:: * `C++' Basics:: * Animation:: * Layout Tricks:: Reference Manual * File Structure:: * Picture Size and Aspect Ratio:: * Color:: * Scene Attributes:: * Drawing Attributes:: * Creating and Drawing Objects:: * More About `C++':: * Attribute Quick Reference:: Advanced Topics * Hidden Object Removal:: * Extensions:: * Programmer's Guide::  File: epix.info, Node: Introduction, Next: Getting Started, Prev: Top, Up: Top 1 Introduction ************** `ePiX', a collection of batch utilities, creates mathematically accurate figures, plots, and animations containing `LaTeX' typography. The input syntax is easy to learn, and the user interface resembles that of `LaTeX' itself: You prepare a scene description in a text editor, then "compile" the input file into a picture. `LaTeX'- and web-compatible output types include a `LaTeX' picture-like environment written with `PSTricks', `tikz', or `eepic' macros; vector images (`eps', `ps', and `pdf'); and bitmapped images and movies (`png', `mng', and `gif'). `ePiX''s strengths include: * Quality of output: `ePiX' creates accurate, publication-quality figures whose appearance matches that of `LaTeX'. Typography may be put in a figure as easily as in an ordinary `LaTeX' document. * Ease of use: Figure objects and their attributes are specified by simple, descriptive commands. * Flexibility: Objects are described by attributes and Cartesian location; as in `LaTeX', printed appearance is determined when the figure is compiled. A well-designed figure can be altered dramatically, yet precisely, with command-line switches or minor changes to the input file. * Power and extendibility: `ePiX' inherits the power of `C++' as a programming language; variables, data structures, loops, and recursion can be used to draw complicated plots and figures with just a few lines of input. External code can be incorporated in a figure with a command line option or by using a Makefile. * Economy of storage and transmission: For a document containing many figures, a compressed tar file of the `LaTeX' sources and `ePiX' files is typically a few percent the size of the compressed PostScript file. * License: `ePiX' is _free software_. You are granted the right to use the program for whatever purpose, and to inspect, modify, and re-distribute the source code, so long as you do not restrict the rights of others to do the same. In short, the license is similar to the terms under which theorems are published. `ePiX' facilitates logical, as opposed to visual, structuring of mathematical figures, analogous to the relationship between `LaTeX' and a word processor. A few stylistic defaults streamline the creation of simple figures, but there are few internal restrictions on the contents or appearance of a figure; aesthetic and practical decisions are left to you. If you are a: * Potential user, you may wish to skip immediately to "Software Dependencies" before investing additional time. * New user, proceed from here until you have enough understanding to run the software, then experiment with the samples files while reading Chapter *note Getting Started::, or return to the manual as needed. * More advanced user, browse at will, probably starting with Chapter *note Reference Manual::. This manual is relatively conversational, and occasionally redundant, especially between portions meant for readers at different levels of familiarity. Throughout, you are assumed to be familiar with `LaTeX' and basic linear algebra: the description of points, vectors, lines, and planes in three-dimensional space. Other material, such as `C++' syntax, is introduced as needed. * Menu: * Changes in Version 1.2:: * Software Dependencies:: * Installation::  File: epix.info, Node: Changes in Version 1.2, Next: Software Dependencies, Prev: Introduction, Up: Introduction 1.1 Changes in Version 1.2 ========================== `ePiX' 1.2.x has been written almost entirely from scratch. The conceptual model is unchanged, but there are a few changes of syntax. If you're new to `ePiX', please skip straight to Section *note Software Dependencies::. Except as noted below, `ePiX' 1.0 files will compile under Version 1.2. Generally, global variables have been deprecated or removed, and should be replaced by function calls in new files. The following changes are either required, or else strongly recommended (and may become mandatory). * (Mandatory) The global variable tix in a `flix' file must be manipulated through the function tix(). * (Mandatory) The command `use_pstricks()' is obsolete. PSTricks output is obtained systematically as an output format. * (Mandatory) Deprecated "aliases" no longer exist: `triple' (for the `P' class), `D' (for `Deriv'), and `I' (for `Integral'). Lowercase trig function names conflicted with the standard namespace and have been removed. * (Mandatory) Geometric object commands (`circle', `plane', `segment', and `sphere'), which formerly created class objects, now perform drawing just as `ellipse', `line', `rect', etc., do. The classes are available with capitalized names (`Circle', etc.). * (Mandatory) Camera orientation is controlled with functions named `tilt', `pan', and `roll'; each rotates the camera about an axis through the viewpoint, not through the target. * (Recommended) The global size variables x_min, x_max, y_min, y_max, x_size, and y_size should be replaced by the function calls xmin(), etc. (No underscores.) * (Suggested) The camera may be accessed through the function `cam()'. * (Suggested) The size and bounding box are given in one command, such as `picture(P(-1,0), P(1,1), "4x3in")'. The old syntax will be retained indefinitely. Changes in approach in version 1.2. ----------------------------------- * Output is cleanly separated from the internal representation. Figures may be written with a choice of macros--`PSTricks', `tikz', and `eepic' at present--and new output types are easily coded so long as the format supports arbitrary line segments, color, and the ability to place a `LaTeX' box at a specified location. * Colors are a manipulable data type, available in RGB, CMY, CMYK, and Gray models. `xcolor'-style operations, such as color model conversion, blending, superposition, and inversion are provided. The camera has a filter which affects the colors of all scene elements. Filters performing CMYK separation are provided. * Color filling is controlled with declarations, similarly to line colors in `ePiX' 1.0. Arrows and markers of type spot, dot, ddot, and circ are now colored like other markers. Parametric surfaces may be color-shaded. If a figure contains many shaded elements, a color-capable output format (e.g., `PSTricks' or `tikz') should be used for efficiency. Filled regions are implemented as fine hatching in `eepic'. * An `axis' class provides coordinate axes with labels in a variety of styles: decimals or scientific notation of specified precision, fractions, trig fractions, logarithmic labels in arbitrary (integer) base, and user-supplied styles. * `ePiX' 1.2.x performs page layout. Sub-figures may be manipulated flexibly. The sample files give several applications. * Non-member intersection operators for circles, planes, spheres, and segments are provided. A "non-generic" intersection does not throw an exception, but instead returns an undrawable "malformed" object.  File: epix.info, Node: Software Dependencies, Next: Installation, Prev: Changes in Version 1.2, Up: Introduction 1.2 Software Dependencies ========================= Mac OS X operating system ------------------------- If you run GNU/Linux, a BSD, or Solaris, you probably have (and can surely install) all the external software needed to use `ePiX'. On Mac OS X, you will need the Apple developer tools and an X server (XCode and XDarwin on the Tiger disks), and the free `fink' package manager to build a GNU environment. For Windows, you'll need to install Cygwin and several packages. Detailed instructions are given below. "Under the hood", an input file is successively converted to a `LaTeX' picture; `dvi'; PostScript, `pdf' or `eps'; and if desired, to a bitmapped image or movie. Four shell scripts--`epix', `laps', `elaps', and `flix'--automate the various file format conversions. `ePiX' consists of a `C++' library, header, and shell scripts, and requires GNU `bash' and a compiler _for normal use_. For complete functionality, you need `g++' (Version 3.2 or later), `bash', a text editor (`ePiX' works particularly well with `emacs'), a `LaTeX' distribution, `Ghostscript', `gv' (or your favorite PS/PDF previewer), and `ImageMagick'. GNU `grep' and `sed' are good to have. You may need additional "developer packages" (`binutils', `make') in order to build `ePiX'. The more up to date your software is, the better your experience is likely to be, but bleeding edge versions are not necessary, or even always desirable. Aside from their reliance on specific programs, `ePiX''s shell scripts are written using Unix-style pathnames. Thus, the most straightforward way to use `ePiX' is to install a GNU environment. Jay Belanger's `emacs' mode allows you to write, compile, and view `ePiX' figures without leaving `emacs'. If you use another editor, you'll want to create template source files so you don't have to type boilerplate code each time you write a new figure. Windows operating system ------------------------ Cygwin can be used to run `ePiX' under Windows. Download `setup.exe' from `http://www.cygwin.com', then install the packages you need. The following are recommended, and sufficient for the actions described in this manual. (Archive) bzip2, tar (Devel) binutils, coreutils, gcc, gcc-g++, make, sed (Editors) emacs, emacs-X11, vim (Graphics) ImageMagick, ghostscript-base, ghostscript-x11, gv (Publishing) tetex (all) (Shells) bash, bash-completion (X11) X-start-menu-icons, X-startup-scripts, XFree86-lib-compat, xorg-x11-fscl, xorg-x11-fsrv  File: epix.info, Node: Installation, Prev: Software Dependencies, Up: Introduction 1.3 Installation ================ `ePiX' is distributed over the World-Wide Web as source code. Packages may be found at `http://mathcs.holycross.edu/~ahwang/epix/ePiX.html' The latest stable release is also on the CTAN mirrors, in the `graphics' directory. (Some users of Red Hat have reported file permission problems when unpacking the CTAN tarballs. If you encounter this difficulty, please try downloading the sources from the project main page.) Unpack the compressed tar file with the appropriate command: tar -zxvf epix-x.y.z.tar.gz tar -jxvf epix-x.y.z.tar.bz2 (`x.y.z' is the version number) or, if your `tar' doesn't do decompression, gunzip -c epix-x.y.z.tar.gz | tar -xvf - bzcat epix-x.y.z.tar.bz2 | tar -xvf - `cd' to the source directory, `epix-x.y.z'. The `INSTALL' file contains detailed installation instructions. If you're impatient, the short of it is `./configure [--options]; make; make install'. Run `./configure --help' for a list of options. By default, `ePiX' installs in subdirectories of `/usr/local'; if you want to install elsewhere, supply `./configure' with the appropriate `--prefix'. You may also want to consult `POST-INSTALL' for information on setting your `PATH' variable so your shell can find `ePiX'. The manual and sample files are in `/usr/local/share/doc/epix'. Mailing lists ------------- There are two mailing lists, one for user questions, one for development discussion. Please visit `http://savannah.nongnu.org/mail/?group=epix' to subscribe.  File: epix.info, Node: Getting Started, Next: Reference Manual, Prev: Introduction, Up: Top 2 Getting Started ***************** This chapter describes the basics of creating figures in `ePiX' for readers familiar with `LaTeX' but completely new to `C++'. No detailed knowledge of `C++' is needed to use `ePiX', only a bit of grammar that is easily absorbed by example. Section *note Running `ePiX'::, describes the commands (shell scripts) comprising `ePiX', and explains how to set up a graphical environment using standard *nix programs. Section *note Overview::, briefly describes figure creation. Section *note Tutorial::, presents a few files side-by-side with their output, and should be read at a computer so you can run the exercises. * Menu: * Running `ePiX':: * The Drawing Model:: * Tutorial:: * `C++' Basics:: * Animation:: * Layout Tricks::  File: epix.info, Node: Running `ePiX', Next: The Drawing Model, Prev: Getting Started, Up: Getting Started 2.1 Running `ePiX' ================== An "input file" is a human-written figure specification containing `ePiX' commands; an "output file" is either a `LaTeX' picture-like environment or a stand-alone vector graphic. Conversion ("compiling" a figure) is accomplished with four shell scripts, `laps', `epix', `elaps', and `flix'. Each script has a preferred extension for its input files, and is invoked with a command of the form