Ideas for 2D-graphics representations (not yet implemented).

Goals and Design

Like A3DL, but for interactive 2D graphics in a window that allows pan/zoom, or overlaid on top of 3D graphics in TerAngreal. Its goal would be for display of both bitmaps and vector graphics, both for art and diagramming.

We can call it AGIL- the abstract graphing and imaging layer. It's pronounced "Agile".

A3DL and AGIL should overlap when it comes to bitmap image layers. This would let us use the same vobjects in both contexts, and cross-implement ideas as desired. Or, even replace a3dl:material with an AGIL object system entirely if possible.

Initially AGIL would be implemented within TerAngreal so it can be used in conjunction with 3D graphics, with chatting, and with TerAngreal's other interface tools. It could also be implemented for display in Gimp, Inkscape, and as a wxWidgets control (this latter control could also be used as a generic Vobject display and editing control). (See the Verse mailing list for a bit of discussion about difficulties doing dynamic data interchange in a Gimp plugin; though perhaps these problems will be fixed in a future version of Gimp...)

Objects may be nested, which determines position and rotation of child objects (relative to parent) and maybe scaling. A "Frame" is used to group objects.

We could wrap GEGL to implement various filters and effects (on the server side in listeners) http://gegl.org/

Object Types:

Layers

Overlay container for objects. Same coordinate system, but layers may be zoomed, scrolled and otherwise filtered or modified independently. Free scroll, or scroll screen by screen. Toggle with momentery button press or toggle on and off with button or mouse click. Top view scrolling video game.

Object Type: Frame

Groups objects. You can select a frame to be your master frame if you want. If a title is given, that text is displayed, otherwise there is no visible part to a frame.

Frame Properties:

  • crop? (default no) only display objects within 'size' property
  • size (default 1 1)
  • position (default 0 0)
  • rotation (default 0)
  • title (default none) display this text, though
  • scalechildren (defaut none) how to scale child objects)

Object Type: Shape

Shape Properties

  • fill color (default none, and not applicable to all shapes)
  • outline color
  • transparency and other layering properties
  • height
  • width
  • x position
  • y position
  • rotation
  • title
  • vertexshape (link to another 2dgraphics Vobject of course)
  • line style

In addition to positioning child shapes at an (x,y) position within a parent shape's local coordinate system, all shapes will also have a shape-specific way of positioning other shapes within them so that they are attached to the shape. E.g. on a circle, shapes could be positioned around its circumference, or radially. On a line, it would be a certain distance from the beginning or end.

More generally, shapes could be to be "lined up" with each other (according to the specific shapes involved), or attached only at certain points (though that can be achieved simply by sharing the same properties for coordinates...).

Shape Subtypes

  • Ellipse
  • Box
  • Line
  • Polygon - efficient collection of connected lines.
    • Not necc. closed; could be simply a set of connected line segments generated by some function or by hand.
  • Curve
  • Node Arc or Edge - links parent object to a target object (using certain vetices or centers or any point on the edge) using a line with optional arrows at the ends. These could be supported in both AGIL and A3DL: in AGIL as

a simple line, in A3DL as an OpenGL line, billboard triangle strip, or cylinder primitive.

  • properties that describe how the line looks and behaves
  • Should be able to describe how lines visually group -- i.e. align with each other if they follow a similar path. see subway maps for inspiration.
  • shapes that help make charts and graphs (bar charts, pie charts, etc.)
  • graph paper grids?

Object Type: Text

With fonts and everything. HTML text with CSS??

Object Type: Operation

e.g. boolean operations like intersections, mirror and warped versions of other objects, etc.

Object Type: Image

A raster bitmap (or vector) image stored in a file of some format (e.g. PNG, JPEG).

Image Properties:

  • image
  • title
  • position
  • rotation
  • size
  • border?

Other object types

  • Parametric graphs (time), with animation
  • Measurement lines and brackets
  • call out annotations in the form of boxes with lines (with arrowheads or dots at attachment point), cartoon bubbles, etc. (this could be implemented as a compound of other types), automatically placed either to line up on edges, or to be placed in nearest whitespace, etc.)

Ideas sources

http://www.processing.org Proce55ing is a program for writing scripts that act on graphics. May want to use some of their data structure designs for better interoperability. Relations between graphical elements are essential for diagramming, and that shoud be a focus of AGIL (in addition to just placing things in cartesian space if desired).

Sites about "Visual Language"-- how to communicate by arranging graphics and images into meaningful shapes:

http://had.co.nz/ggplot2/ http://had.co.nz/ggplot/ http://www.ggobi.org

See GraphicsInspiration for more.

Implementation Resources

MetaobjectsFor2dGraphics (last edited 2008-10-26 18:02:38 by ReedHedges)