1May 85: 2 3"solid" is now a valid (though uninteresting) attribute. 4 5Mar 85: 6 7Limited amount of point arithmetic: 8 point +/- point 9works 10 11Dec, 1984: 12 13reset varlist 14 resets built-in variables in list to default values. 15 empty list resets everything. 16 17sprintf("format", exprlist) 18 returns a text string suitable for use anywhere "..." 19 can be used. 20 21sh X anything X 22 passes "anything" to a shell for execution after 23 replacing any defined terms in it. 24 25Nov, 1984: 26 27line expr and move expr are treated as line/move by expr 28in current direction. 29 30The -D option has been rendered obsolete -- all output is 31produced with \D commands. The -T option is also 32meaningless -- the output is independent of typesetter. 33 34A new variable "arrowhead" controls printing of arrowheads, 35by defining the number of lines printed in a little fan. 36Default is 2; values around 7 give a filled-in head; 37other values are basically worthless. Arrowheads on arcs 38are now tilted somewhat in an attempt to improve their 39appearance. 40 41"undef foo" removes the definition of foo. 42 43July 1984: 44 45The functions log, exp (both base 10), sqrt, sin, cos, atan2(,), 46max, min (2 arguments only), int, and rand (which returns a 47float random on [0,1)) are now available, stolen directly 48from grap. 49 50Added copy, for and if from grap: 51 copy "file" 52 copy "file" thru X macro body X 53 copy thru X macro X [until "str"] 54 for var = expr to expr [by expr] do X anything X 55 if expr then X anything [else X anything X] 56 57In a copy, any .PS or .PE is discarded [sic], so copied files 58can be nested without editing. .PS <file still works 59but its use is discouraged. 60 61In an if, you can also test "string1" == "string2" or 62"string1" != "string2" 63 64The text primitive is now more systematic: 65"..." ".." "." makes an invisible object with 66properties much like a box. Height and width 67are settable: explicit ht and wid modifiers 68affect a specific instance; variables textht 69and textwid affect all subsequent occurrences. 70"textht" is the height of one line, so the height 71of n strings is n*textht. 72 73Added code from Eric Grosse to correctly compute bounding 74box for arcs. Also defined corners for arcs as same as 75corresponding circle, an idea due to Tom Cargill. 76 77Limits on text strings, attributes and objects grow until 78memory limit reached. 79 80Permits E format on input numbers. 81 82Output produced in inches, not units, so somewhat more 83typesetter-independent. The environment variable TYPESETTER 84is examined. 85 86Saves and restores fill state around .PS/.PE. 87 88.PS wid ht 89can be used to set width and height separately for picture; 90default ht is to scale in same proportion as width (as before). 91 92 93Dec 10/81: 94 95The "scale = ..." construction has been reinstated: 96if 97 scale = 100 98or some such appears in a picture, all numbers in that 99and subsequent pictures will be scaled by 1/100. 100Default scale is 1.0. 101 102Oct 8/81: 103 104I have finally installed sensible floating-point 105numbers in pic. This means that the trailing "i", 106as in 1.25i, is no longer necessary: all numbers 107are taken to be in inches. 108Furthermore, expressions may now use numbers like 1091.25 instead of circumlocutions like 5/4. 110It is now best to enter dimensions and positions simply 111in terms of inches, as in "box at 1,2" instead of in terms 112of internal units (which used to be "box at 200,400"). 113Internal units are no longer used. 114 115I will be glad to assist with conversion if necessary; 116opic will remain around for a while too. 117 118New May, 1981: 119 1200. Diagnostics: 121 Error reporting is better; error location is marked 122 with a ^ at the point in the input where the error was detected; 123 line numbers are more accurate when define's are used. 124 1251. Shorthand for points 126 ( place1 , place2 ) now refers to the point ( place1.x, place2.y ), 127 as it does in i. 128 1292. Blocks 130 Any sequence of pic statements may be enclosed in [...] to form 131 a block, which can be positioned rather like an ordinary box. 132 Typical constructions look like 133 box ... 134 [ box; circle; arrow; whatever ] with .ne at last box.sw 135 move to top of 2nd last [] 136 "last"-type constructs treat blocks as a unit and don't look 137 inside for objects. Blocks have the same compass corners as 138 boxes (determined by the bounding box); in addition it is 139 possible to position them by placing either an absolute 140 coordinate (like 0,0) or an internal label (like A) at some 141 external point. Thus: 142 [ ...; A: ...; ... ] with .A at ... 143 You can use "last []" just like "last box". 144 Blocks join with other things like boxes do (i.e., at the 145 center of the appropriate side). It's not clear that this 146 is the right thing to do, so it may change. 147 148 Names of variables and places within a block are local 149 to that block, and thus do not affect variables and places 150 of the same name outside. You can get at the internal 151 place names with constructs like 152 last [].A 153 or 154 B.A 155 where B is a name attached to a block like so: 156 B : [ ... ; A: ...; ] 157 158 When combined with define statements, blocks provide 159 a reasonable simulation of a procedure mechanism. 160 161 Blocks nest, but the code is shaky; let me know if 162 something suspicious happens. 163 It is currently possible to look only one level deep 164 with constructs like B.A, although A may be 165 further qualified (i.e., B.A.sw or "top of B.A" are legal). 166 1673. Flyback 168 If .PF is used instead of .PE, the position after printing is 169 restored to where it was before the picture started. 170 ("F" is for "flyback".) 171 1724. "Between" positions 173 It is now possible to specify a position somewhere between two 174 other positions either by the phrase 175 expr of the way between position1 and position2 176 or by the notation 177 expr <position1, position2> 178 where expr is some number like 0.3333 and the positions are anything 179 like corners, labels, etc. The result is a new position which is 180 "expr" of the way along a line from position1 to position2. Naturally 181 expr can be bigger than 1 or negative. "of the way" is optional. 182 183 184These are changes since the TM was issued in June, 1980: 185 186.PS <file 187 causes input to come from "file". 188 the .PS evaporates, so "file" has to 189 have balanced .PS/.PE pairs. 190 191splines are here. To get smooth curves, 192 "spline" followed by a set of up, down, from, to, etc. 193 causes a B-spline to be drawn using the specified 194 points to guide it. the word "then" can be stuck 195 in to separate unrelated groups of relative motions. 196 Arrows can go on either end. 197 E.g., spline from 10,20 up 30 right 40 then left 50 then \ 198 down 20 to 100,200 to 300,350 -> 199 200Lines have been generalized somewhat, so you can use the same 201 construct as for splines, to specify a path rather than 202 just a single segment. 203 204 205