From cca66b9ec4e494c1d919bff0f71a820d8afab1fa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:24:48 +0200 Subject: Adding upstream version 1.2.2. Signed-off-by: Daniel Baumann --- .../2geom/doc/manual2/geometric primitives | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 src/3rdparty/2geom/doc/manual2/geometric primitives (limited to 'src/3rdparty/2geom/doc/manual2/geometric primitives') diff --git a/src/3rdparty/2geom/doc/manual2/geometric primitives b/src/3rdparty/2geom/doc/manual2/geometric primitives new file mode 100644 index 0000000..b78370e --- /dev/null +++ b/src/3rdparty/2geom/doc/manual2/geometric primitives @@ -0,0 +1,65 @@ +h1. Geometric Primitives + +What good is a geometry library without geometric primitives? By this +I mean the very basic stuff, Points/Vectors, Matrices, etc. + +2geom's primitives are descendant from libNR's geometric primitives. +They have been modified quite a bit since that initial import. + +h2. Point + +!media/point.png! + +The mathematical concepts of points and vectors are merged into the +2geom class called *Point*. See Appendix A for a further +discussion of this decision. + +Point may be interpreted as a D2 with some additional operations. + +(TODO: document these ops.) + +\section{Transformations} + +Affine transformations are either represented with a canonical 6 +element matrix, or special forms. + +\subsection{Scale} + +\includegraphics[height=50mm]{media/scale.png} + +A \code{Scale} transformation stores a vector representing a scaling +transformation. + +\subsection{Rotate} + +\includegraphics[height=50mm]{media/rotate.png} + +A \code{Rotate} transformation uses a vector(\code{Point}) to store +a rotation about the origin. + +In correspondence with mathematical convention (y increasing upwards), +0 degrees is encoded as a vector pointing along the x axis, and positive +angles indicate anticlockwise rotation. So, for example, a vector along +the y axis would encode a 90 degree anticlockwise rotation of 90 degrees. + +In the case that the computer convention of y increasing downwards, +the \verb}Rotate} transformation works essentially the same, except +that positive angles indicate clockwise rotation. + +\subsection{Translate} + +\includegraphics[height=70mm]{media/translate.png} + +A \code{Translate} transformation is a simple vector(\code{Point}) +which stores an offset. + +\subsection{Matrix} + +\includegraphics[height=70mm]{media/matrix.png} + +A \code{Matrix} is a general affine transform. Code is provided for +various decompositions, constructions, and manipulations. A +\code{Matrix} is composed of 6 coordinates, essentially storing the +x axis, y axis, and offset of the transformation. A detailed +explanation for matrices is given in Appendix B. + -- cgit v1.2.3