zzShow-D10
=== 15.02.23
SHOWING ZZSTRUCTURES: the different methods
Theodor Holm Nelson
Founding Designer, Project Xanadu
Note: ZigZag® is a registered trademark of Project Xanadu.
ZigZag data-- the hypergrid, or zzstructure--
is composed of intersecting lists,
best shown at right angles to each other.
While this can be used to represent rectangular
spreadsheets and database,
it can also represent highly irregular
and changing structures of any kind.
The user's universe will consist of many lists
in a variety of listing directions.
Few of these can be shown at once,
but the user can explore to see any aspects
and parts of the universe.
That's what zzviews are for.
=== ZZVIEWS
There is no fixed view of a zzstructure,
as there is for spreadsheet or text.
A ZigZag view shows a subset of the user's universe
that follows particular connections,
showing particular cells and the respective
connections between them.
We may show the cells
up against one another,
or with connecting lines or pipes,
which is harder.
Many views are possible, any views are legitimate.
Each view is an algorithm that follows
a different plan.
Each view, and its stepping pattern,
may present an entirely
different view of the zzstructure.
A view is pursued by a view routine,
stepping along connections to find the
appropriate cells to show,
and showing the connections between them.
Different views may be very different,
since each follows different refreshment paths
through the conglomerate of zzstructure.
So far the most popular views have been
- row and column (in the first version, Azz),
and adapted into Gzz
- quad-- in the first version, Azz,
contents were shown in the lower right
quadrant of the screen--
in Gzz, "Quad" just became a big rectangle
in the lower right
Gzz added additional views--
- vanishing
- stretchvanishing
- compass [all connections to a given cell]
- sundew and mindsundew (useless but lovely)
and many more.
=== SWORFING
For the user's sense of continuity,
with every step and change
the user must see the cells
move to their new positions and views.
We call this SWORFING
(swooping + morphing--
in a swoop, the external points change;
in a morph, the internal points change).
=== VIEW RASTERS-- STEPPING PATTERNS
Typically a view starts at a particular cell
and scans outward along the connections
in a particular stepping pattern.
(This is called a view raster,
in honor of the scanning raster
of old television.)
Most stepping patterns so far move outward
from a cursor;
we may call these OUTWARD rasters,
since they start at one cell and move
outward selectively.
(However, views could do other things
than refresh outward--
for instance, find a path from one cell
to a particular other cell.
But we will only discuss outward view rasters
here.)
EXAMPLE: the stepping pattern for rows--
i.e., the view raster routine for rows--
is given at the end.
=== DIFFERENT KINDS OF SCREENS
There are basically four kinds of screen display,
each adaptable to
different ZigZag viewing methods.
0. COMMAND LINE VIEWS (for debugging)
As the most rudimentary view,
we may ask on a command line
for an enumeration of the cells
in a row or column.
Command lines may call up individual
rows or columns to be displayed in the
terminal window.
This is not a useful view for users,
but provides a debugging method.
= 1. CHARACTER SCREENS
Views where cells don't overlap
are the simplest.
Character screens, with a fixed number
of positions, may be used for zzviews
where cells don't overlap. These views are--
Row
Column
Quad
The first ZigZag system, Azz, used
very basic character screen routines
(the Curses library) to show row, column and
quad views.
= 2. BITMAP SCREENS
Two-dimensional views with cell overlap
need bitmap screens.
Bitmap screens can show views with
overlapping cells and even animation
(as in Gzz), but it takes a lot of work.
= DELIVERING A 2D VIEWMAP
To put a 2D view on the screen,
the view routine must step to each cell
defined in the stepping pattern,
and map where it will go in the final picture--
its position and size.
The resulting structure is a VIEWMAP,
LAYOUT or DISPLAY LIST.
(See "Display List" on Wikipedia.)
= SWORFING TO THE NEXT ARRANGEMENT IN 2D
Immediately with each user operation
(including a change of view),
each cell and connector must move to its new position.
This is done by calculating the next view
and comparing it to the current view,
tweening all the significant coordinates
to that next view.
- all coordinates for the present flotons are noted
- the next operation is secretly calculated
- the resulting view, and coordinates of each floton, are secretly calculated--
-- the calculation is front-to-back but the presentation is back-to-front
NOW ALL TRANSITIONS ARE ENACTED
BY SIMULTANEOUS TWEENING.
The hard part is connecting
each of the cells in the old view to the new.
=== 3. THREE-DIMENSIONAL SCREENS
A three-dimensional system
-- OpenGL, WebGL, DirectX, etc.--
can show the hypergrid nicely.
= EXAMPLE:
XanaduSpace is built on ZigZag internals.
We may view that zzstructure through one of the
XanaduSpace views. That view shows the zzstructure
as adjacent blocks piled on each other.
(A better view would show connectors as well.)
Three dimensions require something very like
the 2D viewmap, but now representing
each flying object (floton) and its position.
In this case the view routine must pursue
the raster and generate 3D positions for each cell.
This viewmap-- now representing a 3D truss--
is delivered as a list of flotons (floating entities)--
- cells
- their coordinates, angles, etc.
- rods or pipes of connection (if included)
= DELIVERING A 3D VIEWMAP / DISPLAYLIST
As in 2D, the 3D view routine must step to each cell
defined in the stepping pattern,
and map where it will go in the final picture--
its position and size.
The resulting structure is a VIEWMAP, LAYOUT
or DISPLAY LIST.
= SWORFING TO THE NEXT ARRANGEMENT IN 3D
Immediately with each user operation
(including a change of view),
each cell and rod must move to its new position.
This is done by calculating the next view
and tweening the significant coordinates
to that next view.
- all coordinates for the present flotons are noted
- the next operation is secretly calculated
- the resulting view, and coordinates of each floton, are secretly calculated,
AND PUT INTO ZZSTRUCTURE.
This display list of zzstructure is conveyed to the 3D system.
The new coordinates are tweened from the old.
The hard part, as in 2D, is connecting
each of the cells in the old view to the new.
=== === === END OF PIECE
=== ALGORITHM FOR ROW VIEW
Starting at the cursor, show the current row
Go up one cell from the cursor (if possible) and show that row
Repeat to top of screen
Starting again at the cursor
go down one cell and show the current row
repeat to bottom of screen
=30=
span: