%!PS-Adobe-2.0 %%DocumentFonts: Times-Roman %%Creator: Axiom %%CreationDate: today %%Pages: 1 %%processing (hard) limit: 250 pts or 500 values for the operand stack. %%EndComments %------------------------------- prologue -------------------------------% %-------------------------- support procedures --------------------------% %--------- first create user dictionary with 100 entries max ------------% % (number can be changed to accomodate definitions) % 100 dict begin %% using 100 entries in top level dictionary /FontHeight 12 def /inch { 72 mul } def % yVal and hVal are necessary because the Xwindow display origin % is at the upper left corner, while the postscript display % origin is at the lower left hand corner. /yVal %% get Y value -- make upper left corner origin { maxY sub abs } %% maxY is viewWindow height def /hVal %% get H value -- used for displaying title text { maxH sub abs } %% maxH is viewWindow height+titleWindow height def % loads in the font /loadFont { /Times-Roman findfont FontHeight scalefont setfont } def % draws a rectangle with input operand: % height % width % notice that this function does not "draw" or ink the rectangle. /drawRect { 1 index 1 add 0 rlineto %% draw first side 0 exch 1 add neg rlineto %% draw second side 1 add neg 0 rlineto %% draw third side closepath } %% draw fourth side def % create a rectangle with input operand in the view window: % y % x % height % width % notice that this function does not "draw" or ink the rectangle. /rectangle { yVal moveto %% set currentpoint for line drawRect } %% draws the rectangle def % These are global variables that every draw procedure uses % THe operand should be as follows: % viewWindow width % viewWindow height % title height /setDim { /maxX exch def %% width of display /maxY exch def %% height of display /titleH exch def %% height of title /maxH maxY titleH add def %% height of display + title } def %-------------------------- major procedures --------------------------% /title %% draws a rectangle around the title of picture { gsave newpath moveto %% lower left of title titleH 1 add 0 exch rlineto %% draw first side 1 add 0 rlineto %% draw second side 1 add neg 0 exch rlineto begin installGC stroke end %% draw third side grestore } def /drawFrame %% draw display frame { gsave newpath maxX maxY 0 0 rectangle begin installGC stroke end grestore } def % updates the foreground color of existing graphics-context dictionary: % foreground color % dictionary name /setForeground { /FGcolor exch put } def % updates the background color of existing graphics-context dictionary: % background color % dictionary name /setBackground { /BGcolor exch put } def % updates the line width, line style, cap style, join style of % existing graphics-context dictionary: % dictionary name % join style % cap style % line width /setLineAttributes { begin /JoinStyle exch def /CapStyle exch def /LineWidth exch def end } def % creates a graphics context dictionary with the following information: % /dictionary name % foreground color % background color % line width % cap style % join style % this creates different graphical contexts for different drawing functions. /makeDict { 5 dict 2 copy def begin pop %% with dict name on top of stack /FGcolor exch def %% define drawing attributes /BGcolor exch def %% not heavily used /LineWidth exch def /CapStyle exch def /JoinStyle exch def end } def % makes the current dictionary attributes effective % this function takes the values in the current dictionary to set the context % these are the values currently being used: foreground, cap, join, and width /installGC { FGcolor currentgray ne {FGcolor setgray} if %% foreground color CapStyle currentlinecap ne {CapStyle setlinecap} if %% cap style JoinStyle currentlinejoin ne {JoinStyle setlinejoin} if %% join style LineWidth currentlinewidth ne {LineWidth setlinewidth} if } %% line width def % operand stack configuration in order to use psDrawLine: % psDrawLine % y0 % x0 % y1 % x1 % graphics-context dictionary % this draws a line from (x0, y0) to (x1, y1). /psDrawLine { gsave newpath yVal moveto yVal lineto begin installGC stroke end grestore } def % operand stack configuration in order to use psDrawLines: % psDrawLines % points[0].y % points[0].x % n % ... % points[n].y % points[n].x % graphics-context dictionary % this draws lines connecting all the points. /psDrawLines { gsave newpath yVal moveto 1 sub { yVal lineto } repeat begin installGC stroke end grestore } def % operand stack configuration in order to use psDrawStr: % psDrawStr % y % x % string % graphics-context dictionary % this function draws a text string at (x,y). /psDrawStr { gsave newpath loadFont yVal moveto exch begin installGC show end grestore } def %-------------------------- script --------------------------% % 1 inch 1 inch translate mark %% mark bottom of our stack 0 0 1 1072693248 0 /globalGC1 makeDict 0 0 1 1072693248 0 /globalGC2 makeDict 0 0 1 1072693248 0 /trashGC makeDict 0 0 1 1072693248 0 /componentGC makeDict 0 0 1 1072693248 0 /opaqueGC makeDict 0 0 1 1072693248 0 /renderGC makeDict 0 0 1 1072693248 0 /globGC makeDict 0 0 1 1072693248 0 /anotherGC makeDict 1 0 1 1072693248 0 /renderGC makeDict gsave % save graphics state for clipping path 1.000000 1.000000 scale 24 276 300 setDim maxX maxY 0 0 rectangle clip % set clip path globalGC1 0.000000 setForeground globGC 0.000000 setForeground globalGC1 11 218 195 92 psDrawLine globGC (X) 6 223 psDrawStr globalGC1 106.000000 setForeground globGC 106.000000 setForeground globalGC1 0.000000 setForeground globGC 0.000000 setForeground globalGC1 205 218 37 92 psDrawLine globGC (Y) 210 223 psDrawStr globalGC1 106.000000 setForeground globGC 106.000000 setForeground globalGC1 0.000000 setForeground globGC 0.000000 setForeground globalGC1 106 48 117 223 psDrawLine globGC (Z) 101 43 psDrawStr globalGC1 106.000000 setForeground globGC 106.000000 setForeground 1 0 0 componentGC setLineAttributes componentGC 0.000000 setForeground componentGC 7 124 19 132 29 140 38 146 47 150 56 154 63 156 71 158 78 159 85 159 91 158 98 156 104 154 109 150 115 146 121 142 126 136 132 130 137 123 143 115 148 106 154 97 159 86 165 75 170 62 176 48 182 33 28 188 17 psDrawLines componentGC 10 126 21 135 32 142 41 148 50 152 58 156 66 159 74 160 81 161 87 161 94 160 100 158 106 156 112 152 118 148 123 144 129 138 135 132 140 125 145 117 151 108 156 99 162 88 167 76 173 64 179 50 185 35 28 191 19 psDrawLines componentGC 13 129 24 137 35 144 44 150 53 155 61 158 69 161 76 162 83 163 90 163 97 162 103 160 109 158 115 154 121 150 126 146 132 140 137 134 143 127 148 119 154 110 159 100 165 90 170 78 176 66 182 52 188 37 28 194 20 psDrawLines componentGC 16 131 27 140 37 147 47 153 56 157 64 161 72 163 79 165 86 165 93 165 99 164 105 162 112 160 117 156 123 152 129 148 134 142 140 136 145 129 151 121 156 112 162 102 167 92 173 80 179 67 185 53 191 38 28 197 22 psDrawLines componentGC 19 134 30 142 40 149 50 155 58 159 67 163 74 165 82 167 89 167 96 167 102 166 108 164 114 162 120 158 126 154 132 150 137 144 143 138 148 130 154 123 159 114 165 104 170 93 176 82 182 69 188 55 194 40 28 200 24 psDrawLines componentGC 22 136 33 145 43 152 53 157 61 162 70 165 77 168 85 169 92 170 98 169 105 168 111 166 117 164 123 160 129 156 134 152 140 146 145 140 151 132 156 124 162 116 167 106 173 95 179 84 185 71 191 57 197 42 28 203 25 psDrawLines componentGC 25 139 36 147 46 154 56 160 64 164 72 168 80 170 87 171 94 172 101 172 107 170 114 169 120 166 126 163 131 158 137 154 143 148 148 142 154 134 159 126 165 117 170 108 176 97 182 85 188 73 194 59 200 44 28 206 27 psDrawLines componentGC 28 141 39 150 49 157 58 162 67 167 75 170 83 172 90 174 97 174 104 174 110 173 116 171 122 168 128 165 134 160 140 156 145 150 151 143 156 136 162 128 168 119 173 110 179 99 185 87 191 74 197 60 203 45 28 210 29 psDrawLines componentGC 32 144 42 152 52 159 61 165 70 169 78 172 86 175 93 176 100 176 107 176 113 175 119 173 125 170 131 167 137 163 142 158 148 152 154 145 159 138 165 130 170 121 176 111 182 101 188 89 194 76 200 62 206 47 28 213 30 psDrawLines componentGC 35 146 45 155 55 162 64 167 73 171 81 175 89 177 96 178 103 179 109 178 116 177 122 175 128 172 134 169 140 165 145 160 151 154 156 147 162 140 168 132 173 123 179 113 185 103 191 91 197 78 203 64 209 49 28 216 32 psDrawLines componentGC 38 149 48 157 58 164 67 170 76 174 84 177 92 179 99 180 106 181 112 180 119 179 125 177 131 174 137 171 142 167 148 162 154 156 159 149 165 142 171 134 176 125 182 115 188 104 194 93 200 80 206 66 212 50 28 219 34 psDrawLines componentGC 41 152 52 160 61 167 70 172 79 176 87 179 94 182 102 183 109 183 115 183 121 181 128 179 134 177 139 173 145 169 151 164 157 158 162 152 168 144 173 136 179 127 185 117 191 106 197 95 203 82 209 68 215 52 28 222 36 psDrawLines componentGC 44 154 55 162 64 169 74 175 82 179 90 182 97 184 105 185 111 186 118 185 124 184 130 182 136 179 142 175 148 171 154 166 159 160 165 154 171 146 176 138 182 129 188 119 194 108 200 96 206 83 212 69 219 54 28 225 37 psDrawLines componentGC 47 157 58 165 68 172 77 177 85 181 93 184 100 186 108 188 114 188 121 187 127 186 133 184 139 181 145 177 151 173 157 168 162 162 168 156 174 148 179 140 185 131 191 121 197 110 203 98 209 85 215 71 222 56 28 229 39 psDrawLines componentGC 51 160 61 168 71 174 80 180 88 184 96 187 103 189 110 190 117 190 124 190 130 188 136 186 142 183 148 180 154 175 160 170 165 164 171 158 176 150 182 142 188 133 194 123 200 112 206 100 212 87 218 73 225 58 28 232 41 psDrawLines componentGC 54 162 64 170 74 177 83 182 91 186 99 189 106 191 113 192 120 193 127 192 133 191 139 188 145 185 151 182 157 177 162 172 168 166 174 160 179 152 185 144 191 135 197 125 203 114 209 102 215 89 222 75 228 59 28 235 43 psDrawLines componentGC 57 165 68 173 77 180 86 185 94 189 102 192 109 194 116 195 123 195 130 194 136 193 142 191 148 188 154 184 160 180 165 174 171 169 177 162 182 154 188 146 194 137 200 127 206 116 212 104 218 91 225 77 232 61 28 239 44 psDrawLines componentGC 61 168 71 176 80 182 89 188 97 191 105 194 113 196 120 197 126 197 133 197 139 195 145 193 151 190 157 186 163 182 168 177 174 171 180 164 185 157 191 148 197 139 203 129 209 118 215 106 221 93 228 79 235 63 28 242 46 psDrawLines componentGC 64 171 74 179 84 185 92 190 101 194 108 197 116 199 123 200 129 200 136 199 142 198 148 195 154 192 160 189 166 184 171 179 177 173 183 166 188 159 194 150 200 141 206 131 212 120 218 108 225 95 231 81 238 65 28 245 48 psDrawLines componentGC 68 174 78 182 87 188 96 193 104 197 111 199 119 201 126 202 132 202 139 201 145 200 151 198 157 195 163 191 169 186 174 181 180 175 186 168 191 161 197 152 203 143 209 133 215 122 221 110 228 97 235 82 242 67 28 249 50 psDrawLines componentGC 71 177 81 184 90 191 99 196 107 199 115 202 122 204 129 205 135 205 142 204 148 202 154 200 160 197 166 193 172 189 177 183 183 177 189 170 194 163 200 154 206 145 212 135 218 124 225 112 231 99 238 84 245 69 28 252 52 psDrawLines componentGC 74 179 84 187 94 193 102 198 110 202 118 205 125 206 132 207 138 207 145 206 151 205 157 202 163 199 169 195 175 191 180 185 186 179 192 173 197 165 203 157 209 147 215 137 221 126 228 114 234 101 241 86 248 71 28 256 54 psDrawLines componentGC 78 182 88 190 97 196 105 201 113 205 121 207 128 209 135 210 142 210 148 209 154 207 160 205 166 202 172 198 178 193 183 188 189 182 195 175 201 167 206 159 212 149 218 139 225 128 231 116 238 103 245 88 252 73 28 259 55 psDrawLines componentGC 82 185 91 193 100 199 109 204 117 207 124 210 131 212 138 212 145 212 151 211 157 210 163 207 169 204 175 200 181 195 186 190 192 184 198 177 204 169 210 161 216 152 222 141 228 130 234 118 241 105 248 90 255 74 28 263 57 psDrawLines componentGC 85 188 95 196 104 202 112 207 120 210 128 213 135 214 141 215 148 215 154 214 160 212 166 210 172 206 178 202 184 198 189 192 195 186 201 179 207 172 213 163 219 154 225 143 231 132 238 120 244 107 251 92 259 76 28 266 59 psDrawLines componentGC 89 191 98 199 107 205 116 209 123 213 131 215 138 217 145 218 151 217 157 216 163 214 169 212 175 209 181 205 187 200 193 195 198 188 204 181 210 174 216 165 222 156 228 146 234 134 241 122 248 109 255 94 262 78 28 270 61 psDrawLines componentGC 92 194 102 202 111 208 119 212 127 216 134 218 141 220 148 220 154 220 161 219 167 217 173 214 178 211 184 207 190 202 196 197 201 191 207 184 213 176 219 167 225 158 231 148 238 136 244 124 251 111 258 96 266 80 28 273 63 psDrawLines componentGC 96 197 106 205 114 211 123 215 130 219 138 221 144 222 151 223 158 222 164 221 170 219 176 217 182 214 187 209 193 205 199 199 205 193 210 186 216 178 222 170 228 160 235 150 241 139 248 126 255 113 262 98 269 82 28 277 65 psDrawLines componentGC 277 65 273 63 270 61 266 59 263 57 259 55 256 54 252 52 249 50 245 48 242 46 239 44 235 43 232 41 229 39 225 37 222 36 219 34 216 32 213 30 210 29 206 27 203 25 200 24 197 22 194 20 191 19 28 188 17 psDrawLines componentGC 269 82 266 80 262 78 259 76 255 74 252 73 248 71 245 69 242 67 238 65 235 63 232 61 228 59 225 58 222 56 219 54 215 52 212 50 209 49 206 47 203 45 200 44 197 42 194 40 191 38 188 37 185 35 28 182 33 psDrawLines componentGC 262 98 258 96 255 94 251 92 248 90 245 88 241 86 238 84 235 82 231 81 228 79 225 77 222 75 218 73 215 71 212 69 209 68 206 66 203 64 200 62 197 60 194 59 191 57 188 55 185 53 182 52 179 50 28 176 48 psDrawLines componentGC 255 113 251 111 248 109 244 107 241 105 238 103 234 101 231 99 228 97 225 95 221 93 218 91 215 89 212 87 209 85 206 83 203 82 200 80 197 78 194 76 191 74 188 73 185 71 182 69 179 67 176 66 173 64 28 170 62 psDrawLines componentGC 248 126 244 124 241 122 238 120 234 118 231 116 228 114 225 112 221 110 218 108 215 106 212 104 209 102 206 100 203 98 200 96 197 95 194 93 191 91 188 89 185 87 182 85 179 84 176 82 173 80 170 78 167 76 28 165 75 psDrawLines componentGC 241 139 238 136 234 134 231 132 228 130 225 128 221 126 218 124 215 122 212 120 209 118 206 116 203 114 200 112 197 110 194 108 191 106 188 104 185 103 182 101 179 99 176 97 173 95 170 93 167 92 165 90 162 88 28 159 86 psDrawLines componentGC 235 150 231 148 228 146 225 143 222 141 218 139 215 137 212 135 209 133 206 131 203 129 200 127 197 125 194 123 191 121 188 119 185 117 182 115 179 113 176 111 173 110 170 108 167 106 165 104 162 102 159 100 156 99 28 154 97 psDrawLines componentGC 228 160 225 158 222 156 219 154 216 152 212 149 209 147 206 145 203 143 200 141 197 139 194 137 191 135 188 133 185 131 182 129 179 127 176 125 173 123 170 121 168 119 165 117 162 116 159 114 156 112 154 110 151 108 28 148 106 psDrawLines componentGC 222 170 219 167 216 165 213 163 210 161 206 159 203 157 200 154 197 152 194 150 191 148 188 146 185 144 182 142 179 140 176 138 173 136 171 134 168 132 165 130 162 128 159 126 156 124 154 123 151 121 148 119 145 117 28 143 115 psDrawLines componentGC 216 178 213 176 210 174 207 172 204 169 201 167 197 165 194 163 191 161 188 159 185 157 182 154 179 152 176 150 174 148 171 146 168 144 165 142 162 140 159 138 156 136 154 134 151 132 148 130 145 129 143 127 140 125 28 137 123 psDrawLines componentGC 210 186 207 184 204 181 201 179 198 177 195 175 192 173 189 170 186 168 183 166 180 164 177 162 174 160 171 158 168 156 165 154 162 152 159 149 156 147 154 145 151 143 148 142 145 140 143 138 140 136 137 134 135 132 28 132 130 psDrawLines componentGC 205 193 201 191 198 188 195 186 192 184 189 182 186 179 183 177 180 175 177 173 174 171 171 169 168 166 165 164 162 162 159 160 157 158 154 156 151 154 148 152 145 150 143 148 140 146 137 144 134 142 132 140 129 138 28 126 136 psDrawLines componentGC 199 199 196 197 193 195 189 192 186 190 183 188 180 185 177 183 174 181 171 179 168 177 165 174 162 172 160 170 157 168 154 166 151 164 148 162 145 160 142 158 140 156 137 154 134 152 132 150 129 148 126 146 123 144 28 121 142 psDrawLines componentGC 193 205 190 202 187 200 184 198 181 195 178 193 175 191 172 189 169 186 166 184 163 182 160 180 157 177 154 175 151 173 148 171 145 169 142 167 140 165 137 163 134 160 131 158 129 156 126 154 123 152 121 150 118 148 28 115 146 psDrawLines componentGC 187 209 184 207 181 205 178 202 175 200 172 198 169 195 166 193 163 191 160 189 157 186 154 184 151 182 148 180 145 177 142 175 139 173 137 171 134 169 131 167 128 165 126 163 123 160 120 158 117 156 115 154 112 152 28 109 150 psDrawLines componentGC 182 214 178 211 175 209 172 206 169 204 166 202 163 199 160 197 157 195 154 192 151 190 148 188 145 185 142 183 139 181 136 179 134 177 131 174 128 172 125 170 122 168 120 166 117 164 114 162 112 160 109 158 106 156 28 104 154 psDrawLines componentGC 176 217 173 214 169 212 166 210 163 207 160 205 157 202 154 200 151 198 148 195 145 193 142 191 139 188 136 186 133 184 130 182 128 179 125 177 122 175 119 173 116 171 114 169 111 166 108 164 105 162 103 160 100 158 28 98 156 psDrawLines componentGC 170 219 167 217 163 214 160 212 157 210 154 207 151 205 148 202 145 200 142 198 139 195 136 193 133 191 130 188 127 186 124 184 121 181 119 179 116 177 113 175 110 173 107 170 105 168 102 166 99 164 97 162 94 160 28 91 158 psDrawLines componentGC 164 221 161 219 157 216 154 214 151 211 148 209 145 206 142 204 139 201 136 199 133 197 130 194 127 192 124 190 121 187 118 185 115 183 112 180 109 178 107 176 104 174 101 172 98 169 96 167 93 165 90 163 87 161 28 85 159 psDrawLines componentGC 158 222 154 220 151 217 148 215 145 212 142 210 138 207 135 205 132 202 129 200 126 197 123 195 120 193 117 190 114 188 111 186 109 183 106 181 103 179 100 176 97 174 94 172 92 170 89 167 86 165 83 163 81 161 28 78 159 psDrawLines componentGC 151 223 148 220 145 218 141 215 138 212 135 210 132 207 129 205 126 202 123 200 120 197 116 195 113 192 110 190 108 188 105 185 102 183 99 180 96 178 93 176 90 174 87 171 85 169 82 167 79 165 76 162 74 160 28 71 158 psDrawLines componentGC 144 222 141 220 138 217 135 214 131 212 128 209 125 206 122 204 119 201 116 199 113 196 109 194 106 191 103 189 100 186 97 184 94 182 92 179 89 177 86 175 83 172 80 170 77 168 74 165 72 163 69 161 66 159 28 63 156 psDrawLines componentGC 138 221 134 218 131 215 128 213 124 210 121 207 118 205 115 202 111 199 108 197 105 194 102 192 99 189 96 187 93 184 90 182 87 179 84 177 81 175 78 172 75 170 72 168 70 165 67 163 64 161 61 158 58 156 28 56 154 psDrawLines componentGC 130 219 127 216 123 213 120 210 117 207 113 205 110 202 107 199 104 197 101 194 97 191 94 189 91 186 88 184 85 181 82 179 79 176 76 174 73 171 70 169 67 167 64 164 61 162 58 159 56 157 53 155 50 152 28 47 150 psDrawLines componentGC 123 215 119 212 116 209 112 207 109 204 105 201 102 198 99 196 96 193 92 190 89 188 86 185 83 182 80 180 77 177 74 175 70 172 67 170 64 167 61 165 58 162 56 160 53 157 50 155 47 153 44 150 41 148 28 38 146 psDrawLines componentGC 114 211 111 208 107 205 104 202 100 199 97 196 94 193 90 191 87 188 84 185 80 182 77 180 74 177 71 174 68 172 64 169 61 167 58 164 55 162 52 159 49 157 46 154 43 152 40 149 37 147 35 144 32 142 28 29 140 psDrawLines componentGC 106 205 102 202 98 199 95 196 91 193 88 190 84 187 81 184 78 182 74 179 71 176 68 173 64 170 61 168 58 165 55 162 52 160 48 157 45 155 42 152 39 150 36 147 33 145 30 142 27 140 24 137 21 135 28 19 132 psDrawLines componentGC 96 197 92 194 89 191 85 188 82 185 78 182 74 179 71 177 68 174 64 171 61 168 57 165 54 162 51 160 47 157 44 154 41 152 38 149 35 146 32 144 28 141 25 139 22 136 19 134 16 131 13 129 10 126 28 7 124 psDrawLines grestore % restore graphics state cleartomark %% clearing operand stack end %% pops mainDict from dictionary stack showpage %-------------------------- end --------------------------%