summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-11-09 22:14:52 +0000
committerKarl Berry <karl@freefriends.org>2023-11-09 22:14:52 +0000
commit567785d00520b3303a43b994084dcb02a532902f (patch)
tree9394a4a563c9cd6a8499d9e9ac3fb3599c9c6896 /Master/texmf-dist/doc
parente8dcef4eb9e70ed986b683df23cb2b278a121ae2 (diff)
polyhedra (6nov23)
git-svn-id: svn://tug.org/texlive/trunk@68770 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r--Master/texmf-dist/doc/latex/polyhedra/README.md19
-rw-r--r--Master/texmf-dist/doc/latex/polyhedra/polyhedra-doc.pdfbin0 -> 183790 bytes
-rw-r--r--Master/texmf-dist/doc/latex/polyhedra/polyhedra-doc.tex418
3 files changed, 437 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/polyhedra/README.md b/Master/texmf-dist/doc/latex/polyhedra/README.md
new file mode 100644
index 00000000000..6a64479e057
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/polyhedra/README.md
@@ -0,0 +1,19 @@
+# polyhedra.sty
+A tikz package for drawing polyhedra
+
+Copyright 2015-2023 Zafeirakis Zafeirakopoulos
+zafeirakopoulos@gmail.com
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3
+of this license or (at your option) any later version.
+The latest version of this license is in
+ https://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX
+version 2008 or later.
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainer of this work is Zafeirakis Zafeirakopoulos.
+
+This work consists of the files polyhedra.sty and polyhedra-doc.tex. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/polyhedra/polyhedra-doc.pdf b/Master/texmf-dist/doc/latex/polyhedra/polyhedra-doc.pdf
new file mode 100644
index 00000000000..1b956e586d3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/polyhedra/polyhedra-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/polyhedra/polyhedra-doc.tex b/Master/texmf-dist/doc/latex/polyhedra/polyhedra-doc.tex
new file mode 100644
index 00000000000..c37a67a0c82
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/polyhedra/polyhedra-doc.tex
@@ -0,0 +1,418 @@
+\documentclass[a4paper]{article}
+\usepackage{listings}
+
+\usepackage{polyhedra}
+
+\begin{document}
+
+\lstset{language=[LaTeX]{TeX}}
+
+\lstset{
+basicstyle=\small\sffamily,
+backgroundcolor=\color{gray!20},
+%numbers=left,
+numberstyle=\tiny,
+breaklines=true,
+%frame=l,
+xleftmargin=\parindent,
+columns=fullflexible,
+showstringspaces=false,
+keywordstyle=\bfseries\color{solarized-green},
+commentstyle=\color{black!50},
+identifierstyle=\color{solarized-blue},
+stringstyle=,
+escapeinside={(*}{*)}
+}
+
+
+\title{Polyhedra \LaTeX\ package - v. 0.3}
+\author{Zafeirakis zafeirakopoulos}
+\maketitle
+\begin{abstract}
+This package provides macros for creating polyhedral objects in 2D and 3D.
+It requires tikz and tikz-3dplot.
+The macros provided can be used for drawing vertices, edges, rays, polygons and
+cones.
+\end{abstract}
+
+\section{Introduction}
+
+
+All the drawing commands work with keyword arguments and are the same in
+2d and 3D.
+
+
+
+\section{Functionality}
+
+\subsection{The \emph{polyhedron} environment}
+
+The \emph{polyhedron} environment is essentially a wrapper for a tikzpicture
+environment.
+It accepts as extra arguments the dimension of the picture (either $2$ or $3$)
+and if the dimension is $3$, then the arguments for the three angles defining
+the rotated coordinate system are given.
+For the 3D coordinate system, we use tikz-plot3d.
+
+\begin{center}
+ \begin{minipage}{0.6\textwidth}
+ \begin{lstlisting}
+\begin{polyhedron}{dim=2}
+ \axes{x={1,3},y={1,3}}
+\end{polyhedron}
+ \end{lstlisting}
+ \end{minipage}
+ \qquad\qquad
+ \begin{minipage}{0.2\textwidth}
+ \begin{polyhedron}{dim=2}
+ \axes{x={1,3},y={1,3}}
+ \end{polyhedron}
+ \end{minipage}
+\end{center}
+
+
+The dimension argument defaults to $2$.
+
+
+\begin{center}
+ \begin{minipage}{0.6\textwidth}
+ \begin{lstlisting}
+ \begin{polyhedron}{}
+ \axes{x={1,3},y={1,3}}
+ \end{polyhedron}
+ \end{lstlisting}
+ \end{minipage}
+ \qquad\qquad
+ \begin{minipage}{0.2\textwidth}
+ \begin{polyhedron}{}
+ \axes{x={1,3},y={1,3}}
+ \end{polyhedron}
+ \end{minipage}
+\end{center}
+
+
+Let us define a 3D polyhedron.
+
+\begin{center}
+ \begin{minipage}{0.6\textwidth}
+ \begin{lstlisting}
+\begin{polyhedron}{dim=3}
+ \axes{x={1,3},y={1,3},z={1,3}}
+\end{polyhedron}
+ \end{lstlisting}
+ \end{minipage}
+ \qquad\qquad
+ \begin{minipage}{0.2\textwidth}
+ \begin{polyhedron}{dim=3}
+ \axes{x={1,3},y={1,3},z={1,3}}
+ \end{polyhedron}
+ \end{minipage}
+\end{center}
+
+Since we did not give the angles for the main coordinate system, we get the
+default tikz $xy$-plane.
+
+Now lets rotate the coordinate system by 60 degrees around the $x$-axis and
+120 degrees around the $z$-axis.
+
+\begin{center}
+ \begin{minipage}{0.6\textwidth}
+ \begin{lstlisting}
+\begin{polyhedron}{dim=3,phi=60,theta=120}
+ \axes{x={1,3},y={1,3},z={1,3}}
+\end{polyhedron}
+ \end{lstlisting}
+ \end{minipage}
+ \qquad\qquad
+ \begin{minipage}{0.2\textwidth}
+ \begin{polyhedron}{dim=3,phi=60,theta=120}
+ \axes{x={1,3},y={1,3},z={1,3}}
+ \end{polyhedron}
+ \end{minipage}
+\end{center}
+
+
+\subsection{Input}
+
+The following macros work within the \texttt{polyhedron} environment.
+
+\subsubsection{Point.} To let A be a point (x,y) or (x,y,z)
+\begin{lstlisting}
+\point{(x,y,z)}{A}
+\end{lstlisting}
+After defining a point, we can use the handle (variable name) A, instead of
+writing down the coordinates in the macros that follow.
+
+
+\subsubsection{Axes.}
+
+We saw already some examples using the \emph{axes} command.
+
+\begin{center}
+ \begin{minipage}{0.6\textwidth}
+ \begin{lstlisting}
+\begin{polyhedron}{dim=3,phi=60,theta=120}
+ \axes{x={1,3},y={1,3},z={1,3}}
+\end{polyhedron}
+ \end{lstlisting}
+ \end{minipage}
+ \qquad\qquad
+ \begin{minipage}{0.2\textwidth}
+ \begin{polyhedron}{dim=3,phi=60,theta=120}
+ \axes{x={1,3},y={1,3},z={1,3}}
+ \end{polyhedron}
+ \end{minipage}
+\end{center}
+
+The command takes the following (self-explanatory) arguments.
+All arguments are optional, defaulting to the ones shown here.
+
+\begin{lstlisting}
+x={0,1},y={0,1},z={},xlabel={x},ylabel={y},zlabel={z},labels={true}
+\end{lstlisting}
+
+
+
+\begin{center}
+ \begin{minipage}{0.6\textwidth}
+ \begin{lstlisting}
+\begin{polyhedron}{dim=3,phi=60,theta=120}
+ \axes{x={1,3},z={1,3},zlabel={not z}}
+\end{polyhedron}
+ \end{lstlisting}
+ \end{minipage}
+ \qquad\qquad
+ \begin{minipage}{0.2\textwidth}
+ \begin{polyhedron}{dim=3,phi=60,theta=120}
+ \axes{x={1,3},z={1,3},zlabel={not z}}
+ \end{polyhedron}
+ \end{minipage}
+\end{center}
+
+
+
+\subsection{Drawing commands}
+
+All drawing commands accept the following options:
+\begin{description}
+ \item[color] The color of the polyhedral object to draw.
+ \item[status] The status of the object. The possible values are:
+ \begin{itemize}
+ \item normal
+ \item focus
+ \item alert
+ \item open
+ \end{itemize}
+ \item[opacity] The opacity of the object.
+ \item[thickness] The width of the lines
+ \item[pattern] The draw pattern
+\end{description}
+
+\subsubsection{Vertex}
+
+The \emph{vertex} command is used to draw a vertex at a point (x,y,z) or A.
+The standard options of color, status, opacity, thickness and pattern apply.
+The extra options for vertex are:
+\begin{description}
+ \item[point] sets the coordinates of the vertex and it can be either a tikz
+ coordinate tuple or a point already defined.
+ \item[text] The text of the vertex label.
+ \item[textcolor] The color of the label's text.
+ \item[anchora] The label anchor relative to the vertex: north, south, east,
+ west
+ \item[anchorb] The text's anchor relative to the label: above, below, right,
+ left
+\end{description}
+
+
+\begin{center}
+ \begin{minipage}{0.7\textwidth}
+ \begin{lstlisting}
+\begin{polyhedron}{}
+ \vertex{point={0,0},status=normal}
+ \vertex{point={1,0},status=alert}
+ \vertex{point={2,0},status=open}
+ \vertex{point={3,0},color=red,pattern={north west lines}}
+ \vertex{point={4,0},color=orange,text={A}}
+\end{polyhedron}
+ \end{lstlisting}
+ \end{minipage}
+ \hskip 2em
+ \begin{minipage}{0.2\textwidth}
+ \begin{polyhedron}{}
+ \vertex{point={0,0},status=normal}
+ \vertex{point={1,0},status=alert}
+ \vertex{point={2,0},status=open}
+ \vertex{point={3,0},color=red,pattern={north west lines}}
+ \vertex{point={4,0},color=orange,text={A}}
+ \end{polyhedron}
+ \end{minipage}
+\end{center}
+
+
+
+\subsubsection{Edges and Rays} The command \emph{edge} is used to draw an
+edge from point A to point B.
+The extra arguments are:
+\begin{description}
+ \item[points] sets the coordinates of the vertices of the edge. It is a list
+of (two) points in \{\}.
+\end{description}
+
+
+\begin{center}
+ \begin{minipage}{0.7\textwidth}
+ \begin{lstlisting}
+\begin{polyhedron}{}
+ \edge{points={(0,0),(2,2)},status=alert}
+ \edge{points={(0,0),(2,3)},status=focus}
+ \edge{points={(0,0),(2,4)},status=open}
+ \edge{points={(0,0),(2,5)},color=orange}
+ \edge{points={(0,0),(2,6)},status=normal}
+ \edge{points={(2,1),(3,3)},thickness=3}
+ \edge{points={(4,1),(3,3)},pattern={dotted}}
+\end{polyhedron}
+ \end{lstlisting}
+ \end{minipage}
+ \hskip 2em
+ \begin{minipage}{0.2\textwidth}
+ \begin{polyhedron}{}
+ \edge{points={(0,0),(2,2)},status=alert}
+ \edge{points={(0,0),(2,3)},status=focus}
+ \edge{points={(0,0),(2,4)},status=open}
+ \edge{points={(0,0),(2,5)},color=orange}
+ \edge{points={(0,0),(2,6)},status=normal}
+ \edge{points={(2,1),(3,3)},thickness=3}
+ \edge{points={(4,1),(3,3)},pattern={dotted}}
+ \end{polyhedron}
+ \end{minipage}
+\end{center}
+
+Similarly, the command \emph{ray} draw a ray.
+The options are exactly the same as for edge.
+Note that the sequence in which the points are given matters.
+\begin{center}
+ \begin{minipage}{0.7\textwidth}
+ \begin{lstlisting}
+\begin{polyhedron}{}
+ \ray{points={(0,0),(2,2)},status=alert}
+ \ray{points={(0,0),(2,3)},status=focus}
+ \ray{points={(0,0),(2,4)},status=open}
+ \ray{points={(0,0),(2,5)},color=orange}
+ \ray{points={(0,0),(2,6)},status=normal}
+ \ray{points={(2,1),(3,3)},thickness=3}
+ \ray{points={(4,1),(3,3)},pattern={dotted}}
+\end{polyhedron}
+ \end{lstlisting}
+ \end{minipage}
+ \hskip 2em
+ \begin{minipage}{0.2\textwidth}
+ \begin{polyhedron}{}
+ \ray{points={(0,0),(2,2)},status=alert}
+ \ray{points={(0,0),(2,3)},status=focus}
+ \ray{points={(0,0),(2,4)},status=open}
+ \ray{points={(0,0),(2,5)},color=orange}
+ \ray{points={(0,0),(2,6)},status=normal}
+ \ray{points={(2,1),(3,3)},thickness=3}
+ \ray{points={(4,1),(3,3)},pattern={dotted}}
+ \end{polyhedron}
+ \end{minipage}
+\end{center}
+
+\subsubsection{Cone}
+
+The command \emph{cone} is used to draw a polyhedral cone.
+The extra arguments are:
+\begin{description}
+ \item[vertex] Sets the apex of the cone.
+ \item[generators] A list of points
+ \item[openeness] A list of boolean values declaring the openness of a
+ simplicial cone.
+\end{description}
+
+
+\begin{center}
+ \begin{minipage}{0.7\textwidth}
+ \begin{lstlisting}
+\begin{polyhedron}{}
+ \cone{vertex={(0,0)}, generators={(0,2),(2,2)},
+ status=alert}
+ \cone{vertex={(0,0)}, generators={(2,0),(2,-2)},
+ status=focus}
+\end{polyhedron}
+ \end{lstlisting}
+ \end{minipage}
+ \hskip 2em
+ \begin{minipage}{0.2\textwidth}
+ \begin{polyhedron}{}
+ \cone{vertex={(0,0)}, generators={(0,2),(2,2)},status=alert}
+ \cone{vertex={(0,0)}, generators={(2,0),(2,-2)},status=focus}
+ \end{polyhedron}
+ \end{minipage}
+\end{center}
+
+
+\begin{center}
+ \begin{minipage}{0.7\textwidth}
+ \begin{lstlisting}
+\begin{polyhedron}{}
+ \cone{vertex={(0,0)}, generators={(2,0),(2,-2)},
+ status=focus}
+ \cone{vertex={(3,2)},generators={(0,0),(2,-1)},
+ pattern={north east lines}}
+\end{polyhedron}
+\end{lstlisting}
+ \end{minipage}
+ \hskip 2em
+ \begin{minipage}{0.2\textwidth}
+ \begin{polyhedron}{}
+ \cone{vertex={(0,0)}, generators={(2,0),(2,-2)},status=focus}
+ \cone{vertex={(3,2)},generators={(0,0),(2,-1)},pattern={north east lines}}
+ \end{polyhedron}
+ \end{minipage}
+\end{center}
+
+
+
+\subsubsection{Polygon}
+
+The command \emph{polygon} is used to draw a 2-dimensional polytope in 2D or 3D.
+Attention must be paid in the sequence of the points given.
+The command does not take the convex hull, but rather draws the polygonal
+line defined by the sequence of points.
+
+The extra arguments are:
+\begin{description}
+ \item[points] The vertices of the cone.
+ \item[boundary] True or False, for drawing or not the boundary of the polygon.
+\end{description}
+
+
+\begin{center}
+ \begin{minipage}{0.7\textwidth}
+ \begin{lstlisting}
+\begin{polyhedron}{}
+ \polygon{points={(0,2),(2,2),(2,0)},status=alert}
+ \polygon{points={(0,-2),(-2,-2),(-2,0)},status=open}
+ \polygon{points={(0,1),(0,0),(1,0),(1,1)},status=open,
+ boundary=false,color=orange}
+\end{polyhedron}
+ \end{lstlisting}
+ \end{minipage}
+ \hskip 2em
+ \begin{minipage}{0.2\textwidth}
+ \begin{polyhedron}{}
+ \polygon{points={(0,2),(2,2),(2,0)},status=alert}
+ \polygon{points={(0,-2),(-2,-2),(-2,0)},status=open}
+\polygon{points={(0,1),(0,0),(1,0),(1,1)},status=open,boundary=false,
+color=orange}
+ \end{polyhedron}
+ \end{minipage}
+\end{center}
+
+
+
+\section{Known limitations and errors}
+
+
+\end{document}