Annotation of researchv10dc/vol2/cip/cip.ms, revision 1.1

1.1     ! root        1: .so ../ADM/mac
        !             2: .XX cip 175 "Cip User's Manual"
        !             3: ....TM 82-11276-1 11173 39199-11
        !             4: ....ND March 19, 1982
        !             5: .EQ
        !             6: delim $$
        !             7: .EN
        !             8: .TL
        !             9: Cip User's Manual:
        !            10: .br
        !            11: One Picture is Worth a Thousand Words
        !            12: .AU "MH 2C-510" 7448
        !            13: Sally A. Browning
        !            14: .AI
        !            15: .MH
        !            16: .AB
        !            17: .I Cip
        !            18: is an interactive drawing system for the Blit
        !            19: |reference(locanthi spe blit)
        !            20: bitmap display terminal designed by Bart Locanthi and Robert Pike.  
        !            21: It provides a pallette of 
        !            22: .I pic
        !            23: |reference(latest pic)
        !            24: shapes (box, circle, ellipse, line, arc, spline, and text)
        !            25: for drawing and editing pictures on a screen.  There is a macro
        !            26: facility for treating a collection of drawn shapes as a single entity.
        !            27: The principal
        !            28: input device is a 
        !            29: .I mouse
        !            30: that provides positional information.  It has three buttons that invoke
        !            31: drawing, editing, and command functions.
        !            32: The keyboard is used only for typing in text 
        !            33: strings and filenames.  The pictures are saved as 
        !            34: .I pic
        !            35: descriptions, and can be included with text,
        !            36: tables, and equations as input to 
        !            37: .I troff |reference(latest reference troff).
        !            38: Existing
        !            39: .I pic
        !            40: descriptions of pictures can be displayed and edited as well.  The picture
        !            41: below was drawn with
        !            42: .I cip.  
        !            43: .PS <blit.pic
        !            44: .AE
        !            45: .2C
        !            46: .NH
        !            47: The Screen
        !            48: .PP
        !            49: The screen is divided into three areas.  The pallette of 
        !            50: .I pic 
        !            51: shapes is shown at the top of the screen.  The middle and major part of
        !            52: the screen is the drawing arena. At the bottom of the screen, there is room
        !            53: for typing text strings and error messages, and a 
        !            54: box describing the mouse button functions.  There may be a
        !            55: box showing edit depth:  it appears only when you are editing a macro.
        !            56: Figure 1 shows the screen immediately after
        !            57: .I cip 
        !            58: has been loaded into the Blit.  
        !            59: (Figure 1 was drawn with 
        !            60: .I cip,
        !            61: of course.)
        !            62: .1C
        !            63: .KF
        !            64: .PS <screen.pic
        !            65: .SP 0.2 exactly
        !            66: .ce
        !            67: \f3Figure 1.\fR  The \fIcip\fP screen
        !            68: .KE
        !            69: .2C
        !            70: .PP
        !            71: The drawing area is about 8 inches square.  In the spirit of "what you
        !            72: see is what you get", 
        !            73: .I cip
        !            74: scales the picture to appear on paper as it does on the screen.
        !            75: The exception is text:  the
        !            76: font selection on the Blit
        !            77: is meager compared to the typesetter, and I make
        !            78: no attempt to understand
        !            79: .I troff .*
        !            80: .FS
        !            81: *This paper describes early versions of
        !            82: .I cip .
        !            83: The latest version (3.0) of
        !            84: .I cip ,
        !            85: widely known as
        !            86: .I xcip ,
        !            87: does display and edit text in its
        !            88: correct size and font.
        !            89: .FE
        !            90: Thus,
        !            91: .I eqn
        !            92: and
        !            93: .I troff
        !            94: commands appear
        !            95: literally instead of as they will appear on paper, and all text appears
        !            96: in the same boring font and size.  If you want to shrink the picture after
        !            97: drawing it to fill the screen, you need only change one number in the
        !            98: .I pic
        !            99: description.  This, and other advantages of having a textual description of
        !           100: the picture, are discussed later.
        !           101: ........
        !           102: .NH
        !           103: Using the Mouse
        !           104: .PP
        !           105: The mouse is the primary input device to
        !           106: .I cip.  
        !           107: It is a red hemispheric device that fits comfortably into the
        !           108: palm of your hand, with three fingers positioned on the function 
        !           109: buttons.  The cursor displayed on the screen will move as you move the mouse.
        !           110: The mouse reports 
        !           111: .I relative
        !           112: positions based on the movements of the steel ball in the bottom that moves
        !           113: along the table surface.  If you pick up the mouse and put it down somewhere
        !           114: else without causing the ball to rotate, the cursor won't move.  This feature
        !           115: is handy if you don't have much clear space on your desk.
        !           116: In addition to providing positional information, the mouse has three buttons
        !           117: that represent command functions.  In general, the first (left) button is 
        !           118: used for selection, the second (middle) for drawing and editing shapes,
        !           119: and the third (right) for menu selection.  In each case, both the down and up 
        !           120: motions of the button are significant.  When I describe button motions, I will
        !           121: use 
        !           122: .I push
        !           123: to describe the press and hold action and
        !           124: .I release
        !           125: to mean letting go of the button.  
        !           126: .I Clicking
        !           127: a button means pushing and releasing the button in quick succession.
        !           128: .PP
        !           129: At the bottom of the screen is a box labeled "Mouse Buttons".  It contains
        !           130: three smaller boxes that represent the three buttons on the mouse.  The boxes
        !           131: are labeled to reflect the 
        !           132: .I current
        !           133: set of functions associated with the mouse buttons.  For example,  Figure 1
        !           134: shows the initial set: (select,,menu).  Notice that the second button is
        !           135: meaningless in this state.  The second button invokes actions on a selected
        !           136: object, and thus is meaningful only when something (either a template
        !           137: from the top row of the display or a previously drawn object) has been selected.
        !           138: There are other occasions when the right and left buttons are meaningless, and 
        !           139: even occasions when all of the buttons are ignored.  Table 1 shows the
        !           140: possible button function triples and what states they are associated with.
        !           141: Figure 2 shows the possible transitions between triples of mouse button
        !           142: functions.
        !           143: .PP
        !           144: The mouse button functions are displayed for at least two reasons. First, they
        !           145: make it easier to get acclimated to 
        !           146: .I cip
        !           147: and to using a pointing device as the primary input device.  Second, they
        !           148: help the more experienced user determine the current state.
        !           149: .1C
        !           150: .KF
        !           151: .PS <mouse.pic
        !           152: .RT
        !           153: .SP 0.2 exactly
        !           154: .ce
        !           155: \fBFigure 2.\fR  Transition graph for mouse button functions
        !           156: .TS
        !           157: center box;
        !           158: c | l | l | c | l.
        !           159: State  Button Functions        Menu    Next State      How to Get to Next State
        !           160: =
        !           161: 1      (select,,menu)  command 4       select drawn object (not text or macro)
        !           162: \^     \^      \^      _       _
        !           163: \^     \^      \^      5       select a template
        !           164: \^     \^      \^      _       _
        !           165: \^     \^      \^      6       choose \fBdefine macro\fR
        !           166: \^     \^      \^      _       _
        !           167: \^     \^      \^      7       choose \fBget file\fR or \fBput file\fR
        !           168: _
        !           169: 2      (select,copy,menu)      object  1       select nothing
        !           170: \^     \^      \^      _       _
        !           171: \^     \^      \^      3       select a text string or a macro instance
        !           172: \^     \^      \^      _       _
        !           173: \^     \^      \^      4       select an object (not text or macro)
        !           174: \^     \^      \^      _       _
        !           175: \^     \^      \^      5       select a template
        !           176: _
        !           177: 3      (select,move,menu)      object  1       select nothing
        !           178: \^     \^      \^      _       _
        !           179: \^     \^      \^      2       choose \fBcopy\fR
        !           180: \^     \^      \^      _       _
        !           181: \^     \^      \^      4       select an object (not text or macro)
        !           182: \^     \^      \^      _       _
        !           183: \^     \^      \^      5       select a template
        !           184: _
        !           185: 4      (select,edit,menu)      object  1       select nothing
        !           186: \^     \^      \^      _       _
        !           187: \^     \^      \^      2       choose \fBcopy\fR
        !           188: \^     \^      \^      _       _
        !           189: \^     \^      \^      3       select a text string or a macro instance
        !           190: \^     \^      \^      _       _
        !           191: \^     \^      \^      5       select a template
        !           192: _
        !           193: 5      (select,draw,menu)      command 3       select a text string or a macro instance
        !           194: \^     \^      \^      _       _
        !           195: \^     \^      \^      4       select a drawn object (not text or macro)
        !           196: \^     \^      \^      _       _
        !           197: \^     \^      \^      6       choose \fBget file\fR or \fBput file\fR
        !           198: \^     \^      \^      _       _
        !           199: \^     \^      \^      7       choose \fBget file\fR or \fBput file\fR
        !           200: \^     \^      \^      _       _
        !           201: \^     \^      \^      8       start drawing a spline
        !           202: _
        !           203: 6      (,draw box,)            1       finish drawing box around macro
        !           204: _
        !           205: 7      (,,,)           1       finish reading or writing file
        !           206: \^     \^      \^      _       _
        !           207: \^     \^      \^      5       finish reading or writing file
        !           208: _
        !           209: 8      (,draw,end spline)              5       finish drawing a spline
        !           210: _
        !           211: .TE
        !           212: .SP 0.2 exactly
        !           213: .ce
        !           214: \fBTable 1.\fR  Mouse button functions
        !           215: .KE
        !           216: .2C
        !           217: .NH
        !           218: Selection
        !           219: .PP
        !           220: The leftmost button on the mouse selects either a template from the
        !           221: row at the top of the screen or an object in the drawing arena.  Templates are
        !           222: selected by positioning the cursor inside the box surrounding the desired 
        !           223: shape, and clicking button 1.  The selected shape will be 
        !           224: displayed in reverse video (light on black background) until something 
        !           225: else is selected.  Drawn objects are selected by positioning the cursor within
        !           226: the bounding box of the desired object, and pushing button 1.  The selected 
        !           227: object will vanish as long as the button is held down, reappearing when the
        !           228: button is released.  This vanishing act alerts the user to which object has 
        !           229: been selected.  If it is not the desired one, reposition the mouse and try
        !           230: again.  It may require several attempts to select an object,
        !           231: particularly in an area of the screen that is congested. An object stays
        !           232: selected until either another object or a template is selected.
        !           233: .PP
        !           234: To "unselect" an object, either select a template or move to a blank area of the
        !           235: screen, push button 1 and select nothing.  The unselect was successful if the
        !           236: middle mouse button function is either "draw" or null and the third button
        !           237: function is "menu".  A selected object must be unselected
        !           238: (by selecting either nothing or a template) to invoke the command
        !           239: menu rather than an object menu.  Menus are described next.
        !           240: .NH
        !           241: Menus
        !           242: .PP
        !           243: The right button on the mouse displays menus of commands and
        !           244: refinements.  Before describing the contents of the menus, let me describe 
        !           245: how they work.
        !           246: .PP
        !           247: A menu is displayed at the location of the cursor when button 3 is pushed down.
        !           248: The display is visible as long as the button is held down.  The menu is a list 
        !           249: of words, each representing a command or transformation.  When the menu appears
        !           250: on the screen, one of the entries is highlighted in reverse video.  If button
        !           251: 3 were released, this is the menu item that would be selected.  As the cursor
        !           252: moves up and down in the menu, the highlighted entry changes.  If the cursor
        !           253: moves outside the menu, nothing is highlighted.  The entry that is highlighted 
        !           254: when the third button is released is the chosen one.  (If no item is chosen,
        !           255: nothing happens.  This allows you to leave a menu without choosing an entry.)
        !           256: .PP
        !           257: There are two classes of menus.  The
        !           258: .I 
        !           259: command menu
        !           260: .R
        !           261: appears whenever no drawn object is selected and button 3 is pushed.  It
        !           262: contains commands that affect the whole screen or some part of it, but not
        !           263: a specific single object.  For example, 
        !           264: .B 
        !           265: reverse video
        !           266: .R
        !           267: flips the sense of
        !           268: the screen.  If the screen showed black objects on a light background (the
        !           269: initial state), it will be flipped to show light objects on black.  This
        !           270: entry is a flip flop: selecting it an even number of times is equivalent
        !           271: to not selecting it at all.  Another entry in the command menu is 
        !           272: .B grid.
        !           273: Selecting this entry causes a grid of dots to be displayed on the screen,
        !           274: and future drawing is constrained to the grid points.  The command is also
        !           275: a flip flop: to turn it off, select it again.  Other commands are
        !           276: .B
        !           277: clear screen, redraw screen, define macro, get file, put file,
        !           278: .R 
        !           279: and
        !           280: .B
        !           281: quit. 
        !           282: .R
        !           283: The macro and file
        !           284: commands are described later; the others are self-explanatory.
        !           285: .PP
        !           286: If a drawn object is selected when the menu button is pushed, a menu with
        !           287: entries that in some way transform the selected object is displayed.  The
        !           288: contents of this menu are tailored to the class of object selected.  For
        !           289: example, instances of circles, ellipses, and text can be copied or deleted.
        !           290: Arcs and splines can be copied, deleted, or reflected around either the
        !           291: x or y axis of their bounding box.  Boxes can be copied, deleted, 
        !           292: or have their boundary be dotted, dashed, or solid.  Lines can be copied,
        !           293: deleted, reflected, dotted, dashed, solid, or have an arrowhead attached to
        !           294: the endpoint closest to the cursor.  The arrow 
        !           295: option is a flip flop: if
        !           296: the nearer endpoint already has an arrowhead, selecting 
        !           297: .B arrow
        !           298: again will remove it. Splines can also have arrowheads attached to either or
        !           299: both ends.
        !           300: .PP
        !           301: Remember, if the menu button is depressed accidentally, leave it down long enough
        !           302: to move the cursor outside the menu!
        !           303: .PP
        !           304: Figure 3 shows both command and object menus being used. In the first three
        !           305: frames, the menu associated with splines is displayed and the spline is reflected
        !           306: around the y-axis.  The command menu is invoked in the remaining five frames to
        !           307: get a new file.  The menu is initially displayed with 
        !           308: .B 
        !           309: define macro
        !           310: .R
        !           311: highlighted; the mouse is moved up to select
        !           312: .B
        !           313: get file
        !           314: .R
        !           315: before the third button is released.
        !           316: .1C
        !           317: .KF
        !           318: .sp 1
        !           319: .PS <menus.pic
        !           320: .SP 0.2 exactly
        !           321: .ce
        !           322: \fBFigure 3.\fR  Using menus
        !           323: .KE
        !           324: .2C
        !           325: .NH
        !           326: Drawing
        !           327: .PP
        !           328: The
        !           329: .I pic
        !           330: language can describe and position 
        !           331: circles, boxes (solid, dotted, and dashed), ellipses,
        !           332: lines (solid, dotted, dashed, with or without arrowheads), circular arcs,
        !           333: splines, and text.  In addition, there is a mechanism for treating a
        !           334: .I collection
        !           335: of objects as a single entity, hereafter called a 
        !           336: .B macro.
        !           337: .NH 2
        !           338: Drawing New Shapes
        !           339: .PP
        !           340: There are two ways to draw shapes on the screen.  First, select a template with
        !           341: button 1.
        !           342: Button 2 can be used
        !           343: to draw objects of the selected shape on the screen.  The location and size of
        !           344: the drawn object is determined by the down and up motions of the button.  For
        !           345: example, to draw a circle, select the circle template, move the cursor to the desired position for
        !           346: the 
        !           347: .I center
        !           348: of the circle, and push down on the middle button.  As long the button is
        !           349: depressed, the trial radius of the circle will track the mouse movement:
        !           350: as the mouse moves away from the origin, the circle will expand and
        !           351: vise versa.  When button 2 is released, the circle radius is fixed as
        !           352: the distance between the origin and mouse position. 
        !           353: Table 2 defines the points fixed by button 2 motions for all the
        !           354: shapes.
        !           355: .KF
        !           356: .SP 1
        !           357: .ps -1
        !           358: .vs -1p
        !           359: .TS
        !           360: box center ;
        !           361: c | l | l.
        !           362: Object Push    Release
        !           363: _
        !           364: _
        !           365: circle center  radius = distance(push,release)
        !           366: _
        !           367: box    a corner        opposite corner
        !           368: _
        !           369: ellipse        center  height = $| roman "push" .y - roman "release" .y|$
        !           370:                width = $| roman "push" .x - roman "release" .x|$
        !           371: _
        !           372: line   endpoint        endpoint
        !           373: _
        !           374: arc    endpoint        endpoint
        !           375:                center 
        !           376: _
        !           377: spline endpoint        point
        !           378:                (subsequent releases define
        !           379:                 another point, until button 3)
        !           380: _
        !           381: text   center of
        !           382:        baseline
        !           383: .TE
        !           384: .ps +1
        !           385: .vs +1p
        !           386: .SP 0.2 exactly
        !           387: .ce
        !           388: \fBTable 2.\fR  Using button 2 for drawing shapes
        !           389: .KE
        !           390: .PP
        !           391: Arcs are drawn counter-clockwise.  When an arc is drawn, it will be
        !           392: either one quarter or three quarters of a circle (in imitation of 
        !           393: .I pic
        !           394: defaults).  If you want something else, select and edit the arc once it is 
        !           395: drawn.  The picture below shows the default arcs;  the order that the endpoints
        !           396: are entered determines whether one fourth or three fourths of a circle is 
        !           397: drawn.
        !           398: .KS
        !           399: .PS <arcs.pic
        !           400: .KE
        !           401: .PP
        !           402: Two of the shapes, splines and text, require a few more words to explain
        !           403: how to draw them.  Splines are curves that
        !           404: shape themselves to a framework of line segments and are drawn with repetitive
        !           405: pushes of the middle button.
        !           406: Each click adds a line segment to the framework of the spline.  
        !           407: .I Pic ,
        !           408: and thus
        !           409: .I cip ,
        !           410: splines will contain the first and last points entered and will be tangent to
        !           411: the midpoint of
        !           412: each line segment in the framework.  The spline will be 
        !           413: .I near 
        !           414: the endpoints of each line segment.
        !           415: Only the framework is shown on the screen while you are entering the spline.
        !           416: To terminate and draw the spline, push the third button.  Figure 4 shows the process
        !           417: of drawing a spline.
        !           418: .1C
        !           419: .KF
        !           420: .PS <spline.pic
        !           421: .SP 0.2 exactly
        !           422: .ce
        !           423: \fBFigure 4.\fR  Drawing a spline
        !           424: .KE
        !           425: .2C
        !           426: .PP
        !           427: To add some text to the picture, move to the desired position for the
        !           428: .I center
        !           429: of the text string
        !           430: and push and release button 2.  Now type the text.  It will
        !           431: appear on the lower left portion of the screen, just below the drawing arena.
        !           432: The backspace key can be used to make minor corrections.  As soon as, and
        !           433: not until, you push carriage return, the string will be displayed in the
        !           434: drawing arena, centered at the selected location.  Figure 5 pictures the
        !           435: stages of drawing text.*
        !           436: .FS
        !           437: *At least, in older versions of
        !           438: .I cip .
        !           439: In version 3.0, text appears as you type it.
        !           440: .FE
        !           441: .1C
        !           442: .KF
        !           443: .PS <text.pic
        !           444: .SP 0.2 exactly
        !           445: .ce
        !           446: \fBFigure 5.\fR  Drawing text
        !           447: .KE
        !           448: .2C
        !           449: .NH 2
        !           450: Copying Existing Shapes
        !           451: .PP
        !           452: The second way to draw shapes on the screen is by copying previously drawn
        !           453: things.  First use button 1 to select a specific drawn object
        !           454: rather than a template.  
        !           455: Then push button 3 to get a menu pertinent to the selected object.
        !           456: Select the menu entry
        !           457: .B copy.  
        !           458: Now, button 2 can be used to position exact copies of
        !           459: the selected object.  The
        !           460: .I origin
        !           461: of the object (see Table 3) will be located at the cursor position when
        !           462: button 2 is pushed.  In this case, the release of button 2 is necessary but
        !           463: meaningless.
        !           464: .KF
        !           465: .SP
        !           466: .TS
        !           467: center allbox;
        !           468: c l.
        !           469: Object Origin
        !           470: _
        !           471: circle center  
        !           472: box    upper left corner
        !           473: ellipse        center  
        !           474: line   first drawn point
        !           475: arc    first drawn point
        !           476: spline first drawn point
        !           477: text   center of baseline
        !           478: macro  upper left corner
        !           479: .TE
        !           480: .SP 0.2 exactly
        !           481: .ce
        !           482: \fBTable 3.\fR  The origins of objects 
        !           483: .KE
        !           484: .NH 2
        !           485: Alignment Aids
        !           486: .PP
        !           487: .I Cip
        !           488: has a few features built in to make positioning objects easier.  First, lines
        !           489: that are drawn 
        !           490: .I nearly
        !           491: horizontal or vertical will be made exactly so.  Also, each of the basic shapes
        !           492: has a number of points designated 
        !           493: .I sticky.
        !           494: As you move the cursor near these special points, it will tend to stick to them
        !           495: until you move sufficiently far away.  Figure 6 shows the sticky points for 
        !           496: each shape.  The corners of the 
        !           497: .I
        !           498: bounding box
        !           499: .R
        !           500: of a macro instance are sticky as well.  
        !           501: The final alignment aid is the grid.  When the grid is turned on, drawn
        !           502: objects will rachet from grid point to grid point as you move the cursor.
        !           503: The cursor is prejudiced in favor of sticky points: it will move to the
        !           504: nearest grid point only when there is no close sticky point.
        !           505: .1C
        !           506: .KF
        !           507: .PS <sticky.pic
        !           508: .SP 0.2 exactly
        !           509: .ce
        !           510: \fBFigure 6.\fR  Sticky points
        !           511: .KE
        !           512: .2C
        !           513: .NH
        !           514: Editing
        !           515: .PP
        !           516: The editing facilities of
        !           517: .I cip
        !           518: allow both the position and size of previously drawn objects to be changed.  The
        !           519: basic mechanism is to 
        !           520: .I select
        !           521: the object with button 1, and then use button 2 for the actual editing.  The
        !           522: position of the cursor when button 2 is depressed and the shape of the selected 
        !           523: object determine the editing action.  For example, suppose a circle
        !           524: has been selected.  If the cursor is near the origin of the circle when
        !           525: the middle button is pushed, the origin of the circle will track the cursor
        !           526: as long as the button is depressed.  Its new location will be the cursor 
        !           527: position when the button is released, and the radius will be unchanged.
        !           528: If, instead, the cursor is near the edge of the circle when the middle button 
        !           529: is depressed,  the center of the circle will remain fixed, and the radius of
        !           530: the circle will track the cursor.  The other objects are edited in the same 
        !           531: manner:  near the center moves the object, near the edge (or corner, or
        !           532: endpoint) changes the size, with the exception of arcs, splines, text, and macros.
        !           533: .PP
        !           534: Arcs have three interesting points: the two endpoints, and the center of
        !           535: the circle that contains the arc.  The point nearest the cursor when
        !           536: button 2 is depressed will track the cursor.  (There is no way to 
        !           537: reposition the arc.)  This includes the center of the circle, which is shown
        !           538: with a pair of lines when the arc is selected.
        !           539: .PP
        !           540: Splines have a variable number of 
        !           541: .I 
        !           542: guiding points
        !           543: .R
        !           544: that can be changed.  Lines between the
        !           545: guiding points are drawn to help in locating them when the spline is selected.
        !           546: The point
        !           547: nearest the cursor when the middle button is depressed will track the mouse 
        !           548: motions, becoming fixed at the cursor position when the button is released.
        !           549: Again, there is no way to move the whole spline.  
        !           550: .PP
        !           551: It doesn't make sense in 
        !           552: .I cip's
        !           553: world to change the size of text.  Accordingly, it can only be moved.  After
        !           554: the text is selected and button 2 is pushed, the text string will track
        !           555: the cursor, coming to rest when the button is released. 
        !           556: The
        !           557: .I contents
        !           558: of a text string are changed by deleting the string and re-entering it 
        !           559: correctly.*
        !           560: .FS
        !           561: *In version 3.0, the size, font, vertical spacing and adjustment
        !           562: (left justified, right justified or centered) can be changed from the button 3 menu.
        !           563: .FE
        !           564: .PP
        !           565: Macro editing is more complex.  An instance of a macro can be repositioned
        !           566: by selecting the instance and pushing the second button.  The entire macro
        !           567: will track the mouse movements until the button is released.  Changing the
        !           568: .I components
        !           569: of the macro will be discussed in the next section.
        !           570: .PP
        !           571: The editing facilities of 
        !           572: .I cip
        !           573: are summarized below.  Figure 7 shows the process of editing
        !           574: a spline; the technique is similar for all simple shapes.
        !           575: .KS
        !           576: .PS
        !           577: scale=100
        !           578: box ht 40 wid 60 with .nw at 70,650 dashed
        !           579: box ht 80 wid 120 with .nw at 40,670 
        !           580: box ht 40 wid 60 with .nw at 10,610 dotted
        !           581: box ht 40 wid 60 with .nw at 10,690 dotted
        !           582: box ht 40 wid 60 with .nw at 130,690 dotted
        !           583: box ht 40 wid 60 with .nw at 130,610 dotted
        !           584: .PE
        !           585: .KE
        !           586: .de XY
        !           587: .ti 0
        !           588: ..
        !           589: .de XX
        !           590: .br
        !           591: ..
        !           592: .in 5n
        !           593: .XY
        !           594: To edit solid box:
        !           595: .XX
        !           596: a) cursor inside a dotted box: move corner
        !           597: .XX
        !           598: b) cursor inside dashed box: move box
        !           599: .KS
        !           600: .PS
        !           601: scale=100
        !           602: circle rad 29 at 96,458
        !           603: circle rad 65 at 96,458
        !           604: .PE
        !           605: .KE
        !           606: .XY
        !           607: To edit outer circle:
        !           608: .XX
        !           609: a) cursor inside inner circle: move circle
        !           610: .XX
        !           611: b) cursor in ring between circles: change radius
        !           612: .KS
        !           613: .PS
        !           614: scale=100
        !           615: ellipse ht 120 wid 216 at 116,257
        !           616: box ht 51 wid 65 with .nw at 6,283 dotted
        !           617: box ht 51 wid 65 with .nw at 161,283 dotted
        !           618: box ht 36 wid 90 with .nw at 71,232 dashed
        !           619: box ht 36 wid 90 with .nw at 71,319 dashed
        !           620: .PE
        !           621: .KE
        !           622: .XY
        !           623: To edit ellipse:
        !           624: .XX
        !           625: a) cursor in a dashed box: change height
        !           626: .XX
        !           627: b) cursor in a dotted box: change width
        !           628: .XX
        !           629: c) cursor anywhere else in ellipse: move ellipse
        !           630: .KS
        !           631: .PS
        !           632: scale=100
        !           633: line  from 104,0 to 0,60 dotted
        !           634: line  from 104,119 to 209,60 dotted
        !           635: line  from 0,0 to 209,119 
        !           636: box ht 119 wid 209 with .nw at 0,119 dotted
        !           637: .PE
        !           638: .KE
        !           639: .XY
        !           640: To edit solid line:
        !           641: .XX
        !           642: a) cursor in the dotted box and between the dotted lines: move line
        !           643: .XX
        !           644: b) cursor in a dotted triangle: move endpoint
        !           645: .KS
        !           646: .PS
        !           647: scale=100
        !           648: box ht 128 wid 128 with .nw at 20,702 dashed
        !           649: line  from 84,574 to 84,606 dashed
        !           650: line  from 84,670 to 84,702 dashed
        !           651: circle rad 32 at 84,638
        !           652: line  from 129,683 to 84,638 dotted
        !           653: line  from 39,683 to 84,638 dotted
        !           654: arc from 129,683 to 39,683 at 84,638
        !           655: .PE
        !           656: .KE
        !           657: .XY
        !           658: To edit arc:  (dotted lines appear (solid) when arc is selected)
        !           659: .XX
        !           660: a) cursor inside circle: move origin
        !           661: .XX
        !           662: b) cursor outside circle, inside left dashed box: move endpoint
        !           663: .XX
        !           664: c) cursor outside circle, inside right dashed box: move startpoint
        !           665: .XX
        !           666: .KS
        !           667: .PS
        !           668: scale=100
        !           669: box ht 173 wid 179 with .nw at 0,485 dotted
        !           670: line  from 179,372 to 104,355 dotted
        !           671: line  from 98,338 to 104,355 dotted
        !           672: line  from 148,448 to 74,410 dotted
        !           673: line  from 179,464 to 148,448 dotted
        !           674: line  from 80,453 to 64,428 dotted
        !           675: line  from 64,428 to 7,424 dotted
        !           676: line  from 93,485 to 80,453 dotted
        !           677: line  from 85,391 to 104,355 dotted
        !           678: line  from 64,428 to 85,391 dotted
        !           679: line  from 85,312 to 98,338 dotted
        !           680: line  from 0,485 to 140,475 dashed
        !           681: line  from 170,417 to 0,485 dashed
        !           682: line  from 13,369 to 179,312 dashed
        !           683: line  from 170,417 to 13,369 dashed
        !           684: spline from 140,475\
        !           685: to 0,485\
        !           686: to 170,417\
        !           687: to 13,369\
        !           688: to 179,312
        !           689: "\(bu" at 0,485
        !           690: "\(bu" at 179,312
        !           691: "\(bu" at 13,369
        !           692: "\(bu" at 170,417
        !           693: "\(bu" at 140,475
        !           694: .PE
        !           695: .KE
        !           696: .XY
        !           697: To edit spline:  (dashed lines appear (solid) when spline is selected)
        !           698: .XX
        !           699: a) cursor inside a dotted region: move guiding point (large dot)
        !           700: .KS
        !           701: .PS
        !           702: scale=100
        !           703: box ht 18 wid 92 with .nw at 36,254 dotted
        !           704: "Text String" at 79,241
        !           705: .PE
        !           706: .KE
        !           707: .XY
        !           708: To edit text:
        !           709: .XX
        !           710: a) cursor anywhere: move text
        !           711: (To change the contents of the string, delete it
        !           712: and re-type it correctly.)*
        !           713: .FS
        !           714: *In version 3.0, you can change the point size, vertical spacing,
        !           715: font and adjustment of text from the menu.
        !           716: .FE
        !           717: .KS
        !           718: .PS
        !           719: scale=100
        !           720: box ht 130 wid 139 with .nw at 19,130 dotted
        !           721: line  from 58,71 to 92,96 
        !           722: line  from 92,96 to 123,73 
        !           723: line  from 43,32 to 58,51 
        !           724: line  from 58,51 to 71,32 
        !           725: line  from 110,33 to 123,53 
        !           726: line  from 123,53 to 138,34 
        !           727: circle rad 10 at 92,106
        !           728: circle rad 10 at 58,61
        !           729: circle rad 10 at 123,63
        !           730: circle rad 10 at 43,22
        !           731: circle rad 10 at 71,22
        !           732: circle rad 10 at 110,23
        !           733: circle rad 10 at 138,24
        !           734: .PE
        !           735: .KE
        !           736: .XY
        !           737: To move an instance of a macro:
        !           738: .XX
        !           739: a) cursor anywhere: move macro
        !           740: .br
        !           741: (Changing the components of a macro is discussed elsewhere)
        !           742: .in 0
        !           743: .1C
        !           744: .KF
        !           745: .PS <editSpline.pic
        !           746: .SP 0.2 exactly
        !           747: .ce
        !           748: \fBFigure 7.\fR  Editing a spline
        !           749: .KE
        !           750: .2C
        !           751: .NH
        !           752: Macros
        !           753: .PP
        !           754: .I Cip
        !           755: has a macro facility that allows objects to be grouped together and treated 
        !           756: as a single entity.  The aggregate can be moved, reflected, copied, or deleted.
        !           757: In addition, components of the macro can be modified, deleted, or added.  
        !           758: Changes made to the components will be reflected in
        !           759: .I all
        !           760: instances of the macro, except those that have been reflected.
        !           761: .PP
        !           762: A group of objects is collected into a macro by selecting the 
        !           763: .B
        !           764: define macro
        !           765: .R
        !           766: option in the command menu.  A bounding box is drawn around the desired
        !           767: objects using button 2.  Any object that is completely contained in the 
        !           768: bounding box will be included in the aggregate.
        !           769: .PP
        !           770: Once the definition is complete, the macro instance can be selected in the 
        !           771: usual manner.
        !           772: The object menu for macros has entries for deleting, copying, and reflecting
        !           773: the macro instance.  It can be repositioned by holding the middle button down.
        !           774: The center of the bounding box will track the cursor until the button is
        !           775: released.
        !           776: .PP
        !           777: The macro object menu has a fifth entry that allows the components of the
        !           778: macro to be modified, deleted, or added.  Selection, drawing, editing, and
        !           779: menus work exactly as described before except that they operate within
        !           780: the context of the macro.  When editing begins, a small box appears on the 
        !           781: screen to the left of the Mouse Buttons box.  It shows the current depth of
        !           782: macro editing.  (Yes, Virginia, macros can be nested.)  To terminate the
        !           783: editing, move the cursor inside the Edit Depth box and click the
        !           784: selection button, decrementing the depth count.  When the
        !           785: count goes to zero, the screen will be redrawn to reflect the changes.  
        !           786: Modifications to macros affect
        !           787: .I all
        !           788: instances of the macro.
        !           789: .PP
        !           790: Detail can be added to a single instance of a macro by drawing 
        !           791: over it.  Components of an individual
        !           792: instance cannot be deleted or modified without changing all instances.
        !           793: .PP
        !           794: Suppose you define a macro that contains a circle in a box.  After
        !           795: replicating it several times, you decide that one instance should not
        !           796: have the circle.  The sixth entry in the macro menu,
        !           797: .B separate,
        !           798: will separate the aggregate back into individual objects.  That is, for a 
        !           799: .I 
        !           800: selected instance
        !           801: .R
        !           802: of a macro, the 
        !           803: .B
        !           804: define macro
        !           805: .R 
        !           806: operation will be undone.  Now you can select the offending circle and 
        !           807: delete it without changing the other instances of the macro.  However, 
        !           808: changes made to the macro will no longer affect the separated objects.
        !           809: .NH
        !           810: Saving Pictures
        !           811: .PP
        !           812: The command menu has two entries that involve file operations.
        !           813: .B
        !           814: Put file
        !           815: .R 
        !           816: converts the picture on the screen into 
        !           817: .I pic
        !           818: and saves it in a file on the host machine. Similarly,
        !           819: .B
        !           820: get file
        !           821: .R
        !           822: reads a file, presumed to be 
        !           823: .I pic,
        !           824: and draws the resulting picture on the screen.  Both commands ask for a
        !           825: file name: the prompt
        !           826: .CW FILE?
        !           827: appears in the lower left part of the screen,
        !           828: just below the drawing arena (see Figure 3g).  
        !           829: The filename from the previous get or put
        !           830: command will be automatically displayed to reduce the amount of typing 
        !           831: necessary.  Typing <CR> (carriage return) uses the default filename.
        !           832: .PP
        !           833: There are four error conditions that may arise following a file operation.
        !           834: Attempts to put a file are the least error prone:  the only error,
        !           835: besides the host being down, is that you don't have the right to
        !           836: write the file in question.  Get file commands are subject to
        !           837: errors involving access rights to the file, problems opening a pipe to 
        !           838: parse the pic, and having a picture that is too
        !           839: complicated to fit within the available memory of the Blit.
        !           840: Errors are reported in the lower left portion of the screen, just below
        !           841: the drawing arena.
        !           842: .NH
        !           843: Commentary
        !           844: .PP
        !           845: .I Cip
        !           846: grew out of my experience with 
        !           847: .I pic.  
        !           848: It is wonderful to be able to describe and draw pictures that can included
        !           849: right along with text in a document.  However, words are not always the 
        !           850: best form of expression.  It is easy to spend an afternoon 
        !           851: turning a five minute sketch into a 
        !           852: .I pic 
        !           853: description.  
        !           854: .I Cip
        !           855: allows you to do the sketch online and get the 
        !           856: .I pic 
        !           857: description as a bonus.
        !           858: .PP
        !           859: I have put most of my efforts into the user interface.  There is a minimum of
        !           860: typing: only file names and text strings are entered from the keyboard.  There
        !           861: are alignment aids: sticky points, help with vertical and horizontal lines,
        !           862: and a grid option.  The current meaning of the mouse buttons is displayed.
        !           863: Only use will tell if these aids are enough.
        !           864: .PP 
        !           865: Before going on to a discussion of the limitations of 
        !           866: .I cip,
        !           867: let me mention a 
        !           868: .I good
        !           869: thing about saving the picture as readable text.  The 
        !           870: .I pic
        !           871: produced by 
        !           872: .I cip
        !           873: is full of numbers, including the line
        !           874: .CW scale=100 .
        !           875: The resolution on the Blit 
        !           876: is 100 pixels/inch, and this command is necessary for the picture
        !           877: to be the same size on both the screen and a piece of paper.  
        !           878: Thus, the size of the picture can be changed 
        !           879: by changing the scale.  For example, all of the miniature 
        !           880: .I cip
        !           881: screens that appear in this document originated from the big version in
        !           882: Figure 1.  The screens in Figures 3, 4, 5, and 7 were created with
        !           883: .CW scale=300
        !           884: and are roughly one ninth the size of the original; the one
        !           885: on the cover page had
        !           886: .CW scale=450 .
        !           887: Ragged edges and small imperfections
        !           888: in the picture can be removed by twiddling the position and size of
        !           889: objects.  One common way to use 
        !           890: .I cip
        !           891: is to draw a rough version on the screen, and refine it by using a 
        !           892: combination of 
        !           893: .I cip
        !           894: editing and 
        !           895: .I pic
        !           896: editing.
        !           897: .PP
        !           898: .I Cip
        !           899: resides almost entirely in the Blit.
        !           900: (Implementations also exist for the DMD5620 and 630MTG terminals.)
        !           901: The host machine provides
        !           902: the file system and parses
        !           903: .I pic; 
        !           904: everything else is done in the terminal.  While this approach is
        !           905: not subject to the delays in response time that plague timesharing users,
        !           906: it does require a large program (50K bytes) to be downloaded into the
        !           907: terminal through a serial connection.  It should be interesting to compare this
        !           908: approach to one in which the major part of the program runs in the host, with 
        !           909: the terminal providing only the graphic support.
        !           910: .PP
        !           911: There are some things that can be expressed in a textual language like 
        !           912: .I pic
        !           913: that are difficult to describe graphically.  Examples are relationships between
        !           914: objects (text centered in a box that is somehow part of the box and should 
        !           915: move with it), shortening a line between two circles by the radius of the 
        !           916: circle, naming objects and referring to them.  Ivan Sutherland's thesis,
        !           917: Sketchpad|reference(sutherland sketchpad)
        !           918: dealt with the problem of expressing constraints between objects; his techniques
        !           919: will be incorporated into 
        !           920: .I cip
        !           921: at some point in the future.
        !           922: .PP
        !           923: Adding functionality to 
        !           924: .I cip
        !           925: is constrained by having 
        !           926: .I pic 
        !           927: as the output form. 
        !           928: Potentially interesting extensions like arbitrary rotation of objects,
        !           929: shapes that are solid or shaded rather than outlined, shapes that
        !           930: obscure things that are behind them, and so on, are ruled out
        !           931: because they cannot be described in 
        !           932: .I pic.
        !           933: Chris Van Wyk's 
        !           934: .I ideal |reference(latest ideal)
        !           935: .I does
        !           936: allow these extensions.  It might be interesting to do a drawing system
        !           937: for it.
        !           938: .PP
        !           939: Brian Kernighan, in addition to his role as 
        !           940: .I pic
        !           941: oracle, provided the program that runs on the host, parses 
        !           942: .I pic
        !           943: files, and sends a simplified form of the picture to the Blit.
        !           944: Bart Locanthi and Rob Pike built the Blit 
        !           945: and wrote the graphics support and file system access routines.  And finally,
        !           946: my first and most enthusiastic user was Norm Schryer.  My thanks to them all.
        !           947: .NH 1
        !           948: References
        !           949: .LP
        !           950: |reference_placement

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.