Macaulay2 » Documentation
Packages » VectorGraphics :: VectorGraphics
next | previous | forward | backward | up | index | toc

VectorGraphics -- A package to produce SVG graphics

Description

VectorGraphics is a package to produce SVG 2d and 3d graphics. All usable types are descendents of the type GraphicsObject, and are self-initializing. Coordinates can be entered as vectors in $\mathbb{R}^2$, $\mathbb{R}^3$ or $\mathbb{R}^4$ ($\mathbb{R}^4$ is projective coordinates); alternatively, one can enter them as arrays. With the default perspective matrix, the x axis points to the right, the y axis points up, and the z axis points towards the viewer. All types are option tables, i.e., their arguments are options. There are two types of options: VectorGraphics options, that are symbols (e.g., Radius for circles); and styling options, which are CSS style options, and which are strings (e.g., "fill" for fill color). VectorGraphics does not use units (coordinates are dimensionless). In Standard mode, the graphical objects are not directly visible; to export them to SVG in order to embed them into a web page, use html. In WebApp mode, the graphical objects are shown as output. There are two auxiliary files. VectorGraphics.css is a set of styling options that is not required, but its default options can be useful for consistency of style. For all dynamical effects (rotating and dragging in 3d, animations), both VectorGraphics.js and VectorGraphics.css are needed.

Author

Version

This documentation describes version 1.1 of VectorGraphics.

Source code

The source code from which this documentation is derived is in the file VectorGraphics.m2. The auxiliary files accompanying it are in the directory VectorGraphics/.

Exports

  • Types
  • Functions and commands
    • arrow -- A marker to add to paths
    • bisector -- Angle bisector of two lines
    • crossing -- Intersection of two lines
    • gList -- Group together VectorGraphics objects
    • gNode -- VectorGraphics object(s) with a preferred reference origin
    • linearGradient -- An SVG gradient
    • listPlot -- Graphical representation of a list
    • matrixPlot -- Graphical representation of a matrix
    • place -- Position a point relative to two other points
    • plot2d -- Draws a curve or surface
    • plot3d -- see plot2d -- Draws a curve or surface
    • projection -- Orthogonal projection on a line
    • radialGradient -- An SVG gradient
    • rotation -- Computes a rotation matrix
    • showGraph -- Improved drawing of graphs
    • translation -- Computes a translation matrix
    • viewPort -- ViewPort of view port
  • Methods
    • - GraphicsAncestor (missing documentation)
    • GraphicsAncestor + GraphicsAncestor (missing documentation)
    • GraphicsAncestor + Vector (missing documentation)
    • GraphicsAncestor - GraphicsAncestor (missing documentation)
    • GraphicsAncestor - Vector (missing documentation)
    • matrixPlot(List) -- see matrixPlot -- Graphical representation of a matrix
    • matrixPlot(Matrix) -- see matrixPlot -- Graphical representation of a matrix
    • Number * GraphicsAncestor (missing documentation)
    • show(GraphicsObject) -- view a graphics object
    • Vector + GraphicsAncestor (missing documentation)
    • Vector - GraphicsAncestor (missing documentation)
  • Symbols
    • Animate (missing documentation)
    • AnimMatrix -- Create a rotation animation matrix
    • AnimStart (missing documentation)
    • Axes -- An option to draw axes
    • Blur -- An option to blur a VectorGraphics object
    • Draggable -- An option to make a GraphicsObject draggable
    • Margin -- An option to specify the margin
    • OneSided
    • Perspective -- Set the amount of perspective
    • Size -- Set the size of a picture
    • Static -- An option to make a VectorGraphics object unmoving
    • TransformMatrix -- Create a rotation matrix
    • ViewPort -- Fix the view port

For the programmer

The object VectorGraphics is a package.