Pimon is a small visualization framework written in Smalltalk.

The Pimon DSL

The figure drawing DSL of Pimon is targeted at end users of vector drawing applications. For example, figures are grouped and aligned by bottom, rather than forcing the programmer to wrap his head around vector algebra with all its x’s and y’s.

Known uses of the Pimon engine

Blog posts

Easy readable layout code

My vision, when writing Pimon, was to abstract the implementation of layout and arrange code from coordinates and numbers, and take it to a human readable level. Rather than summing up or subtracting X and Y values, when using Pimon, engineers can write code using natural language commands. Or more precise, all the method names of the layouting interface correspond to commands known from vector drawing UIs. Think of the "group / ungroup" button, or of the "align group by center" button, or of the "arrange group with same gap" button.

For example, a tree level is arranged as follows

  TreeLevel >> arrange
    | group |
    group := Group new
        addAll: self treeChildren;
        horizontalWithGap: 4;
    Group new
        add: self treeParent;
        add: group;
        verticalWithGap: 16;
    self resizeToElements. 

Using conventional layout code, the above code would look as follows

  TreeLevel >> arrange
    | x y bottom right parentLeft |
    x := 0.
    y := self treeParent height + 16.
    bottom := self treeParent height.
    self treeChildren do: \[ :each |
        each moveTo: x @ y.
        bottom := bottom max: (y + each height).
        x := x + each width + 4 ].
    right := self treeParent width max: x. 
    parentLeft := (right - self treeParent width) / 2.
    self treeParent moveTo: parentLeft @ 0. 
    self resizeTo: right @ bottom.

The latter implementation might contain a bug – who knows? – unless taking the time to solve a mathematical riddle, it can not be told. Also, coding that mathematical riddle took at least 10 times longer than coding with Pimon...

NB: one bug has already been reported to me, which I fixed in the meantime, but maybe there is more...

Change list

August 20, 2007 — as in HTML 4.1 an element’s title attribute is displayed as tooltip.

August 17, 2007 — featuring DOM Events, Level 2, see Pimon-Event package.


Currently Pimon is at the stage of a prototype, interfaces and protocols may be subject to change. You are kindly invited to check out Pimon and provide me feedback on the current state.

Pimon (including RBPolymetricView) is available at the following Store coordinates

  interface: PostgresSQLEXDIConnection
  environment: db.iam.unibe.ch_scgStore
  user name: storeguest
  password: storeguest
  table owner: BERN

Please contact AA, for questions and feedback.

Last changed by admin on 21 April 2009