TwoDimensional
is a Julia package which provides useful types
and methods to define and manipulate 2-dimensional objects (points, rectangles,
circles, polygons, and bounding-boxes) and affine coordinate transforms. This
package also offers methods to build masks from the composition of elementary
shapes.
Other related packages:
- CoordinateTransformations for coordinate transformations;
- GeometryBasics for basic geometric types;
- Graphics for basic graphical objects and methods;
using TwoDimensional
gives you types AffineTransform
, Point
and BoundingBox
.
To avoid conflicts with other packages, you may specifically use/import aliases
to these types with suffixes 2D
like AffineTransform2D
, Point2D
,
BoundingBox2D
, etc. For example:
using TwoDimensional: AffineTransform2D, Point2D, BoundingBox2D
Latest documentation is here.
TwoDimensional
is an official Julia package so you can
install it from Julia's package manager. In an interactive Julia session, hit
the ]
key to switch to the package manager REPL (you should get a ... pkg>
prompt) and type:
pkg> add TwoDimensional
You can also execute the following statements (in a Julia script or from Julia REPL):
using Pkg
Pkg.add("TwoDimensional")