summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-07 03:00:49 +0000
committerNorbert Preining <norbert@preining.info>2019-09-07 03:00:49 +0000
commit7345b8683c7cbeaedf53e992fda0b3fa6141084e (patch)
tree3246f6574e0921c2111b93b76720f54034238185 /graphics
parentbd3ecfd29a422ad4d7f8f1e119ddc518494e567a (diff)
CTAN sync 201909070300
Diffstat (limited to 'graphics')
-rw-r--r--graphics/axodraw2/ChangeLog5
-rw-r--r--graphics/axodraw2/README7
-rw-r--r--graphics/axodraw2/axodraw2-man.pdfbin419723 -> 421740 bytes
-rw-r--r--graphics/axodraw2/axodraw2-man.tex67
-rw-r--r--graphics/axodraw2/axodraw2.sty9
-rw-r--r--graphics/axodraw2/axohelp.c233
-rw-r--r--graphics/axodraw2/test-big.ax2-std108
-rw-r--r--graphics/pgf/contrib/simpleoptics/README18
-rw-r--r--graphics/pgf/contrib/simpleoptics/simpleoptics.pdfbin0 -> 96199 bytes
-rw-r--r--graphics/pgf/contrib/simpleoptics/simpleoptics.sty140
-rw-r--r--graphics/pgf/contrib/simpleoptics/simpleoptics.tex474
11 files changed, 877 insertions, 184 deletions
diff --git a/graphics/axodraw2/ChangeLog b/graphics/axodraw2/ChangeLog
index b5367825b9..6d8c09b545 100644
--- a/graphics/axodraw2/ChangeLog
+++ b/graphics/axodraw2/ChangeLog
@@ -30,3 +30,8 @@
axodraw2 package [v. 2.1.1 2018/02/20]
axodraw2.sty [v. 2.1.1 2018/02/15]
axohelp [v. 1.2 2018/02/20]
+2019/07/30
+ axohelp: Exit code on error is 1, not -1 (unsigned is more OS-independent)
+ axohelp: Clean up CleanupOutput subroutine
+ axohelp: Fix bug in use of identification line
+ axohelp: Fix stack overflow bugs in subroutine DoOneObject
diff --git a/graphics/axodraw2/README b/graphics/axodraw2/README
index 779471bc81..a0ab3d5333 100644
--- a/graphics/axodraw2/README
+++ b/graphics/axodraw2/README
@@ -1,8 +1,8 @@
-Axodraw2 2.1.1a 2018/09/12
+Axodraw2 2.1.1b 2019/09/02
==========================
axodraw2.sty version is v2.1.1 2018/02/15
-axohelp.c version is 1.2 2018/02/14
+axohelp.c version is 1.3 2019/08/30
Axodraw2 is a package that defines macros for drawing Feynman graphs
in LaTeX documents.
@@ -30,7 +30,6 @@ The files in the distribution are:
axodraw2-man.tex Source for documentation
example.tex Example latex file for use of axodraw2
axohelp.c Source code of axohelp
- axohelp.exe MS-Windows executable for axohelp
axohelp.1 Man page for axohelp
axohelp.test Script for testing axohelp
test.ax1 Input file for test
@@ -49,7 +48,7 @@ The files in the distribution are:
Authors, copyright, license
---------------------------
-(C) 1994-2018 John Collins (jcc8 at psu dot edu) and Jos Vermaseren
+(C) 1994-2019 John Collins (jcc8 at psu dot edu) and Jos Vermaseren
(t68 at nikhef dot nl)
Axodraw2 is free software: you can redistribute it and/or modify it
diff --git a/graphics/axodraw2/axodraw2-man.pdf b/graphics/axodraw2/axodraw2-man.pdf
index 88da7d59ca..aacb77d69d 100644
--- a/graphics/axodraw2/axodraw2-man.pdf
+++ b/graphics/axodraw2/axodraw2-man.pdf
Binary files differ
diff --git a/graphics/axodraw2/axodraw2-man.tex b/graphics/axodraw2/axodraw2-man.tex
index 37c38ad97d..ff7bdb8073 100644
--- a/graphics/axodraw2/axodraw2-man.tex
+++ b/graphics/axodraw2/axodraw2-man.tex
@@ -76,7 +76,7 @@ University Park, Pennsylvania 16802, USA} \\
Science Park 105, 1098 XG Amsterdam, The Netherlands} \\
\texttt{t68 at nikhef dot nl} \\
\vspace{1.0cm}
-(15 February 2018)
+(2 September 2019)
\end{center}
\vspace{5mm}
@@ -397,22 +397,18 @@ more.
At the moment that this document was updated (January 2018), axodraw2
was part of both the main \TeX{} distributions, TeXLive and MiKTeX.
The easiest way to install axodraw2 is therefore from the package
-manager of your \TeX{} distribution. (There is one complication
-concerning the \program{axohelp} program --- see below.)
+manager of your \TeX{} distribution.
You can also obtain axodraw2 from CTAN at
\url{http://ctan.org/pkg/axodraw2}, and install it manually, following
the instructions in Sec.\ \ref{sec:manual.install} below.
\paragraph{\program{axohelp} in TeXLive}
-In TeXLive 2017, a binary executable for the \program{axohelp} was not
-provided, even though the rest of the axodraw2 package was provided.
-Thus you could use axodraw2 with the \program{latex} but not with
-\program{pdflatex} unless you compiled and installed the program
-\program{axohelp} yourself following the instructions below. This is
-planned to be changed in TeXLive 2018, when \program{axohelp} should
-be provided as part of the distribution when the package axodraw2 is
-installed from the package manager.
+In TeXLive 2018 and later, a binary executable for the
+\program{axohelp} is provided, as part of the \program{axodraw2}
+package. So \program{axohelp} is available provided that the
+\program{axodraw2} package is installed..
+
\paragraph{\program{axohelp} in MiKTeX}
The axodraw2 package including an executable \program{axohelp.exe} was
@@ -454,44 +450,49 @@ operations as an administrative user (e.g., root), possibly
supplemented by running the relevant commands with the \program{sudo}
program.
-But note that if you later install the axodraw2 package from the
-package manager of you \TeX{} distribution, it's a good idea to delete
-the files you installed manually. Otherwise when you use axodraw2 in
-a document, then the wrong version of \file{axodraw2.sty} may get
-used. This is a particularly important issue after possible future
-updates to axodraw2 get installed by the package manager.
+If you later install the axodraw2 package from the package manager of
+your \TeX{} distribution, it's a good idea to delete the files you
+installed manually. Otherwise when you use axodraw2 in a document,
+then the wrong version of \file{axodraw2.sty} may get used. This is a
+particularly important issue after possible future updates to axodraw2
+get installed by the package manager.
%--
\subsubsection{Helper program \program{axohelp}}
\label{sec:axohelp}
-If you wish to use axodraw2 with \program{pdflatex}, \program{lualatex},
-or \program{xelatex}., then you need to install the \program{axohelp}
-program.
-
-On a Unix-like system (e.g., linux or OS-X), you first need to compile
-the program by a C compiler. An appropriate shell command to do this
-is
+If you wish to use axodraw2 with \program{pdflatex},
+\program{lualatex}, or \program{xelatex}, then you need to install the
+\program{axohelp} program. \emph{(It is useful to reiterate here that
+ the standard distributions of \TeX{} currently supply the
+ \program{axohelp} program. So the steps described here are only
+ necessary if for some reason you wish to do a manual installation.
+ One possible reason is to use a recent update of \program{axohelp},
+ since TeXLive normally only supplies updated versions of binary
+ executable files with the initial release of one of TeXLive's yearly
+ versions.)}
+
+To install \program{axohelp} manually, you will first need to compile
+the program by a C compiler. Under a Unix-like operating system
+(linux or macOS) an appropriate shell command is
\begin{verbatim}
cc -o axohelp -O3 axohelp.c -lm
\end{verbatim}
(Note that this is a C compiler, \emph{not} a C++ compiler.) Most linux
systems have the program \program{cc} already installed. This also applies to
-OS-X at versions below 10.7. But on OS-X version 10.7 and higher, you
+macOS(OS-X) at versions below 10.7. But on macOS version 10.7 and higher, you
will need to install a compiler, which can be done by installing XCode
and the associated command-line utilities. If you have the GNU
compilers installed, you might need to use the command \program{gcc}
instead of \program{cc}.
-For Microsoft Windows, if you do not have a C compiler available, you
-can use the Windows binary \file{axohelp.exe} we have provided. It
-was compiled on Windows 10, and should work with at least that version
-of Windows.
+For Microsoft Windows, you will need to have installed a C compiler,
+and use it to compile \file{axohelp.c}.
-In any case once you have the executable (named \program{axohelp} on
-unix-like systems, or \program{axohelp.exe} on a Microsoft system), put
-it in a directory where it will be found when you run programs from
-the command line.
+Once you have the executable (named \program{axohelp} on Unix-like
+systems, or \program{axohelp.exe} on a Microsoft system), put it in a
+directory where it will be found when you run programs from the
+command line.
%--
diff --git a/graphics/axodraw2/axodraw2.sty b/graphics/axodraw2/axodraw2.sty
index 9adc261bdc..dc676008c8 100644
--- a/graphics/axodraw2/axodraw2.sty
+++ b/graphics/axodraw2/axodraw2.sty
@@ -69,7 +69,7 @@
%
% #] About folds :
%
-\ProvidesPackage{axodraw2}[2018/02/15 v2.1.1]
+\ProvidesPackage{axodraw2}[2018/10/10 v2.1.2]
%
% axodraw.sty file, both for .tex -> .dvi -> .ps and for .tex -> .pdf
%
@@ -3127,7 +3127,12 @@
% Left on stack: dr = length of line
3 index 3 index translate
2 index sub exch 3 index sub
- 2 copy atan rotate
+% 2 copy atan rotate
+ 2 copy
+ 2 copy 0 ne exch 0 ne or
+ {atan rotate}
+ {pop pop}
+ ifelse
dup mul exch dup mul add sqrt
3 1 roll pop pop
} def
diff --git a/graphics/axodraw2/axohelp.c b/graphics/axodraw2/axohelp.c
index 9846ea642c..6f818d7eff 100644
--- a/graphics/axodraw2/axohelp.c
+++ b/graphics/axodraw2/axohelp.c
@@ -1,7 +1,12 @@
/*
+
+ Need to do:
+ 1. Fix reporting of number of object to in-file number
+ 2. Or Don't require object 0 for ID line
+
#[ License :
- (C) 2016-2018 by authors:
+ (C) 2016-2019 by authors:
John Collins (jcc8 at psu dot edu)
Jos Vermaseren (t68 at nikhef dot nl)
@@ -60,6 +65,7 @@
#include <stdlib.h>
#include <math.h>
#include <string.h>
+#include <ctype.h>
/*
#] Includes :
@@ -67,9 +73,9 @@
*/
#define NAME "axohelp"
-#define VERSIONDATE "2018 Feb 20"
+#define VERSIONDATE "2019 Aug 28"
#define VERSION 1
-#define SUBVERSION 2
+#define SUBVERSION 3
#define COMMENTCHAR '%'
#define TERMCHAR ';'
@@ -110,7 +116,10 @@ double linesep = 0;
int flip = 0;
int clockwise = 0;
-void OutputString(char *);
+void CleanupOutput(char *str);
+void send( char* str );
+void sendClean( char* str );
+
void ArrowHead();
void GetArrow(double *);
void BezierArrow(double *);
@@ -329,40 +338,43 @@ double mod( double x, int n ) {
#[ PDF utilities :
These routines are included to make the program more readable and easier
- to write. It also allows the easy use of the OutputString routine that
+ to write. It also allows the easy use of the OutputString?? OLD name routine that
compactifies the output.
*/
-#define Stroke outpos += sprintf(outpos," S")
-#define CloseAndStroke outpos += sprintf(outpos," h S")
-#define Fill outpos += sprintf(outpos," f")
-#define CloseAndFill outpos += sprintf(outpos," h f")
-#define SaveGraphicsState outpos += sprintf(outpos," q")
-#define RestoreGraphicsState outpos += sprintf(outpos," Q")
+#define Stroke send(" S")
+#define CloseAndStroke send(" h S")
+#define Fill send(" f")
+#define CloseAndFill send(" h f")
+#define SaveGraphicsState send(" q")
+#define RestoreGraphicsState send(" Q")
void Bezier(double x1,double y1,double x2,double y2,double x3,double y3) {
- outpos +=
- sprintf(outpos,"\n %12.3f %12.3f %12.3f %12.3f %12.3f %12.3f c",x1,y1,x2,y2,x3,y3);
+ sprintf(outputbuffer,"\n %12.3f %12.3f %12.3f %12.3f %12.3f %12.3f c",x1,y1,x2,y2,x3,y3);
+ sendClean(outputbuffer);
}
void LineTo(double x1,double y1) {
- outpos +=
- sprintf(outpos,"\n %12.3f %12.3f l",x1,y1);
+ sprintf(outputbuffer,"\n %12.3f %12.3f l",x1,y1);
+ sendClean(outputbuffer);
}
void MoveTo(double x1,double y1) {
- outpos +=
- sprintf(outpos,"\n %12.3f %12.3f m",x1,y1);
+ sprintf(outputbuffer,"\n %12.3f %12.3f m",x1,y1);
+ sendClean(outputbuffer);
}
void SetLineWidth(double w) {
- outpos +=
- sprintf(outpos," %12.3f w",w);
+ sprintf(outputbuffer," %12.3f w",w);
+ sendClean(outputbuffer);
}
void SetDashSize(double dashsize,double phase) {
- if ( dashsize ) outpos += sprintf(outpos," [%12.3f] %12.3f d",dashsize,phase);
- else outpos += sprintf(outpos," [] 0 d");
+ if ( dashsize ) {
+ sprintf(outputbuffer," [%12.3f] %12.3f d",dashsize,phase);
+ sendClean(outputbuffer);
+ }
+ else send(" [] 0 d");
}
void SetTransferMatrix(double x11,double x12,double x21,double x22,double x,double y)
@@ -370,8 +382,8 @@ void SetTransferMatrix(double x11,double x12,double x21,double x22,double x,doub
if ( ( fabs(x11-1.) > 0.001 ) || ( fabs(x22-1.) > 0.001 )
|| ( fabs(x12) > 0.001 ) || ( fabs(x21) > 0.001 )
|| ( fabs(x) > 0.001 ) || ( fabs(y) > 0.001 ) ) {
- outpos +=
- sprintf(outpos,"%12.3f %12.3f %12.3f %12.3f %12.3f %12.3f cm\n",x11,x12,x21,x22,x,y);
+ sprintf(outputbuffer,"%12.3f %12.3f %12.3f %12.3f %12.3f %12.3f cm\n",x11,x12,x21,x22,x,y);
+ sendClean(outputbuffer);
}
}
@@ -379,6 +391,7 @@ static double BzK;
void BezierCircle(double r,char *action)
{
+ char *outpos = outputbuffer;
outpos +=
sprintf(outpos," %12.3f 0 m %12.3f %12.3f %12.3f %12.3f 0 %12.3f c\n",-r,-r,r*BzK,-r*BzK,r,r);
outpos +=
@@ -387,10 +400,12 @@ void BezierCircle(double r,char *action)
sprintf(outpos," %12.3f %12.3f %12.3f %12.3f 0 %12.3f c\n",r,-r*BzK,r*BzK,-r,-r);
outpos +=
sprintf(outpos," %12.3f %12.3f %12.3f %12.3f %12.3f 0 c %s\n",-r*BzK,-r,-r,-r*BzK,-r,action);
+ sendClean(outputbuffer);
}
void BezierOval(double w, double h, char *action)
{
+ char *outpos = outputbuffer;
outpos +=
sprintf(outpos," %12.3f 0 m %12.3f %12.3f %12.3f %12.3f 0 %12.3f c\n",-w,-w,h*BzK,-w*BzK,h,h);
outpos +=
@@ -399,41 +414,45 @@ void BezierOval(double w, double h, char *action)
sprintf(outpos," %12.3f %12.3f %12.3f %12.3f 0 %12.3f c\n",w,-h*BzK,w*BzK,-h,-h);
outpos +=
sprintf(outpos," %12.3f %12.3f %12.3f %12.3f %12.3f 0 c %s\n",-w*BzK,-h,-w,-h*BzK,-w,action);
+ sendClean(outputbuffer);
}
void SetGray(double grayscale,int par)
{
if ( par == STROKING ) {
- outpos += sprintf(outpos," %12.3f G",grayscale);
+ sprintf(outputbuffer," %12.3f G",grayscale);
}
else {
- outpos += sprintf(outpos," %12.3f g",grayscale);
+ sprintf(outputbuffer," %12.3f g",grayscale);
}
+ sendClean(outputbuffer);
}
void SetColor(double c, double m, double y, double k,int par)
{
if ( par == STROKING ) {
- outpos += sprintf(outpos," %12.3f %12.3f %12.3f %12.3f K",c,m,y,k);
+ sprintf(outputbuffer," %12.3f %12.3f %12.3f %12.3f K",c,m,y,k);
}
else {
- outpos += sprintf(outpos," %12.3f %12.3f %12.3f %12.3f k",c,m,y,k);
+ sprintf(outputbuffer," %12.3f %12.3f %12.3f %12.3f k",c,m,y,k);
}
+ sendClean(outputbuffer);
}
void SetBackgroundColor(int par)
{
- if ( par == STROKING ) { outpos += sprintf(outpos," 0 0 0 0 K"); }
- else { outpos += sprintf(outpos," 0 0 0 0 k"); }
+ if ( par == STROKING ) { send(" 0 0 0 0 K"); }
+ else { send(" 0 0 0 0 k"); }
}
void Rectangle(double x,double y,double w,double h) {
- outpos += sprintf(outpos,"\n %12.3f %12.3f %12.3f %12.3f re",x,y,w,h);
+ sprintf(outputbuffer,"\n %12.3f %12.3f %12.3f %12.3f re",x,y,w,h);
+ sendClean(outputbuffer);
}
void Triangle(double x1,double y1,double x2,double y2,double x3,double y3) {
- outpos +=
- sprintf(outpos,"\n %12.3f %12.3f m %12.3f %12.3f l %12.3f %12.3f l h",x1,y1,x2,y2,x3,y3);
+ sprintf(outputbuffer,"\n %12.3f %12.3f m %12.3f %12.3f l %12.3f %12.3f l h",x1,y1,x2,y2,x3,y3);
+ sendClean(outputbuffer);
}
/*
@@ -503,10 +522,10 @@ void ArrowHead()
LineTo(-length*0.5,-arrow.width);
if (k == 1) {
SetBackgroundColor(NONSTROKING);
- outpos += sprintf(outpos," h f");
+ send(" h f");
}
else {
- outpos += sprintf(outpos," s");
+ send(" s");
}
RestoreGraphicsState;
}
@@ -516,7 +535,7 @@ void ArrowHead()
LineTo(-length*0.5,arrow.width);
LineTo(-length*0.5+length*arrow.inset,0);
LineTo(-length*0.5,-arrow.width);
- outpos += sprintf(outpos," h f");
+ send(" h f");
}
RestoreGraphicsState;
}
@@ -928,17 +947,17 @@ char *ReadInput(char *filename)
char *buffer;
if ( ( finput = fopen(filename,"r") ) == 0 ) {
fprintf(stderr,"%s: Cannot open file %s\n",axohelp,filename);
- exit(-1);
+ exit(1);
}
if ( ( fseek(finput,0,SEEK_END) != 0 )
|| ( ( filesize = ftell(finput) ) < 0 )
|| ( fseek(finput,0,SEEK_SET) != 0 ) ) {
fprintf(stderr,"%s: File error in file %s\n",axohelp,filename);
- exit(-1);
+ exit(1);
}
if ( ( buffer = malloc((filesize+1)*sizeof(char)) ) == 0 ) {
fprintf(stderr,"%s: Error allocating %ld bytes of memory",axohelp,filesize+1);
- exit(-1);
+ exit(1);
}
/*
Assume character in file is 1 byte, which is true for all cases
@@ -947,7 +966,7 @@ char *ReadInput(char *filename)
num = fread( buffer, 1, filesize, finput );
if ( ferror(finput) ) {
fprintf(stderr,"%s: Error reading file %s\n",axohelp,filename);
- exit(-1);
+ exit(1);
}
/*
By definition, fread reads ALL the items specified, or it gets to
@@ -974,31 +993,37 @@ void CleanupOutput(char *str)
char *s, *t;
int period = 0;
s = t = str;
- while ( *s && *s != '}' ) {
- if ( *s == '\n' ) *s = ' ';
- if ( ( *s == ' ' || *s == '\n' ) && ( s[1] == ' ' || s[1] == '\n' ) ) s++;
- else *t++ = *s++;
+ // Collapse multiple white space (' ' and '\n') to one. Remove trailing space.
+ while ( *s ) {
+ if ( *s == '\n' ) {*s = ' '; }
+ if ( (*s == ' ') && ( s[1] == ' ' || s[1] == '\n' || s[1] == 0 ) ) { s++;}
+ else { *t++ = *s++; }
}
- while ( *s ) *t++ = *s++;
*t = 0;
+
+ // Optimize format of numbers:
s = t = str;
while ( *s ) {
if ( *s == '.' ) { period = 1; *t++ = *s++; }
- else if ( *s == '-' && s[1] == '0' && s[2] == ' ' ) { s++; }
- else if ( *s <= '9' && *s >= '0' ) { *t++ = *s++; }
- else if ( *s == '\n' && ( t > str && t[-1] == '\n' ) ) { s++; }
+ else if ( isdigit(*s) ) { *t++ = *s++; }
else if ( period ) {
- while ( t > str && t[-1] == '0' ) t--;
- if ( t > str && t[-1] == '.' ) t--;
- while ( *s == ' ' && s[1] == ' ' ) s++;
+ while ( t > str && t[-1] == '0' ) { t--; }
+ if ( t > str && t[-1] == '.' ) {
+ t--;
+ // Handle case that number is .000, not e.g. 9.000
+ if (t > str && ! isdigit(t[-1]) ) {
+ *t++ = '0';
+ }
+ }
period = 0; *t++ = *s++;
}
- else if ( *s == ' ' && s[1] == ' ' ) s++;
else {
period = 0; *t++ = *s++;
}
}
*t = 0;
+
+ // Collapse '-0' to '0'
s = t = str;
while ( *s ) {
if ( *s == '-' && s[1] == '0' && s[2] == ' ' ) { s++; }
@@ -1008,65 +1033,87 @@ void CleanupOutput(char *str)
}
/*
- #] CleanupOutput :
+ #] CleanupOutput :
+ #[ send :
+*/
+
+void send( char* str ) {
+ fprintf(outfile, "%s",str);
+}
+
+/*
+ #] CleanupOutput :
+ #[ sendClean :
+*/
+
+void sendClean( char* str ) {
+ CleanupOutput(str);
+ send(str);
+}
+
+/*
+ #] sendClean :
#[ DoOneObject :
*/
int DoOneObject(char *cinput)
{
- int num, i, num1, num2;
- char *s, *t, *StartClean;
+ // Single point for exit, to ensure proper clean up.
+ int num, i, num1, num2, retcode;
+ char *s, *t;
double *argbuf = 0;
+ retcode = -1;
SetDefaults();
+
+ // Locate number of object:
s = cinput; while ( *s != '[' ) s++;
s++; t = s; while ( *t != ']' ) t++;
*t++ = 0; while ( *t == ' ' || *t == '\t' || *t == '\n' ) t++;
+
+ fprintf(outfile,"\\axo@setObject{%s}%%\n{%s%c}%%\n{",s,t,TERMCHAR);
outpos = outputbuffer;
- outpos += sprintf(outpos,"\\axo@setObject{%s}%%\n{%s%c}%%\n{",s,t,TERMCHAR);
- if ( *s == '0' && s[1] == ']' ) {
+
+ nameobject = t; while ( *t != ' ' && *t != '\t' && *t != '\n' && *t ) t++;
+ *t++ = 0; while ( *t == ' ' || *t == '\t' || *t == '\n' ) t++;
+/*
+ Now nameobject is the name of the command and t points at the first parameter.
+*/
+
+ if ( *s == '0' && s[1] == 0 ) {
/*
The identification line.
In due time we might add more options here.
*/
if ( strcmp(nameobject,"AxodrawWantsPDF") == 0 ) {
identification = 1;
- outpos += sprintf(outpos,"Axohelp version %d.%d. PDF output.}",VERSION,SUBVERSION);
- fprintf(outfile,"%s",outputbuffer);
- return(0);
+ fprintf(outfile,"Axohelp version %d.%d. PDF output.",VERSION,SUBVERSION);
+ goto SUCCESS;
}
else {
fprintf(stderr,"%s: Illegal request in identification string [0]: %s\n"
,axohelp,nameobject);
- if ( argbuf ) free(argbuf);
- return(-1);
+ goto EXIT;
}
}
/*
if ( identification == 0 ) {
fprintf(stderr,"%s: No identification string. Check versions.\n",axohelp);
- if ( argbuf ) free(argbuf);
- return(-1);
+ goto EXIT;
}
*/
- StartClean = outpos;
- nameobject = t; while ( *t != ' ' && *t != '\t' && *t != '\n' && *t ) t++;
- *t++ = 0; while ( *t == ' ' || *t == '\t' || *t == '\n' ) t++;
-/*
- Now nameobject is the name of the command and t points at the first parameter.
-*/
if ( ( strcmp(nameobject,"Curve") == 0 )
|| ( strcmp(nameobject,"Polygon") == 0 )
|| ( strcmp(nameobject,"FilledPolygon") == 0 ) ) {
/*
#[ Curve,Polygons :
*/
- if ( ( argbuf = ReadArray(t,&num1,&num2) ) == 0 ) return(-1);
+ if ( ( argbuf = ReadArray(t,&num1,&num2) ) == 0 )
+ goto EXIT;
if ( num2-1 != 0 ) {
fprintf(stderr,"%s: Command %s should have no extra numbers in %s.\n",
axohelp,nameobject,inname);
- free(argbuf);
- return(-1);
+ goto EXIT;
}
else {
/*
@@ -1087,6 +1134,7 @@ int DoOneObject(char *cinput)
Polygon(argbuf,num1,1);
}
free(argbuf);
+ argbuf = 0;
}
/*
#] Curve,Polygons :
@@ -1096,12 +1144,12 @@ int DoOneObject(char *cinput)
/*
#[ DashCurve :
*/
- if ( ( argbuf = ReadArray(t,&num1,&num2) ) == 0 ) return(-1);
+ if ( ( argbuf = ReadArray(t,&num1,&num2) ) == 0 )
+ goto EXIT;
if ( num2 != 2 ) {
fprintf(stderr,"%s: Command %s does not have two numbers after the coordinates\n in file %s.\n",
axohelp,nameobject,inname);
- free(argbuf);
- return(-1);
+ goto EXIT;
}
else {
/*
@@ -1114,6 +1162,7 @@ int DoOneObject(char *cinput)
SetLineWidth(axolinewidth);
DashCurve(argbuf,num1);
free(argbuf);
+ argbuf = 0;
}
/*
#] DashCurve :
@@ -1123,7 +1172,8 @@ int DoOneObject(char *cinput)
/*
#[ Regular command :
*/
- if ( ( argbuf = ReadTail(t,&num) ) == 0 ) return(-1);
+ if ( ( argbuf = ReadTail(t,&num) ) == 0 )
+ goto EXIT;
for ( i = 0; i < sizeof(commands)/sizeof(KEYWORD); i++ ) {
if ( strcmp(nameobject,commands[i].name) == 0 ) {
if ( num == commands[i].numargs+1 ) {
@@ -1137,13 +1187,13 @@ int DoOneObject(char *cinput)
SetLineWidth(axolinewidth);
(*(commands[i].func))(argbuf);
free(argbuf);
+ argbuf = 0;
break;
}
else {
fprintf(stderr,"%s: Command %s should have %d(+1) arguments in %s.\n"
,axohelp,nameobject,commands[i].numargs,inname);
- free(argbuf);
- return(-1);
+ goto EXIT;
}
}
}
@@ -1153,14 +1203,15 @@ int DoOneObject(char *cinput)
if ( i >= sizeof(commands)/sizeof(KEYWORD) ) {
fprintf(stderr,"%s: Command %s not recognized in file %s.\n",
axohelp,nameobject,inname);
- free(argbuf);
- return(-1);
+ goto EXIT;
}
}
- outpos += sprintf(outpos,"}\n");
- CleanupOutput(StartClean);
- fprintf(outfile,"%s",outputbuffer);
- return(0);
+ SUCCESS:
+ retcode = 0;
+ EXIT:
+ if (argbuf) { free(argbuf); }
+ fprintf(outfile,"}\n");
+ return(retcode);
}
/*
@@ -1219,7 +1270,7 @@ int main(int argc,char **argv)
axohelp = *argv++;
if ( argc <= 0 ) {
PrintHelp(axohelp);
- return -1;
+ return 1;
}
while ( (*argv)[0] == '-' ) { /* we have options */
s = *argv;
@@ -1246,19 +1297,19 @@ int main(int argc,char **argv)
else {
fprintf(stderr,"%s: Illegal option %s\n", axohelp, *argv);
PrintHelpPrompt(axohelp);
- return -1;
+ return 1;
}
argc--; argv++;
if ( argc <= 0 ) {
fprintf(stderr,"%s: Not enough arguments\n",axohelp);
PrintHelpPrompt(axohelp);
- return -1;
+ return 1;
}
}
if ( argc != 1 ) {
fprintf(stderr,"%s: Too many arguments\n",axohelp);
PrintHelpPrompt(axohelp);
- return -1;
+ return 1;
}
/*
The filename is now in s. We copy it to a separate string and
@@ -1276,10 +1327,10 @@ int main(int argc,char **argv)
strcpy( inname+length, ".ax1" );
strcpy( outname+length, ".ax2" );
}
- if ( ( inbuffer = ReadInput(inname) ) == 0 ) return(-1);
+ if ( ( inbuffer = ReadInput(inname) ) == 0 ) return(1);
if ( ( outfile = fopen(outname,"w") ) == 0 ) {
fprintf(stderr,"%s: Cannot create file %s\n",axohelp,outname);
- exit(-1);
+ exit(1);
}
num = ScanForObjects(inbuffer);
for ( i = 0; i < num; i++ ) {
@@ -1290,7 +1341,7 @@ int main(int argc,char **argv)
if ( error > 0 ) {
fprintf(stderr,"%s: %d objects in %s were not translated correctly.\n",
axohelp,error,inname);
- return(-1);
+ return(1);
}
return(0);
}
diff --git a/graphics/axodraw2/test-big.ax2-std b/graphics/axodraw2/test-big.ax2-std
index 178802a3c0..ccc1a1331c 100644
--- a/graphics/axodraw2/test-big.ax2-std
+++ b/graphics/axodraw2/test-big.ax2-std
@@ -15,13 +15,13 @@
{ 0.5 w 0.5 w 1 0 0 1 0 50 cm 12 -5 m 16.5 -5 16.5 5 8.4 5 c 3 5 0.6 2.5 0 0 c S 12 -5 m 7.5 -5 7.5 5 18 5 c 28.5 5 28.5 -5 24 -5 c 19.5 -5 19.5 5 30 5 c 40.5 5 40.5 -5 36 -5 c 31.5 -5 31.5 5 42 5 c 52.5 5 52.5 -5 48 -5 c 43.5 -5 43.5 5 51.6 5 c 57 5 59.4 2.5 60 0 c S}
\axo@setObject{6}%
{Vertex 60 50 2 0.5;}%
-{ 0.5 w 1 0 0 1 60 50 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f }
+{ 0.5 w 1 0 0 1 60 50 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f}
\axo@setObject{7}%
{AxoGluon 140 50 200 50 5 4 0 0 0.5;}%
{ 0.5 w 0.5 w 1 0 0 1 140 50 cm 12 -5 m 16.5 -5 16.5 5 8.4 5 c 3 5 0.6 2.5 0 0 c S 12 -5 m 7.5 -5 7.5 5 18 5 c 28.5 5 28.5 -5 24 -5 c 19.5 -5 19.5 5 30 5 c 40.5 5 40.5 -5 36 -5 c 31.5 -5 31.5 5 42 5 c 52.5 5 52.5 -5 48 -5 c 43.5 -5 43.5 5 51.6 5 c 57 5 59.4 2.5 60 0 c S}
\axo@setObject{8}%
{Vertex 140 50 2 0.5;}%
-{ 0.5 w 1 0 0 1 140 50 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f }
+{ 0.5 w 1 0 0 1 140 50 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f}
\axo@setObject{9}%
{Grid 0 0 10 10 9 14 0.5;}%
{ 0.5 w 0 0 m 0 140 l S 10 0 m 10 140 l S 20 0 m 20 140 l S 30 0 m 30 140 l S 40 0 m 40 140 l S 50 0 m 50 140 l S 60 0 m 60 140 l S 70 0 m 70 140 l S 80 0 m 80 140 l S 90 0 m 90 140 l S 0 0 m 90 0 l S 0 10 m 90 10 l S 0 20 m 90 20 l S 0 30 m 90 30 l S 0 40 m 90 40 l S 0 50 m 90 50 l S 0 60 m 90 60 l S 0 70 m 90 70 l S 0 80 m 90 80 l S 0 90 m 90 90 l S 0 100 m 90 100 l S 0 110 m 90 110 l S 0 120 m 90 120 l S 0 130 m 90 130 l S 0 140 m 90 140 l S}
@@ -357,7 +357,7 @@
{ 0.5 w 1 0 0 1 40 10 cm 0 1 -1 0 0 0 cm 0 0 m 2.122 5.333 2.878 5.333 5 0 c 7.122 -5.333 7.878 -5.333 10 0 c 12.122 5.333 12.878 5.333 15 0 c 17.122 -5.333 17.878 -5.333 20 0 c 22.122 5.333 22.878 5.333 25 0 c 27.122 -5.333 27.878 -5.333 30 0 c S}
\axo@setObject{120}%
{Vertex 40 10 1.5 0.5;}%
-{ 0.5 w 1 0 0 1 40 10 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f }
+{ 0.5 w 1 0 0 1 40 10 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f}
\axo@setObject{121}%
{Grid 0 0 10 10 6 6 0.5;}%
{ 0.5 w 0 0 m 0 60 l S 10 0 m 10 60 l S 20 0 m 20 60 l S 30 0 m 30 60 l S 40 0 m 40 60 l S 50 0 m 50 60 l S 60 0 m 60 60 l S 0 0 m 60 0 l S 0 10 m 60 10 l S 0 20 m 60 20 l S 0 30 m 60 30 l S 0 40 m 60 40 l S 0 50 m 60 50 l S 0 60 m 60 60 l S}
@@ -366,7 +366,7 @@
{ 0.5 w 0 0 m 60 60 l S}
\axo@setObject{123}%
{ECirc 30 30 20 0.5;}%
-{ 0.5 w 1 0 0 1 30 30 cm -20 0 m -20 11.046 -11.046 20 0 20 c 11.046 20 20 11.046 20 0 c 20 -11.046 11.046 -20 0 -20 c -11.046 -20 -20 -11.046 -20 0 c S }
+{ 0.5 w 1 0 0 1 30 30 cm -20 0 m -20 11.046 -11.046 20 0 20 c 11.046 20 20 11.046 20 0 c 20 -11.046 11.046 -20 0 -20 c -11.046 -20 -20 -11.046 -20 0 c S}
\axo@setObject{124}%
{Grid 0 0 10 10 6 6 0.5;}%
{ 0.5 w 0 0 m 0 60 l S 10 0 m 10 60 l S 20 0 m 20 60 l S 30 0 m 30 60 l S 40 0 m 40 60 l S 50 0 m 50 60 l S 60 0 m 60 60 l S 0 0 m 60 0 l S 0 10 m 60 10 l S 0 20 m 60 20 l S 0 30 m 60 30 l S 0 40 m 60 40 l S 0 50 m 60 50 l S 0 60 m 60 60 l S}
@@ -375,10 +375,10 @@
{ 0.5 w 0 0 m 60 60 l S}
\axo@setObject{126}%
{Vertex 30 30 20 0.5;}%
-{ 0.5 w 1 0 0 1 30 30 cm -20 0 m -20 11.046 -11.046 20 0 20 c 11.046 20 20 11.046 20 0 c 20 -11.046 11.046 -20 0 -20 c -11.046 -20 -20 -11.046 -20 0 c f }
+{ 0.5 w 1 0 0 1 30 30 cm -20 0 m -20 11.046 -11.046 20 0 20 c 11.046 20 20 11.046 20 0 c 20 -11.046 11.046 -20 0 -20 c -11.046 -20 -20 -11.046 -20 0 c f}
\axo@setObject{127}%
{ECirc 30 30 20 0.5;}%
-{ 0.5 w 1 0 0 1 30 30 cm -20 0 m -20 11.046 -11.046 20 0 20 c 11.046 20 20 11.046 20 0 c 20 -11.046 11.046 -20 0 -20 c -11.046 -20 -20 -11.046 -20 0 c S }
+{ 0.5 w 1 0 0 1 30 30 cm -20 0 m -20 11.046 -11.046 20 0 20 c 11.046 20 20 11.046 20 0 c 20 -11.046 11.046 -20 0 -20 c -11.046 -20 -20 -11.046 -20 0 c S}
\axo@setObject{128}%
{AxoLine 60 0 0 60 0 0 0 0 0 0 0 0 0 0 0 0.5;}%
{ 0.5 w 60 0 m 0 60 l S}
@@ -390,10 +390,10 @@
{ 0.5 w 0 0 m 60 60 l S}
\axo@setObject{131}%
{Vertex 30 30 20 0.5;}%
-{ 0.5 w 1 0 0 1 30 30 cm -20 0 m -20 11.046 -11.046 20 0 20 c 11.046 20 20 11.046 20 0 c 20 -11.046 11.046 -20 0 -20 c -11.046 -20 -20 -11.046 -20 0 c f }
+{ 0.5 w 1 0 0 1 30 30 cm -20 0 m -20 11.046 -11.046 20 0 20 c 11.046 20 20 11.046 20 0 c 20 -11.046 11.046 -20 0 -20 c -11.046 -20 -20 -11.046 -20 0 c f}
\axo@setObject{132}%
{ECirc 30 30 20 0.5;}%
-{ 0.5 w 1 0 0 1 30 30 cm -20 0 m -20 11.046 -11.046 20 0 20 c 11.046 20 20 11.046 20 0 c 20 -11.046 11.046 -20 0 -20 c -11.046 -20 -20 -11.046 -20 0 c S }
+{ 0.5 w 1 0 0 1 30 30 cm -20 0 m -20 11.046 -11.046 20 0 20 c 11.046 20 20 11.046 20 0 c 20 -11.046 11.046 -20 0 -20 c -11.046 -20 -20 -11.046 -20 0 c S}
\axo@setObject{133}%
{AxoLine 60 0 0 60 0 0 0 0 0 0 0 0 0 0 0 0.5;}%
{ 0.5 w 60 0 m 0 60 l S}
@@ -405,10 +405,10 @@
{ 0.5 w 0 0 m 60 60 l S}
\axo@setObject{136}%
{Vertex 30 30 20 0.5;}%
-{ 0.5 w 1 0 0 1 30 30 cm -20 0 m -20 11.046 -11.046 20 0 20 c 11.046 20 20 11.046 20 0 c 20 -11.046 11.046 -20 0 -20 c -11.046 -20 -20 -11.046 -20 0 c f }
+{ 0.5 w 1 0 0 1 30 30 cm -20 0 m -20 11.046 -11.046 20 0 20 c 11.046 20 20 11.046 20 0 c 20 -11.046 11.046 -20 0 -20 c -11.046 -20 -20 -11.046 -20 0 c f}
\axo@setObject{137}%
{ECirc 30 30 20 0.5;}%
-{ 0.5 w 1 0 0 1 30 30 cm -20 0 m -20 11.046 -11.046 20 0 20 c 11.046 20 20 11.046 20 0 c 20 -11.046 11.046 -20 0 -20 c -11.046 -20 -20 -11.046 -20 0 c S }
+{ 0.5 w 1 0 0 1 30 30 cm -20 0 m -20 11.046 -11.046 20 0 20 c 11.046 20 20 11.046 20 0 c 20 -11.046 11.046 -20 0 -20 c -11.046 -20 -20 -11.046 -20 0 c S}
\axo@setObject{138}%
{AxoLine 60 0 0 60 0 0 0 0 0 0 0 0 0 0 0 0.5;}%
{ 0.5 w 60 0 m 0 60 l S}
@@ -417,16 +417,16 @@
{ 0.5 w 0 0 m 0 110 l S 10 0 m 10 110 l S 20 0 m 20 110 l S 30 0 m 30 110 l S 40 0 m 40 110 l S 50 0 m 50 110 l S 60 0 m 60 110 l S 70 0 m 70 110 l S 80 0 m 80 110 l S 0 0 m 80 0 l S 0 10 m 80 10 l S 0 20 m 80 20 l S 0 30 m 80 30 l S 0 40 m 80 40 l S 0 50 m 80 50 l S 0 60 m 80 60 l S 0 70 m 80 70 l S 0 80 m 80 80 l S 0 90 m 80 90 l S 0 100 m 80 100 l S 0 110 m 80 110 l S}
\axo@setObject{140}%
{Oval 40 80 20 30 0 0.5;}%
-{ 0.5 w 1 0 0 1 40 80 cm -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c S }
+{ 0.5 w 1 0 0 1 40 80 cm -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c S}
\axo@setObject{141}%
{Oval 40 30 20 30 30 0.5;}%
-{ 0.5 w 1 0 0 1 40 30 cm 0.866 0.5 -0.5 0.866 0 0 cm -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c S }
+{ 0.5 w 1 0 0 1 40 30 cm 0.866 0.5 -0.5 0.866 0 0 cm -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c S}
\axo@setObject{142}%
{Grid 0 0 10 10 8 6 0.5;}%
{ 0.5 w 0 0 m 0 60 l S 10 0 m 10 60 l S 20 0 m 20 60 l S 30 0 m 30 60 l S 40 0 m 40 60 l S 50 0 m 50 60 l S 60 0 m 60 60 l S 70 0 m 70 60 l S 80 0 m 80 60 l S 0 0 m 80 0 l S 0 10 m 80 10 l S 0 20 m 80 20 l S 0 30 m 80 30 l S 0 40 m 80 40 l S 0 50 m 80 50 l S 0 60 m 80 60 l S}
\axo@setObject{143}%
{FOval 40 30 20 30 30 0.5;}%
-{ 0.5 w 1 0 0 1 40 30 cm 0.866 0.5 -0.5 0.866 0 0 cm -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c f -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c S }
+{ 0.5 w 1 0 0 1 40 30 cm 0.866 0.5 -0.5 0.866 0 0 cm -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c f -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c S}
\axo@setObject{144}%
{Grid 0 0 10 10 8 6 0.5;}%
{ 0.5 w 0 0 m 0 60 l S 10 0 m 10 60 l S 20 0 m 20 60 l S 30 0 m 30 60 l S 40 0 m 40 60 l S 50 0 m 50 60 l S 60 0 m 60 60 l S 70 0 m 70 60 l S 80 0 m 80 60 l S 0 0 m 80 0 l S 0 10 m 80 10 l S 0 20 m 80 20 l S 0 30 m 80 30 l S 0 40 m 80 40 l S 0 50 m 80 50 l S 0 60 m 80 60 l S}
@@ -435,10 +435,10 @@
{ 0.5 w 0 0 m 80 60 l S}
\axo@setObject{146}%
{FOval 40 30 20 30 0 0.5;}%
-{ 0.5 w 1 0 0 1 40 30 cm -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c f -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c S }
+{ 0.5 w 1 0 0 1 40 30 cm -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c f -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c S}
\axo@setObject{147}%
{Oval 40 30 20 30 0 0.5;}%
-{ 0.5 w 1 0 0 1 40 30 cm -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c S }
+{ 0.5 w 1 0 0 1 40 30 cm -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c S}
\axo@setObject{148}%
{AxoLine 80 0 0 60 0 0 0 0 0 0 0 0 0 0 0 0.5;}%
{ 0.5 w 80 0 m 0 60 l S}
@@ -450,10 +450,10 @@
{ 1 w 0 0 m 80 60 l S}
\axo@setObject{151}%
{FOval 40 30 20 30 20 1;}%
-{ 1 w 1 0 0 1 40 30 cm 0.94 0.342 -0.342 0.94 0 0 cm -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c f -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c S }
+{ 1 w 1 0 0 1 40 30 cm 0.94 0.342 -0.342 0.94 0 0 cm -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c f -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c S}
\axo@setObject{152}%
{Oval 40 30 20 30 20 1;}%
-{ 1 w 1 0 0 1 40 30 cm 0.94 0.342 -0.342 0.94 0 0 cm -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c S }
+{ 1 w 1 0 0 1 40 30 cm 0.94 0.342 -0.342 0.94 0 0 cm -30 0 m -30 11.046 -16.569 20 0 20 c 16.569 20 30 11.046 30 0 c 30 -11.046 16.569 -20 0 -20 c -16.569 -20 -30 -11.046 -30 0 c S}
\axo@setObject{153}%
{AxoLine 80 0 0 60 0 0 0 0 0 0 0 0 0 0 0 1;}%
{ 1 w 80 0 m 0 60 l S}
@@ -609,37 +609,37 @@
{ 0.5 w 0 0 m 0 90 l S 10 0 m 10 90 l S 20 0 m 20 90 l S 30 0 m 30 90 l S 40 0 m 40 90 l S 50 0 m 50 90 l S 60 0 m 60 90 l S 70 0 m 70 90 l S 80 0 m 80 90 l S 90 0 m 90 90 l S 0 0 m 90 0 l S 0 10 m 90 10 l S 0 20 m 90 20 l S 0 30 m 90 30 l S 0 40 m 90 40 l S 0 50 m 90 50 l S 0 60 m 90 60 l S 0 70 m 90 70 l S 0 80 m 90 80 l S 0 90 m 90 90 l S}
\axo@setObject{204}%
{Vertex 10 10 1.5 0.5;}%
-{ 0.5 w 1 0 0 1 10 10 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f }
+{ 0.5 w 1 0 0 1 10 10 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f}
\axo@setObject{205}%
{Vertex 45 45 1.5 0.5;}%
-{ 0.5 w 1 0 0 1 45 45 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f }
+{ 0.5 w 1 0 0 1 45 45 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f}
\axo@setObject{206}%
{Vertex 80 80 1.5 0.5;}%
-{ 0.5 w 1 0 0 1 80 80 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f }
+{ 0.5 w 1 0 0 1 80 80 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f}
\axo@setObject{207}%
{Grid 0 0 10 10 9 9 0.5;}%
{ 0.5 w 0 0 m 0 90 l S 10 0 m 10 90 l S 20 0 m 20 90 l S 30 0 m 30 90 l S 40 0 m 40 90 l S 50 0 m 50 90 l S 60 0 m 60 90 l S 70 0 m 70 90 l S 80 0 m 80 90 l S 90 0 m 90 90 l S 0 0 m 90 0 l S 0 10 m 90 10 l S 0 20 m 90 20 l S 0 30 m 90 30 l S 0 40 m 90 40 l S 0 50 m 90 50 l S 0 60 m 90 60 l S 0 70 m 90 70 l S 0 80 m 90 80 l S 0 90 m 90 90 l S}
\axo@setObject{208}%
{Vertex 10 10 1.5 0.5;}%
-{ 0.5 w 1 0 0 1 10 10 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f }
+{ 0.5 w 1 0 0 1 10 10 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f}
\axo@setObject{209}%
{Vertex 45 45 1.5 0.5;}%
-{ 0.5 w 1 0 0 1 45 45 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f }
+{ 0.5 w 1 0 0 1 45 45 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f}
\axo@setObject{210}%
{Vertex 80 10 1.5 0.5;}%
-{ 0.5 w 1 0 0 1 80 10 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f }
+{ 0.5 w 1 0 0 1 80 10 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f}
\axo@setObject{211}%
{Grid 0 0 10 10 9 9 0.5;}%
{ 0.5 w 0 0 m 0 90 l S 10 0 m 10 90 l S 20 0 m 20 90 l S 30 0 m 30 90 l S 40 0 m 40 90 l S 50 0 m 50 90 l S 60 0 m 60 90 l S 70 0 m 70 90 l S 80 0 m 80 90 l S 90 0 m 90 90 l S 0 0 m 90 0 l S 0 10 m 90 10 l S 0 20 m 90 20 l S 0 30 m 90 30 l S 0 40 m 90 40 l S 0 50 m 90 50 l S 0 60 m 90 60 l S 0 70 m 90 70 l S 0 80 m 90 80 l S 0 90 m 90 90 l S}
\axo@setObject{212}%
{Vertex 10 10 1.5 0.5;}%
-{ 0.5 w 1 0 0 1 10 10 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f }
+{ 0.5 w 1 0 0 1 10 10 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f}
\axo@setObject{213}%
{Vertex 45 45 1.5 0.5;}%
-{ 0.5 w 1 0 0 1 45 45 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f }
+{ 0.5 w 1 0 0 1 45 45 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f}
\axo@setObject{214}%
{Vertex 80 80 1.5 0.5;}%
-{ 0.5 w 1 0 0 1 80 80 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f }
+{ 0.5 w 1 0 0 1 80 80 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f}
\axo@setObject{215}%
{Grid 0 0 10 10 10 9 0.5;}%
{ 0.5 w 0 0 m 0 90 l S 10 0 m 10 90 l S 20 0 m 20 90 l S 30 0 m 30 90 l S 40 0 m 40 90 l S 50 0 m 50 90 l S 60 0 m 60 90 l S 70 0 m 70 90 l S 80 0 m 80 90 l S 90 0 m 90 90 l S 100 0 m 100 90 l S 0 0 m 100 0 l S 0 10 m 100 10 l S 0 20 m 100 20 l S 0 30 m 100 30 l S 0 40 m 100 40 l S 0 50 m 100 50 l S 0 60 m 100 60 l S 0 70 m 100 70 l S 0 80 m 100 80 l S 0 90 m 100 90 l S}
@@ -840,10 +840,10 @@
{ 0.5 w 0.5 w 1 0 0 1 73 30 cm 5 -3 m 7.7 -3 7.7 3 3.5 3 c 1.25 3 0.25 1.5 0 0 c S 5 -3 m 2.3 -3 2.3 3 7.5 3 c 12.7 3 12.7 -3 10 -3 c 7.3 -3 7.3 3 12.5 3 c 17.7 3 17.7 -3 15 -3 c 12.3 -3 12.3 3 16.5 3 c 18.75 3 19.75 1.5 20 0 c S}
\axo@setObject{281}%
{Vertex 27 30 1.5 0.5;}%
-{ 0.5 w 1 0 0 1 27 30 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f }
+{ 0.5 w 1 0 0 1 27 30 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f}
\axo@setObject{282}%
{Vertex 73 30 1.5 0.5;}%
-{ 0.5 w 1 0 0 1 73 30 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f }
+{ 0.5 w 1 0 0 1 73 30 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f}
\axo@setObject{283}%
{AxoGluon 110 30 130 30 3 3 0 0 0.5;}%
{ 0.5 w 0.5 w 1 0 0 1 110 30 cm 5 -3 m 7.7 -3 7.7 3 3.5 3 c 1.25 3 0.25 1.5 0 0 c S 5 -3 m 2.3 -3 2.3 3 7.5 3 c 12.7 3 12.7 -3 10 -3 c 7.3 -3 7.3 3 12.5 3 c 17.7 3 17.7 -3 15 -3 c 12.3 -3 12.3 3 16.5 3 c 18.75 3 19.75 1.5 20 0 c S}
@@ -858,10 +858,10 @@
{ 0.5 w 0.5 w 1 0 0 1 170 30 cm 5 -3 m 7.7 -3 7.7 3 3.5 3 c 1.25 3 0.25 1.5 0 0 c S 5 -3 m 2.3 -3 2.3 3 7.5 3 c 12.7 3 12.7 -3 10 -3 c 7.3 -3 7.3 3 12.5 3 c 17.7 3 17.7 -3 15 -3 c 12.3 -3 12.3 3 16.5 3 c 18.75 3 19.75 1.5 20 0 c S}
\axo@setObject{287}%
{Vertex 130 30 1.5 0.5;}%
-{ 0.5 w 1 0 0 1 130 30 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f }
+{ 0.5 w 1 0 0 1 130 30 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f}
\axo@setObject{288}%
{Vertex 170 30 1.5 0.5;}%
-{ 0.5 w 1 0 0 1 170 30 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f }
+{ 0.5 w 1 0 0 1 170 30 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f}
\axo@setObject{289}%
{AxoGluon 210 30 230 30 3 3 0 0 0.5;}%
{ 0.5 w 0.5 w 1 0 0 1 210 30 cm 5 -3 m 7.7 -3 7.7 3 3.5 3 c 1.25 3 0.25 1.5 0 0 c S 5 -3 m 2.3 -3 2.3 3 7.5 3 c 12.7 3 12.7 -3 10 -3 c 7.3 -3 7.3 3 12.5 3 c 17.7 3 17.7 -3 15 -3 c 12.3 -3 12.3 3 16.5 3 c 18.75 3 19.75 1.5 20 0 c S}
@@ -876,10 +876,10 @@
{ 0.5 w 0.5 w 1 0 0 1 270 30 cm 5 -3 m 7.7 -3 7.7 3 3.5 3 c 1.25 3 0.25 1.5 0 0 c S 5 -3 m 2.3 -3 2.3 3 7.5 3 c 12.7 3 12.7 -3 10 -3 c 7.3 -3 7.3 3 12.5 3 c 17.7 3 17.7 -3 15 -3 c 12.3 -3 12.3 3 16.5 3 c 18.75 3 19.75 1.5 20 0 c S}
\axo@setObject{293}%
{Vertex 230 30 1.5 0.5;}%
-{ 0.5 w 1 0 0 1 230 30 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f }
+{ 0.5 w 1 0 0 1 230 30 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f}
\axo@setObject{294}%
{Vertex 270 30 1.5 0.5;}%
-{ 0.5 w 1 0 0 1 270 30 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f }
+{ 0.5 w 1 0 0 1 270 30 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f}
\axo@setObject{295}%
{AxoLine 310 30 330 30 0 3 0 0 0 0 0 0 0 0 0 0.5;}%
{ 0.5 w [ 3.333] 1.667 d 310 30 m 330 30 l S}
@@ -888,7 +888,7 @@
{ 0.5 w 0.5 w 1 0 0 1 350 30 cm -1 0 0 -1 0 0 cm 15.852 6.141 m 15.018 8.294 20.758 11.464 22.235 5.884 c 23.222 2.152 21.496 0.397 20 0 c S 15.852 6.141 m 16.686 3.988 23.565 5.632 19.555 12.108 c 15.545 18.584 11.008 13.159 12.563 11.453 c 14.119 9.746 19.939 13.764 13.861 18.354 c 7.782 22.945 5.511 16.247 7.578 15.218 c 9.645 14.189 13.62 20.038 6.294 22.122 c -1.032 24.206 -0.731 17.141 1.569 16.927 c 3.868 16.714 5.462 23.605 -2.122 22.902 c -9.707 22.199 -6.873 15.719 -4.652 16.351 c -2.431 16.983 -3.434 23.984 -10.252 20.589 c -17.07 17.194 -12.087 12.175 -10.245 13.566 c -8.402 14.958 -11.866 21.124 -16.997 15.495 c -22.129 9.866 -15.669 6.986 -14.454 8.949 c -13.238 10.913 -18.695 15.411 -21.447 8.309 c -24.198 1.206 -17.135 0.854 -16.711 3.124 c -16.286 5.393 -23 7.617 -23 0 c -23 -7.617 -16.286 -5.393 -16.711 -3.124 c -17.135 -0.854 -24.198 -1.206 -21.447 -8.309 c -18.695 -15.411 -13.238 -10.913 -14.454 -8.949 c -15.669 -6.986 -22.129 -9.866 -16.997 -15.495 c -11.866 -21.124 -8.402 -14.958 -10.245 -13.566 c -12.087 -12.175 -17.07 -17.194 -10.252 -20.589 c -3.434 -23.984 -2.431 -16.983 -4.652 -16.351 c -6.873 -15.719 -9.707 -22.199 -2.122 -22.902 c 5.462 -23.605 3.868 -16.714 1.569 -16.927 c -0.731 -17.141 -1.032 -24.206 6.294 -22.122 c 13.62 -20.038 9.645 -14.189 7.578 -15.218 c 5.511 -16.247 7.782 -22.945 13.861 -18.354 c 19.939 -13.764 14.119 -9.746 12.563 -11.453 c 11.008 -13.159 15.545 -18.584 19.555 -12.108 c 23.565 -5.632 16.686 -3.988 15.852 -6.141 c 15.018 -8.294 20.758 -11.464 22.235 -5.884 c 23.222 -2.152 21.496 -0.397 20 0 c S}
\axo@setObject{297}%
{Vertex 330 30 1.5 0.5;}%
-{ 0.5 w 1 0 0 1 330 30 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f }
+{ 0.5 w 1 0 0 1 330 30 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f}
\axo@setObject{298}%
{AxoLine 387 30 407 30 0 3 0 0 0 0 0 0 0 0 0 0.5;}%
{ 0.5 w [ 3.333] 1.667 d 387 30 m 407 30 l S}
@@ -897,7 +897,7 @@
{ 0.5 w 0.5 w 1 0 0 1 430 30 cm 0.981 0.195 -0.195 0.981 0 0 cm 22.558 4.487 m 21.014 12.248 14.822 8.639 15.706 6.506 c 16.59 4.372 23.52 6.199 19.124 12.778 c 14.728 19.357 10.388 13.654 12.021 12.021 c 13.654 10.388 19.357 14.728 12.778 19.124 c 6.199 23.52 4.372 16.59 6.506 15.706 c 8.639 14.822 12.248 21.014 4.487 22.558 c -3.274 24.102 -2.309 17 0 17 c 2.309 17 3.274 24.102 -4.487 22.558 c -12.248 21.014 -8.639 14.822 -6.506 15.706 c -4.372 16.59 -6.199 23.52 -12.778 19.124 c -19.357 14.728 -13.654 10.388 -12.021 12.021 c -10.388 13.654 -14.728 19.357 -19.124 12.778 c -23.52 6.199 -16.59 4.372 -15.706 6.506 c -14.822 8.639 -21.014 12.248 -22.558 4.487 c -24.102 -3.274 -17 -2.309 -17 0 c -17 2.309 -24.102 3.274 -22.558 -4.487 c -21.014 -12.248 -14.822 -8.639 -15.706 -6.506 c -16.59 -4.372 -23.52 -6.199 -19.124 -12.778 c -14.728 -19.357 -10.388 -13.654 -12.021 -12.021 c -13.654 -10.388 -19.357 -14.728 -12.778 -19.124 c -6.199 -23.52 -4.372 -16.59 -6.506 -15.706 c -8.639 -14.822 -12.248 -21.014 -4.487 -22.558 c 3.274 -24.102 2.309 -17 0 -17 c -2.309 -17 -3.274 -24.102 4.487 -22.558 c 12.248 -21.014 8.639 -14.822 6.506 -15.706 c 4.372 -16.59 6.199 -23.52 12.778 -19.124 c 19.357 -14.728 13.654 -10.388 12.021 -12.021 c 10.388 -13.654 14.728 -19.357 19.124 -12.778 c 23.52 -6.199 16.59 -4.372 15.706 -6.506 c 14.822 -8.639 21.014 -12.248 22.558 -4.487 c 24.102 3.274 17 2.309 17 0 c 17 -2.309 24.102 -3.274 22.558 4.487 c S}
\axo@setObject{300}%
{Vertex 407 30 1.5 0.5;}%
-{ 0.5 w 1 0 0 1 407 30 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f }
+{ 0.5 w 1 0 0 1 407 30 cm -1.5 0 m -1.5 0.828 -0.828 1.5 0 1.5 c 0.828 1.5 1.5 0.828 1.5 0 c 1.5 -0.828 0.828 -1.5 0 -1.5 c -0.828 -1.5 -1.5 -0.828 -1.5 0 c f}
\axo@setObject{301}%
{Grid 0 0 10 10 15 10 0.5;}%
{ 0.5 w 0 0 m 0 100 l S 10 0 m 10 100 l S 20 0 m 20 100 l S 30 0 m 30 100 l S 40 0 m 40 100 l S 50 0 m 50 100 l S 60 0 m 60 100 l S 70 0 m 70 100 l S 80 0 m 80 100 l S 90 0 m 90 100 l S 100 0 m 100 100 l S 110 0 m 110 100 l S 120 0 m 120 100 l S 130 0 m 130 100 l S 140 0 m 140 100 l S 150 0 m 150 100 l S 0 0 m 150 0 l S 0 10 m 150 10 l S 0 20 m 150 20 l S 0 30 m 150 30 l S 0 40 m 150 40 l S 0 50 m 150 50 l S 0 60 m 150 60 l S 0 70 m 150 70 l S 0 80 m 150 80 l S 0 90 m 150 90 l S 0 100 m 150 100 l S}
@@ -1176,28 +1176,28 @@
{ 0.5 w 0.5 w 1 0 0 1 100 40 cm 0 -1 1 0 0 0 cm 6 -3 m 8.7 -3 8.7 3 4.2 3 c 1.5 3 0.3 1.5 0 0 c S 6 -3 m 3.3 -3 3.3 3 9 3 c 14.7 3 14.7 -3 12 -3 c 9.3 -3 9.3 3 15 3 c 20.7 3 20.7 -3 18 -3 c 15.3 -3 15.3 3 21 3 c 26.7 3 26.7 -3 24 -3 c 21.3 -3 21.3 3 25.8 3 c 28.5 3 29.7 1.5 30 0 c S}
\axo@setObject{393}%
{Vertex 37 70 2 0.5;}%
-{ 0.5 w 1 0 0 1 37 70 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f }
+{ 0.5 w 1 0 0 1 37 70 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f}
\axo@setObject{394}%
{Vertex 163 70 2 0.5;}%
-{ 0.5 w 1 0 0 1 163 70 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f }
+{ 0.5 w 1 0 0 1 163 70 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f}
\axo@setObject{395}%
{Vertex 70 100 2 0.5;}%
-{ 0.5 w 1 0 0 1 70 100 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f }
+{ 0.5 w 1 0 0 1 70 100 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f}
\axo@setObject{396}%
{Vertex 70 40 2 0.5;}%
-{ 0.5 w 1 0 0 1 70 40 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f }
+{ 0.5 w 1 0 0 1 70 40 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f}
\axo@setObject{397}%
{Vertex 130 100 2 0.5;}%
-{ 0.5 w 1 0 0 1 130 100 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f }
+{ 0.5 w 1 0 0 1 130 100 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f}
\axo@setObject{398}%
{Vertex 130 40 2 0.5;}%
-{ 0.5 w 1 0 0 1 130 40 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f }
+{ 0.5 w 1 0 0 1 130 40 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f}
\axo@setObject{399}%
{Vertex 100 100 2 0.5;}%
-{ 0.5 w 1 0 0 1 100 100 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f }
+{ 0.5 w 1 0 0 1 100 100 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f}
\axo@setObject{400}%
{Vertex 100 40 2 0.5;}%
-{ 0.5 w 1 0 0 1 100 40 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f }
+{ 0.5 w 1 0 0 1 100 40 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f}
\axo@setObject{401}%
{AxoPhoton 7 70 40 70 4 3 0 0 0.5;}%
{ 0.5 w 1 0 0 1 7 70 cm 0 0 m 2.334 5.333 3.166 5.333 5.5 0 c 7.834 -5.333 8.666 -5.333 11 0 c 13.334 5.333 14.166 5.333 16.5 0 c 18.834 -5.333 19.666 -5.333 22 0 c 24.334 5.333 25.166 5.333 27.5 0 c 29.834 -5.333 30.666 -5.333 33 0 c S}
@@ -1242,25 +1242,25 @@
{ 0.5 w 0.5 w 1 0 0 1 100 40 cm 0 -1 1 0 0 0 cm 6 -3 m 8.7 -3 8.7 3 4.2 3 c 1.5 3 0.3 1.5 0 0 c S 6 -3 m 3.3 -3 3.3 3 9 3 c 14.7 3 14.7 -3 12 -3 c 9.3 -3 9.3 3 15 3 c 20.7 3 20.7 -3 18 -3 c 15.3 -3 15.3 3 21 3 c 26.7 3 26.7 -3 24 -3 c 21.3 -3 21.3 3 25.8 3 c 28.5 3 29.7 1.5 30 0 c S}
\axo@setObject{415}%
{Vertex 40 70 2 0.5;}%
-{ 0.5 w 1 0 0 1 40 70 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f }
+{ 0.5 w 1 0 0 1 40 70 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f}
\axo@setObject{416}%
{Vertex 163 70 2 0.5;}%
-{ 0.5 w 1 0 0 1 163 70 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f }
+{ 0.5 w 1 0 0 1 163 70 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f}
\axo@setObject{417}%
{Vertex 70 40 2 0.5;}%
-{ 0.5 w 1 0 0 1 70 40 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f }
+{ 0.5 w 1 0 0 1 70 40 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f}
\axo@setObject{418}%
{Vertex 130 100 2 0.5;}%
-{ 0.5 w 1 0 0 1 130 100 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f }
+{ 0.5 w 1 0 0 1 130 100 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f}
\axo@setObject{419}%
{Vertex 130 40 2 0.5;}%
-{ 0.5 w 1 0 0 1 130 40 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f }
+{ 0.5 w 1 0 0 1 130 40 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f}
\axo@setObject{420}%
{Vertex 100 100 2 0.5;}%
-{ 0.5 w 1 0 0 1 100 100 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f }
+{ 0.5 w 1 0 0 1 100 100 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f}
\axo@setObject{421}%
{Vertex 100 40 2 0.5;}%
-{ 0.5 w 1 0 0 1 100 40 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f }
+{ 0.5 w 1 0 0 1 100 40 cm -2 0 m -2 1.105 -1.105 2 0 2 c 1.105 2 2 1.105 2 0 c 2 -1.105 1.105 -2 0 -2 c -1.105 -2 -2 -1.105 -2 0 c f}
\axo@setObject{422}%
{AxoArc 40 35 25 90 270 0 0 0 0 0 0 0 0 0 0 0 0 0.5;}%
{ 0.5 w 1 0 0 1 40 35 cm 0 25 m -13.807 25 -25 13.807 -25 0 c -25 -13.807 -13.807 -25 0 -25 c S}
@@ -1293,7 +1293,7 @@
{ 3 w 1 0 0 1 40 35 cm 0 25 m -13.807 25 -25 13.807 -25 0 c S}
\axo@setObject{432}%
{Vertex 50 60 1.3 3;}%
-{ 3 w 1 0 0 1 50 60 cm -1.3 0 m -1.3 0.718 -0.718 1.3 0 1.3 c 0.718 1.3 1.3 0.718 1.3 0 c 1.3 -0.718 0.718 -1.3 0 -1.3 c -0.718 -1.3 -1.3 -0.718 -1.3 0 c f }
+{ 3 w 1 0 0 1 50 60 cm -1.3 0 m -1.3 0.718 -0.718 1.3 0 1.3 c 0.718 1.3 1.3 0.718 1.3 0 c 1.3 -0.718 0.718 -1.3 0 -1.3 c -0.718 -1.3 -1.3 -0.718 -1.3 0 c f}
\axo@setObject{433}%
{AxoArc 40 35 25 90 270 0 0 0 0 0 0 0 0 0 0 0 0 0.5;}%
{ 0.5 w 1 0 0 1 40 35 cm 0 25 m -13.807 25 -25 13.807 -25 0 c -25 -13.807 -13.807 -25 0 -25 c S}
@@ -1326,7 +1326,7 @@
{ 3 w 1 0 0 1 40 35 cm 0 25 m -13.807 25 -25 13.807 -25 0 c S}
\axo@setObject{443}%
{Vertex 50 60 1.3 3;}%
-{ 3 w 1 0 0 1 50 60 cm -1.3 0 m -1.3 0.718 -0.718 1.3 0 1.3 c 0.718 1.3 1.3 0.718 1.3 0 c 1.3 -0.718 0.718 -1.3 0 -1.3 c -0.718 -1.3 -1.3 -0.718 -1.3 0 c f }
+{ 3 w 1 0 0 1 50 60 cm -1.3 0 m -1.3 0.718 -0.718 1.3 0 1.3 c 0.718 1.3 1.3 0.718 1.3 0 c 1.3 -0.718 0.718 -1.3 0 -1.3 c -0.718 -1.3 -1.3 -0.718 -1.3 0 c f}
\axo@setObject{444}%
{AxoArc 40 35 25 90 270 0 0 0 0 0 0 0 0 0 0 0 0 0.5;}%
{ 0.5 w 1 0 0 1 40 35 cm 0 25 m -13.807 25 -25 13.807 -25 0 c -25 -13.807 -13.807 -25 0 -25 c S}
@@ -1386,7 +1386,7 @@
{ 3 w 1 0 0 1 40 35 cm 0 25 m -13.807 25 -25 13.807 -25 0 c S}
\axo@setObject{463}%
{Vertex 50 60 1.3 3;}%
-{ 3 w 1 0 0 1 50 60 cm -1.3 0 m -1.3 0.718 -0.718 1.3 0 1.3 c 0.718 1.3 1.3 0.718 1.3 0 c 1.3 -0.718 0.718 -1.3 0 -1.3 c -0.718 -1.3 -1.3 -0.718 -1.3 0 c f }
+{ 3 w 1 0 0 1 50 60 cm -1.3 0 m -1.3 0.718 -0.718 1.3 0 1.3 c 0.718 1.3 1.3 0.718 1.3 0 c 1.3 -0.718 0.718 -1.3 0 -1.3 c -0.718 -1.3 -1.3 -0.718 -1.3 0 c f}
\axo@setObject{464}%
{AxoArc 40 35 25 90 270 0 0 0 0 0 0 0 0 0 0 0 0 0.5;}%
{ 0.5 w 1 0 0 1 40 35 cm 0 25 m -13.807 25 -25 13.807 -25 0 c -25 -13.807 -13.807 -25 0 -25 c S}
@@ -1413,7 +1413,7 @@
{ 3 w 50 10 m 50 60 l S}
\axo@setObject{472}%
{Vertex 50 60 1.3 3;}%
-{ 3 w 1 0 0 1 50 60 cm -1.3 0 m -1.3 0.718 -0.718 1.3 0 1.3 c 0.718 1.3 1.3 0.718 1.3 0 c 1.3 -0.718 0.718 -1.3 0 -1.3 c -0.718 -1.3 -1.3 -0.718 -1.3 0 c f }
+{ 3 w 1 0 0 1 50 60 cm -1.3 0 m -1.3 0.718 -0.718 1.3 0 1.3 c 0.718 1.3 1.3 0.718 1.3 0 c 1.3 -0.718 0.718 -1.3 0 -1.3 c -0.718 -1.3 -1.3 -0.718 -1.3 0 c f}
\axo@setObject{473}%
{AxoLine 40 60 50 60 0 0 0 0 0 0 0 0 0 0 0 3;}%
{ 3 w 40 60 m 50 60 l S}
@@ -1473,7 +1473,7 @@
{ 3 w 50 10 m 50 60 l S}
\axo@setObject{492}%
{Vertex 50 60 1.3 3;}%
-{ 3 w 1 0 0 1 50 60 cm -1.3 0 m -1.3 0.718 -0.718 1.3 0 1.3 c 0.718 1.3 1.3 0.718 1.3 0 c 1.3 -0.718 0.718 -1.3 0 -1.3 c -0.718 -1.3 -1.3 -0.718 -1.3 0 c f }
+{ 3 w 1 0 0 1 50 60 cm -1.3 0 m -1.3 0.718 -0.718 1.3 0 1.3 c 0.718 1.3 1.3 0.718 1.3 0 c 1.3 -0.718 0.718 -1.3 0 -1.3 c -0.718 -1.3 -1.3 -0.718 -1.3 0 c f}
\axo@setObject{493}%
{AxoLine 40 60 50 60 0 0 0 0 0 0 0 0 0 0 0 3;}%
{ 3 w 40 60 m 50 60 l S}
diff --git a/graphics/pgf/contrib/simpleoptics/README b/graphics/pgf/contrib/simpleoptics/README
new file mode 100644
index 0000000000..386a051b2c
--- /dev/null
+++ b/graphics/pgf/contrib/simpleoptics/README
@@ -0,0 +1,18 @@
+%% simpleoptics.zip
+%% Copyright 2019 J. Cawood
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is J. Cawood.
+%
+
+
+This package provides a handful of macros for drawing simple lenses and mirrors for use in optics diagrams. \ No newline at end of file
diff --git a/graphics/pgf/contrib/simpleoptics/simpleoptics.pdf b/graphics/pgf/contrib/simpleoptics/simpleoptics.pdf
new file mode 100644
index 0000000000..474564b3aa
--- /dev/null
+++ b/graphics/pgf/contrib/simpleoptics/simpleoptics.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/simpleoptics/simpleoptics.sty b/graphics/pgf/contrib/simpleoptics/simpleoptics.sty
new file mode 100644
index 0000000000..6d24a6d266
--- /dev/null
+++ b/graphics/pgf/contrib/simpleoptics/simpleoptics.sty
@@ -0,0 +1,140 @@
+%%Author: Justin Cawood
+%%License: LPPL 1.3c
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{simpleoptics}[2019/09/05 v1.0.0 Simple Optics Package]
+\RequirePackage{tikz}
+
+%\mirror{x}{y}{focal length}{height}
+\newcommand{\mirror}[4]{
+
+
+ \pgfmathsetmacro{\mirrorX}{#1}
+ \pgfmathsetmacro{\mirrorY}{#2}
+
+ \pgfmathsetmacro{\mirrorRadius}{2*#3}
+ \pgfmathsetmacro{\mirrorHeight}{\mirrorY + #4}
+
+ \pgfmathsetmacro{\startAngle}{asin(\mirrorHeight/\mirrorRadius)}
+
+ \draw
+
+ (\mirrorX,\mirrorHeight) arc[start angle=180-\startAngle,delta angle=2*\startAngle,radius=\mirrorRadius]
+
+ ;
+}
+
+%\lens{x}{y}{focal length}{height}{thickness}
+\newcommand{\lens}[5]{
+
+
+ \pgfmathsetmacro{\lensX}{#1}
+ \pgfmathsetmacro{\lensY}{#2}
+ \pgfmathsetmacro{\lensRadius}{2*#3}
+ \pgfmathsetmacro{\lensHeight}{#4}
+ \pgfmathsetmacro{\lensThickness}{#5}
+
+ \pgfmathsetmacro{\lensXright}{\lensX +(0.5*\lensThickness)}
+ \pgfmathsetmacro{\lensXleft}{\lensX-(0.5*\lensThickness)}
+
+ \mirror{\lensXleft}{\lensY}{\lensRadius}{\lensHeight}
+ \mirror{\lensXright}{\lensY}{-\lensRadius}{\lensHeight}
+
+ \draw
+
+ (\lensXleft,\lensHeight) -- (\lensXright,\lensHeight)
+ (\lensXright,-\lensHeight) -- (\lensXleft,-\lensHeight)
+
+ ;
+}
+
+%\biconvexlens{x}{y}{focal length}{height}{thickness}
+\newcommand{\biconvexlens}[5]{
+\lens{#1}{#2}{#3}{#4}{#5}
+}
+
+%\biconcavelens{x}{y}{focal length}{height}{thickness}
+\newcommand{\biconcavelens}[5]{
+\lens{#1}{#2}{-#3}{#4}{#5}
+}
+
+%\concaveconvexlens{x}{y}{focal length}{height}{thickness}
+\newcommand{\concaveconvexlens}[5]{
+ \pgfmathsetmacro{\lensX}{#1}
+ \pgfmathsetmacro{\lensY}{#2}
+ \pgfmathsetmacro{\lensRadius}{-2*#3}
+ \pgfmathsetmacro{\lensHeight}{#4}
+ \pgfmathsetmacro{\lensThickness}{#5}
+
+ \pgfmathsetmacro{\lensXright}{\lensX +(0.5*\lensThickness)}
+ \pgfmathsetmacro{\lensXleft}{\lensX-(0.5*\lensThickness)}
+
+ \mirror{\lensXleft}{\lensY}{\lensRadius}{\lensHeight}
+ \mirror{\lensXright}{\lensY}{\lensRadius}{\lensHeight}
+
+ \draw
+
+ (\lensXleft,\lensHeight) -- (\lensXright,\lensHeight)
+ (\lensXright,-\lensHeight) -- (\lensXleft,-\lensHeight)
+
+ ;
+}
+
+%\convexconcavelens{x}{y}{focal length}{height}{thickness}
+\newcommand{\convexconcavelens}[5]{
+\concaveconvexlens{#1}{#2}{-#3}{#4}{#5}
+}
+
+%\rightplanoconvexlens{x}{y}{focal length}{height}{thickness}
+\newcommand{\rightplanoconvexlens}[5]{
+ \pgfmathsetmacro{\lensX}{#1}
+ \pgfmathsetmacro{\lensY}{#2}
+ \pgfmathsetmacro{\lensRadius}{2*#3}
+ \pgfmathsetmacro{\lensHeight}{#4}
+ \pgfmathsetmacro{\lensThickness}{#5}
+
+ \pgfmathsetmacro{\lensXright}{\lensX +(0.5*\lensThickness)}
+ \pgfmathsetmacro{\lensXleft}{\lensX-(0.5*\lensThickness)}
+
+ \mirror{\lensXleft}{\lensY}{\lensRadius}{\lensHeight}
+
+ \draw
+
+ (\lensXleft,\lensHeight) -- (\lensXright,\lensHeight)
+ (\lensXright,-\lensHeight) -- (\lensXleft,-\lensHeight)
+ (\lensXright,\lensHeight) -- (\lensXright,-\lensHeight)
+
+ ;
+}
+
+%\leftplanoconvexlens{x}{y}{focal length}{height}{thickness}
+\newcommand{\leftplanoconvexlens}[5]{
+\pgfmathsetmacro{\lensX}{#1}
+ \pgfmathsetmacro{\lensY}{#2}
+ \pgfmathsetmacro{\lensRadius}{2*#3}
+ \pgfmathsetmacro{\lensHeight}{#4}
+ \pgfmathsetmacro{\lensThickness}{#5}
+
+ \pgfmathsetmacro{\lensXright}{\lensX +(0.5*\lensThickness)}
+ \pgfmathsetmacro{\lensXleft}{\lensX-(0.5*\lensThickness)}
+
+ \mirror{\lensXright}{\lensY}{-\lensRadius}{\lensHeight}
+
+ \draw
+
+ (\lensXleft,\lensHeight) -- (\lensXright,\lensHeight)
+ (\lensXright,-\lensHeight) -- (\lensXleft,-\lensHeight)
+ (\lensXleft,\lensHeight) -- (\lensXleft,-\lensHeight)
+
+ ;
+}
+
+%\rightplanoconcavelens{x}{y}{focal length}{height}{thickness}
+\newcommand{\rightplanoconcavelens}[5]{
+\rightplanoconvexlens{#1}{#2}{-#3}{#4}{#5}
+}
+
+%\leftplanoconcavelens{x}{y}{focal length}{height}{thickness}
+\newcommand{\leftplanoconcavelens}[5]{
+\leftplanoconvexlens{#1}{#2}{-#3}{#4}{#5}
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/simpleoptics/simpleoptics.tex b/graphics/pgf/contrib/simpleoptics/simpleoptics.tex
new file mode 100644
index 0000000000..1ed5ecfe45
--- /dev/null
+++ b/graphics/pgf/contrib/simpleoptics/simpleoptics.tex
@@ -0,0 +1,474 @@
+\documentclass[12pt]{article}
+
+\usepackage[right=1in, top=1in, left=1in, bottom=1in]{geometry}
+\usepackage[parfill]{parskip}
+\usepackage{hyperref, float}
+\hypersetup{
+ colorlinks=true,
+ linkcolor=blue,
+ filecolor=magenta,
+ urlcolor=cyan,
+}
+
+\usepackage{simpleoptics}
+
+
+\begin{document}
+
+
+\begin{titlepage}
+\vspace*{\fill}
+\begin{center}
+{\Huge Simple Optics Documentation}\\[0.5cm]
+{\Large Version: 1.0.0}\\[0.4cm]
+{\Large Date: $5^{th}$ of September 2019}\\[0.2cm]
+{\small Author: Justin Cawood}
+\end{center}
+\vspace*{\fill}
+\end{titlepage}
+
+\newpage
+
+\tableofcontents
+
+\newpage
+
+\section{Important Info}
+
+All optics diagrams drawn with this package \textbf{must} be contained within a "tikzpicture" environment
+
+Example.
+
+$\backslash$begin\{center\}
+
+$\backslash$begin\{tikzpicture\}
+
+$\backslash$mirror\{0\}\{0\}\{-4\}\{3\}
+
+$\backslash$end\{tikzpicture\}
+
+$\backslash$end\{center\}
+
+\begin{figure}[H]
+
+\begin{center}
+
+\begin{tikzpicture}
+
+\mirror{0}{0}{-4}{3}
+
+\end{tikzpicture}
+
+\end{center}
+
+\caption{Simple mirror example}
+\end{figure}
+
+\section{Quick Macro Reference}
+
+The available macros are
+
+\begin{itemize}
+\item $\backslash$mirror\{x\}\{y\}\{focal length\}\{mirror height\}
+\item $\backslash$leftplanoconvexlens\{x\}\{y\}\{focal length\}\{mirror height\}\{thickness\}
+\item $\backslash$rightplanoconvexlens\{x\}\{y\}\{focal length\}\{mirror height\}\{thickness\}
+\item $\backslash$leftplanoconcavelens\{x\}\{y\}\{focal length\}\{mirror height\}\{thickness\}
+\item $\backslash$rightplanoconcavelens\{x\}\{y\}\{focal length\}\{mirror height\}\{thickness\}
+\item $\backslash$biconvexlens\{x\}\{y\}\{focal length\}\{mirror height\}\{thickness\}
+\item $\backslash$biconcavelens\{x\}\{y\}\{focal length\}\{mirror height\}\{thickness\}
+\item $\backslash$convexconcavelens\{x\}\{y\}\{focal length\}\{mirror height\}\{thickness\}
+\item $\backslash$concaveconvexlens\{x\}\{y\}\{focal length\}\{mirror height\}\{thickness\}
+\end{itemize}
+
+
+\section{Mirrors}
+
+Mirrors can be drawn using the $\backslash$mirror macro.
+
+The macro takes the following parameters, all of which are required.
+
+$\backslash$mirror\{x\}\{y\}\{focal length\}\{mirror height\}
+
+The parameters x and y are the coordinates for where the mirror will be placed. The focal length and height are simply the focal length and height of the mirror.
+
+If you want to flip the mirror the other way, just specify a negative focal length. Examples of both are done below with the code below each.
+
+
+\begin{minipage}{\textwidth}
+\begin{minipage}{0.5\textwidth}
+
+\begin{figure}[H]
+
+\begin{center}
+
+\begin{tikzpicture}
+
+\mirror{0}{0}{3}{2}
+
+\end{tikzpicture}
+
+\end{center}
+
+\caption{Positive focal length example}
+\end{figure}
+
+$\backslash$begin\{center\}
+
+$\backslash$begin\{tikzpicture\}
+
+$\backslash$mirror\{0\}\{0\}\{3\}\{4\}
+
+$\backslash$end\{tikzpicture\}
+
+$\backslash$end\{center\}
+\end{minipage}
+\begin{minipage}{0.5\textwidth}
+
+\begin{figure}[H]
+
+\begin{center}
+
+\begin{tikzpicture}
+
+\mirror{0}{0}{-3}{2}
+
+\end{tikzpicture}
+
+\end{center}
+
+\caption{Negative focal length example}
+\end{figure}
+
+$\backslash$begin\{center\}
+
+$\backslash$begin\{tikzpicture\}
+
+$\backslash$mirror\{0\}\{0\}\{-3\}\{4\}
+
+$\backslash$end\{tikzpicture\}
+
+$\backslash$end\{center\}
+\end{minipage}
+\end{minipage}
+
+\section{Lenses}
+
+The lenses are made using mirrors.
+
+There are a few different lenses that can be drawn with this package, each of which has its own macro.
+
+\subsection{Plano Lenses}
+Plano lenses have one flat side and the other side is either convex or concave.
+
+The plano lenses have macros following this format
+
+$\backslash$leftplano"convex/concave"lens\{x\}\{y\}\{focal length\}\{mirror height\}\{thickness\}
+
+or
+
+$\backslash$rightplano"convex/concave"lens\{x\}\{y\}\{focal length\}\{mirror height\}\{thickness\}
+
+\subsubsection{Plano-Convex Lenses}
+
+This package provides two plano-covex lens macros. One faces left and the other right. The left and right refer to the flat side of the lens. These are shown below.
+
+\begin{minipage}{\textwidth}
+\begin{minipage}{0.5\textwidth}
+
+\begin{figure}[H]
+
+\begin{center}
+
+\begin{tikzpicture}
+
+\leftplanoconvexlens{0}{0}{3}{2}{0.3}
+
+\end{tikzpicture}
+
+\end{center}
+
+\caption{Left plano convex lens}
+\end{figure}
+
+$\backslash$begin\{center\}
+
+$\backslash$begin\{tikzpicture\}
+
+$\backslash$leftplanoconvexlens\{0\}\{0\}\{3\}\{4\}\{0.3\}
+
+$\backslash$end\{tikzpicture\}
+
+$\backslash$end\{center\}
+\end{minipage}
+\begin{minipage}{0.5\textwidth}
+
+\begin{figure}[H]
+
+\begin{center}
+
+\begin{tikzpicture}
+
+\rightplanoconvexlens{0}{0}{3}{2}{0.3}
+
+\end{tikzpicture}
+
+\end{center}
+
+\caption{Right plano convex lens}
+\end{figure}
+
+$\backslash$begin\{center\}
+
+$\backslash$begin\{tikzpicture\}
+
+$\backslash$rightplanoconvexlens\{0\}\{0\}\{3\}\{4\}\{0.3\}
+
+$\backslash$end\{tikzpicture\}
+
+$\backslash$end\{center\}
+\end{minipage}
+\end{minipage}
+
+\subsubsection{Plano-Concave Lenses}
+
+The same can be done with plano concave lenses. Again there are two available macros. One faces left and the other right. The left and right refer to the flat side of the lens. These are shown below.
+
+\begin{minipage}{\textwidth}
+\begin{minipage}{0.5\textwidth}
+
+\begin{figure}[H]
+
+\begin{center}
+
+\begin{tikzpicture}
+
+\leftplanoconcavelens{0}{0}{5}{3}{0.5}
+
+\end{tikzpicture}
+
+\end{center}
+
+\caption{Left plano concave lens}
+\end{figure}
+
+$\backslash$begin\{center\}
+
+$\backslash$begin\{tikzpicture\}
+
+$\backslash$leftplanoconcavelens\{0\}\{0\}\{5\}\{3\}\{0.5\}
+
+$\backslash$end\{tikzpicture\}
+
+$\backslash$end\{center\}
+\end{minipage}
+\begin{minipage}{0.5\textwidth}
+
+\begin{figure}[H]
+
+\begin{center}
+
+\begin{tikzpicture}
+
+\rightplanoconcavelens{0}{0}{5}{3}{0.5}
+
+\end{tikzpicture}
+
+\end{center}
+
+\caption{Right plano concave lens}
+\end{figure}
+
+$\backslash$begin\{center\}
+
+$\backslash$begin\{tikzpicture\}
+
+$\backslash$rightplanoconcavelens\{0\}\{0\}\{5\}\{3\}\{0.5\}
+
+$\backslash$end\{tikzpicture\}
+
+$\backslash$end\{center\}
+\end{minipage}
+\end{minipage}
+
+\subsection{Bi Lenses}
+
+Bi lenses are made of two mirrors facing opposite directions.
+
+Bi lenses have macros with this format
+
+$\backslash$bi"convex/concave"lens\{x\}\{y\}\{focal length\}\{mirror height\}\{thickness\}
+
+\subsubsection{Bi-Convex Lens}
+
+\begin{figure}[H]
+
+\begin{center}
+
+\begin{tikzpicture}
+
+\biconvexlens{0}{0}{1}{2}{1}
+
+\end{tikzpicture}
+
+\end{center}
+
+\caption{Bi convex lens}
+\end{figure}
+
+$\backslash$begin\{center\}
+
+$\backslash$begin\{tikzpicture\}
+
+$\backslash$biconvexlens\{0\}\{0\}\{1\}\{2\}\{1\}
+
+$\backslash$end\{tikzpicture\}
+
+$\backslash$end\{center\}
+
+\subsubsection{Bi-Concave Lens}
+
+\begin{figure}[H]
+
+\begin{center}
+
+\begin{tikzpicture}
+
+\biconcavelens{0}{0}{1}{3}{5}
+
+\end{tikzpicture}
+
+\end{center}
+
+\caption{Bi concave lens}
+\end{figure}
+
+$\backslash$begin\{center\}
+
+$\backslash$begin\{tikzpicture\}
+
+$\backslash$biconcavelens\{0\}\{0\}\{1\}\{3\}\{5\}
+
+$\backslash$end\{tikzpicture\}
+
+$\backslash$end\{center\}
+
+\subsection{Convex-Concave and Concave-Convex Lenses}
+
+Convex and concave mirrors can be combined to make convex-concave lenses and concave-convex lenses.
+
+They have macros with the format
+
+$\backslash$convexconcavelens\{x\}\{y\}\{focal length\}\{mirror height\}\{thickness\}
+
+$\backslash$concaveconvexlens\{x\}\{y\}\{focal length\}\{mirror height\}\{thickness\}
+
+\begin{minipage}{\textwidth}
+\begin{minipage}{0.5\textwidth}
+
+\begin{figure}[H]
+
+\begin{center}
+
+\begin{tikzpicture}
+
+\convexconcavelens{0}{0}{2.5}{3}{0.8}
+
+\end{tikzpicture}
+
+\end{center}
+
+\caption{Convex-Concave lens}
+\end{figure}
+
+$\backslash$begin\{center\}
+
+$\backslash$begin\{tikzpicture\}
+
+$\backslash$convexconcavelens\{0\}\{0\}\{2.5\}\{3\}\{0.8\}
+
+$\backslash$end\{tikzpicture\}
+
+$\backslash$end\{center\}
+\end{minipage}
+\begin{minipage}{0.5\textwidth}
+
+\begin{figure}[H]
+
+\begin{center}
+
+\begin{tikzpicture}
+
+\concaveconvexlens{0}{0}{2.5}{3}{0.8}
+
+\end{tikzpicture}
+
+\end{center}
+
+\caption{Concave-Convex lens}
+\end{figure}
+
+$\backslash$begin\{center\}
+
+$\backslash$begin\{tikzpicture\}
+
+$\backslash$concaveconvexlens\{0\}\{0\}\{2.5\}\{3\}\{0.8\}
+
+$\backslash$end\{tikzpicture\}
+
+$\backslash$end\{center\}
+\end{minipage}
+\end{minipage}
+
+\section{Multiple At Once}
+
+The macros can all be used at the same time to produce diagrams with multiple lenses and/or mirrors.
+
+
+\begin{figure}[H]
+
+\begin{center}
+
+\begin{tikzpicture}
+
+\mirror{1}{0}{2.5}{3}
+\convexconcavelens{3}{0}{2.5}{3}{0.7}
+\biconvexlens{5}{0}{2.5}{3}{0.5}
+\concaveconvexlens{7}{0}{2.5}{3}{0.6}
+\biconcavelens{9}{0}{2.5}{3}{1.3}
+\leftplanoconvexlens{11}{0}{4}{3}{0.5}
+\concaveconvexlens{12}{0}{1}{3}{0.8}
+\rightplanoconcavelens{15}{0}{5}{3}{0.8}
+
+\end{tikzpicture}
+
+\end{center}
+
+\caption{Concave-Convex lens}
+\end{figure}
+
+$\backslash$begin\{center\}
+
+$\backslash$begin\{tikzpicture\}
+
+$\backslash$mirror\{1\}\{0\}\{2.5\}\{3\}
+
+$\backslash$convexconcavelens\{3\}\{0\}\{2.5\}\{3\}\{0.7\}
+
+$\backslash$biconvexlens\{5\}\{0\}\{2.5\}\{3\}\{0.5\}
+
+$\backslash$concaveconvexlens\{7\}\{0\}\{2.5\}\{3\}\{0.6\}
+
+$\backslash$biconcavelens\{9\}\{0\}\{2.5\}\{3\}\{1.3\}
+
+$\backslash$leftplanoconvexlens\{11\}\{0\}\{4\}\{3\}\{0.5\}
+
+$\backslash$concaveconvexlens\{12\}\{0\}\{1\}\{3\}\{0.8\}
+
+$\backslash$rightplanoconcavelens\{15\}\{0\}\{5\}\{3\}\{0.8\}
+
+$\backslash$end\{tikzpicture\}
+
+$\backslash$end\{center\}
+
+
+\end{document} \ No newline at end of file