├── manual.pdf ├── manual ├── asym.pdf ├── asym1.png ├── asym2.png ├── param.pdf ├── trig.pdf ├── manual.pdf ├── coord_grid.pdf ├── coord_sys.pdf ├── firstline.png ├── function.pdf ├── ipewindow.png ├── piecewise.pdf ├── secondline.png ├── param_dialog.png ├── trig_coords.png ├── trig_dialog.png ├── function_dialog.png ├── ipewindow_small.png ├── piecewise_grid.png ├── spliced_curve.pdf ├── coord_grid_dialog.png ├── coord_sys_dialog.png ├── firstline_dialog.png ├── piecewise_system.png ├── secondline_dialog.png ├── piecewise_grid_dialog.png ├── piecewise_system_dialog.png ├── piecewise_starting_rectangle.png ├── coord_grid.ipe ├── coord_sys.ipe ├── piecewise.ipe ├── asym.ipe ├── param.ipe ├── function.ipe ├── spliced_curve.ipe ├── trig.ipe └── manual.tex ├── README.md └── plots.lua /manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual.pdf -------------------------------------------------------------------------------- /manual/asym.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/asym.pdf -------------------------------------------------------------------------------- /manual/asym1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/asym1.png -------------------------------------------------------------------------------- /manual/asym2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/asym2.png -------------------------------------------------------------------------------- /manual/param.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/param.pdf -------------------------------------------------------------------------------- /manual/trig.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/trig.pdf -------------------------------------------------------------------------------- /manual/manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/manual.pdf -------------------------------------------------------------------------------- /manual/coord_grid.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/coord_grid.pdf -------------------------------------------------------------------------------- /manual/coord_sys.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/coord_sys.pdf -------------------------------------------------------------------------------- /manual/firstline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/firstline.png -------------------------------------------------------------------------------- /manual/function.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/function.pdf -------------------------------------------------------------------------------- /manual/ipewindow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/ipewindow.png -------------------------------------------------------------------------------- /manual/piecewise.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/piecewise.pdf -------------------------------------------------------------------------------- /manual/secondline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/secondline.png -------------------------------------------------------------------------------- /manual/param_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/param_dialog.png -------------------------------------------------------------------------------- /manual/trig_coords.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/trig_coords.png -------------------------------------------------------------------------------- /manual/trig_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/trig_dialog.png -------------------------------------------------------------------------------- /manual/function_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/function_dialog.png -------------------------------------------------------------------------------- /manual/ipewindow_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/ipewindow_small.png -------------------------------------------------------------------------------- /manual/piecewise_grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/piecewise_grid.png -------------------------------------------------------------------------------- /manual/spliced_curve.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/spliced_curve.pdf -------------------------------------------------------------------------------- /manual/coord_grid_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/coord_grid_dialog.png -------------------------------------------------------------------------------- /manual/coord_sys_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/coord_sys_dialog.png -------------------------------------------------------------------------------- /manual/firstline_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/firstline_dialog.png -------------------------------------------------------------------------------- /manual/piecewise_system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/piecewise_system.png -------------------------------------------------------------------------------- /manual/secondline_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/secondline_dialog.png -------------------------------------------------------------------------------- /manual/piecewise_grid_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/piecewise_grid_dialog.png -------------------------------------------------------------------------------- /manual/piecewise_system_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/piecewise_system_dialog.png -------------------------------------------------------------------------------- /manual/piecewise_starting_rectangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lahvak/ipeplots/HEAD/manual/piecewise_starting_rectangle.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ipeplots 2 | ======== 3 | 4 | An ipelet for function plots and parametric plots 5 | 6 | For more details see http://ipe.otfried.org/ 7 | -------------------------------------------------------------------------------- /manual/coord_grid.ipe: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 0 0 m 9 | -1 0.333 l 10 | -1 -0.333 l 11 | h 12 | 13 | 14 | 15 | 16 | 0 0 m 17 | -1 0.333 l 18 | -1 -0.333 l 19 | h 20 | 21 | 22 | 23 | 24 | 0.6 0 0 0.6 0 0 e 25 | 0.4 0 0 0.4 0 0 e 26 | 27 | 28 | 29 | 30 | 0.6 0 0 0.6 0 0 e 31 | 32 | 33 | 34 | 35 | 36 | 0.5 0 0 0.5 0 0 e 37 | 38 | 39 | 0.6 0 0 0.6 0 0 e 40 | 0.4 0 0 0.4 0 0 e 41 | 42 | 43 | 44 | 45 | 46 | -0.6 -0.6 m 47 | 0.6 -0.6 l 48 | 0.6 0.6 l 49 | -0.6 0.6 l 50 | h 51 | -0.4 -0.4 m 52 | 0.4 -0.4 l 53 | 0.4 0.4 l 54 | -0.4 0.4 l 55 | h 56 | 57 | 58 | 59 | 60 | -0.6 -0.6 m 61 | 0.6 -0.6 l 62 | 0.6 0.6 l 63 | -0.6 0.6 l 64 | h 65 | 66 | 67 | 68 | 69 | 70 | -0.5 -0.5 m 71 | 0.5 -0.5 l 72 | 0.5 0.5 l 73 | -0.5 0.5 l 74 | h 75 | 76 | 77 | -0.6 -0.6 m 78 | 0.6 -0.6 l 79 | 0.6 0.6 l 80 | -0.6 0.6 l 81 | h 82 | -0.4 -0.4 m 83 | 0.4 -0.4 l 84 | 0.4 0.4 l 85 | -0.4 0.4 l 86 | h 87 | 88 | 89 | 90 | 91 | 92 | 93 | -0.43 -0.57 m 94 | 0.57 0.43 l 95 | 0.43 0.57 l 96 | -0.57 -0.43 l 97 | h 98 | 99 | 100 | -0.43 0.57 m 101 | 0.57 -0.43 l 102 | 0.43 -0.57 l 103 | -0.57 0.43 l 104 | h 105 | 106 | 107 | 108 | 109 | 110 | 0 0 m 111 | -1 0.333 l 112 | -1 -0.333 l 113 | h 114 | 115 | 116 | 117 | 118 | 0 0 m 119 | -1 0.333 l 120 | -0.8 0 l 121 | -1 -0.333 l 122 | h 123 | 124 | 125 | 126 | 127 | 0 0 m 128 | -1 0.333 l 129 | -0.8 0 l 130 | -1 -0.333 l 131 | h 132 | 133 | 134 | 135 | 136 | -1 0.333 m 137 | 0 0 l 138 | -1 -0.333 l 139 | 140 | 141 | 142 | 143 | 0 0 m 144 | -1 0.333 l 145 | -1 -0.333 l 146 | h 147 | -1 0 m 148 | -2 0.333 l 149 | -2 -0.333 l 150 | h 151 | 152 | 153 | 154 | 155 | 0 0 m 156 | -1 0.333 l 157 | -1 -0.333 l 158 | h 159 | -1 0 m 160 | -2 0.333 l 161 | -2 -0.333 l 162 | h 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 128 385 m 237 | 128 113 l 238 | 494 113 l 239 | 494 385 l 240 | h 241 | 242 | 243 | 244 | 138.953 113 m 245 | 138.953 385 l 246 | 247 | 248 | 181.965 113 m 249 | 181.965 385 l 250 | 251 | 252 | 224.976 113 m 253 | 224.976 385 l 254 | 255 | 256 | 267.988 113 m 257 | 267.988 385 l 258 | 259 | 260 | 311 113 m 261 | 311 385 l 262 | 263 | 264 | 354.012 113 m 265 | 354.012 385 l 266 | 267 | 268 | 397.024 113 m 269 | 397.024 385 l 270 | 271 | 272 | 440.035 113 m 273 | 440.035 385 l 274 | 275 | 276 | 483.047 113 m 277 | 483.047 385 l 278 | 279 | 280 | 128 158.333 m 281 | 494 158.333 l 282 | 283 | 284 | 128 203.667 m 285 | 494 203.667 l 286 | 287 | 288 | 128 294.333 m 289 | 494 294.333 l 290 | 291 | 292 | 128 339.667 m 293 | 494 339.667 l 294 | 295 | 296 | 297 | 298 | -------------------------------------------------------------------------------- /manual/coord_sys.ipe: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 0 0 m 9 | -1 0.333 l 10 | -1 -0.333 l 11 | h 12 | 13 | 14 | 15 | 16 | 0 0 m 17 | -1 0.333 l 18 | -1 -0.333 l 19 | h 20 | 21 | 22 | 23 | 24 | 0.6 0 0 0.6 0 0 e 25 | 0.4 0 0 0.4 0 0 e 26 | 27 | 28 | 29 | 30 | 0.6 0 0 0.6 0 0 e 31 | 32 | 33 | 34 | 35 | 36 | 0.5 0 0 0.5 0 0 e 37 | 38 | 39 | 0.6 0 0 0.6 0 0 e 40 | 0.4 0 0 0.4 0 0 e 41 | 42 | 43 | 44 | 45 | 46 | -0.6 -0.6 m 47 | 0.6 -0.6 l 48 | 0.6 0.6 l 49 | -0.6 0.6 l 50 | h 51 | -0.4 -0.4 m 52 | 0.4 -0.4 l 53 | 0.4 0.4 l 54 | -0.4 0.4 l 55 | h 56 | 57 | 58 | 59 | 60 | -0.6 -0.6 m 61 | 0.6 -0.6 l 62 | 0.6 0.6 l 63 | -0.6 0.6 l 64 | h 65 | 66 | 67 | 68 | 69 | 70 | -0.5 -0.5 m 71 | 0.5 -0.5 l 72 | 0.5 0.5 l 73 | -0.5 0.5 l 74 | h 75 | 76 | 77 | -0.6 -0.6 m 78 | 0.6 -0.6 l 79 | 0.6 0.6 l 80 | -0.6 0.6 l 81 | h 82 | -0.4 -0.4 m 83 | 0.4 -0.4 l 84 | 0.4 0.4 l 85 | -0.4 0.4 l 86 | h 87 | 88 | 89 | 90 | 91 | 92 | 93 | -0.43 -0.57 m 94 | 0.57 0.43 l 95 | 0.43 0.57 l 96 | -0.57 -0.43 l 97 | h 98 | 99 | 100 | -0.43 0.57 m 101 | 0.57 -0.43 l 102 | 0.43 -0.57 l 103 | -0.57 0.43 l 104 | h 105 | 106 | 107 | 108 | 109 | 110 | 0 0 m 111 | -1 0.333 l 112 | -1 -0.333 l 113 | h 114 | 115 | 116 | 117 | 118 | 0 0 m 119 | -1 0.333 l 120 | -0.8 0 l 121 | -1 -0.333 l 122 | h 123 | 124 | 125 | 126 | 127 | 0 0 m 128 | -1 0.333 l 129 | -0.8 0 l 130 | -1 -0.333 l 131 | h 132 | 133 | 134 | 135 | 136 | -1 0.333 m 137 | 0 0 l 138 | -1 -0.333 l 139 | 140 | 141 | 142 | 143 | 0 0 m 144 | -1 0.333 l 145 | -1 -0.333 l 146 | h 147 | -1 0 m 148 | -2 0.333 l 149 | -2 -0.333 l 150 | h 151 | 152 | 153 | 154 | 155 | 0 0 m 156 | -1 0.333 l 157 | -1 -0.333 l 158 | h 159 | -1 0 m 160 | -2 0.333 l 161 | -2 -0.333 l 162 | h 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 128 385 m 237 | 128 113 l 238 | 494 113 l 239 | 494 385 l 240 | h 241 | 242 | 243 | 244 | 128 249 m 245 | 494 249 l 246 | 247 | 248 | 138.953 251.5 m 249 | 138.953 246.5 l 250 | 251 | 252 | 181.965 251.5 m 253 | 181.965 246.5 l 254 | 255 | 256 | 224.976 251.5 m 257 | 224.976 246.5 l 258 | 259 | 260 | 267.988 251.5 m 261 | 267.988 246.5 l 262 | 263 | 264 | 311 251.5 m 265 | 311 246.5 l 266 | 267 | 268 | 354.012 251.5 m 269 | 354.012 246.5 l 270 | 271 | 272 | 397.024 251.5 m 273 | 397.024 246.5 l 274 | 275 | 276 | 440.035 251.5 m 277 | 440.035 246.5 l 278 | 279 | 280 | 483.047 251.5 m 281 | 483.047 246.5 l 282 | 283 | 284 | 311 113 m 285 | 311 385 l 286 | 287 | 288 | 313.5 158.333 m 289 | 308.5 158.333 l 290 | 291 | 292 | 313.5 203.667 m 293 | 308.5 203.667 l 294 | 295 | 296 | 313.5 294.333 m 297 | 308.5 294.333 l 298 | 299 | 300 | 313.5 339.667 m 301 | 308.5 339.667 l 302 | 303 | 304 | 305 | 306 | -------------------------------------------------------------------------------- /manual/piecewise.ipe: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 0 0 m 9 | -1 0.333 l 10 | -1 -0.333 l 11 | h 12 | 13 | 14 | 15 | 16 | 0 0 m 17 | -1 0.333 l 18 | -1 -0.333 l 19 | h 20 | 21 | 22 | 23 | 24 | 0.6 0 0 0.6 0 0 e 25 | 0.4 0 0 0.4 0 0 e 26 | 27 | 28 | 29 | 30 | 0.6 0 0 0.6 0 0 e 31 | 32 | 33 | 34 | 35 | 36 | 0.5 0 0 0.5 0 0 e 37 | 38 | 39 | 0.6 0 0 0.6 0 0 e 40 | 0.4 0 0 0.4 0 0 e 41 | 42 | 43 | 44 | 45 | 46 | -0.6 -0.6 m 47 | 0.6 -0.6 l 48 | 0.6 0.6 l 49 | -0.6 0.6 l 50 | h 51 | -0.4 -0.4 m 52 | 0.4 -0.4 l 53 | 0.4 0.4 l 54 | -0.4 0.4 l 55 | h 56 | 57 | 58 | 59 | 60 | -0.6 -0.6 m 61 | 0.6 -0.6 l 62 | 0.6 0.6 l 63 | -0.6 0.6 l 64 | h 65 | 66 | 67 | 68 | 69 | 70 | -0.5 -0.5 m 71 | 0.5 -0.5 l 72 | 0.5 0.5 l 73 | -0.5 0.5 l 74 | h 75 | 76 | 77 | -0.6 -0.6 m 78 | 0.6 -0.6 l 79 | 0.6 0.6 l 80 | -0.6 0.6 l 81 | h 82 | -0.4 -0.4 m 83 | 0.4 -0.4 l 84 | 0.4 0.4 l 85 | -0.4 0.4 l 86 | h 87 | 88 | 89 | 90 | 91 | 92 | 93 | -0.43 -0.57 m 94 | 0.57 0.43 l 95 | 0.43 0.57 l 96 | -0.57 -0.43 l 97 | h 98 | 99 | 100 | -0.43 0.57 m 101 | 0.57 -0.43 l 102 | 0.43 -0.57 l 103 | -0.57 0.43 l 104 | h 105 | 106 | 107 | 108 | 109 | 110 | 0 0 m 111 | -1 0.333 l 112 | -1 -0.333 l 113 | h 114 | 115 | 116 | 117 | 118 | 0 0 m 119 | -1 0.333 l 120 | -0.8 0 l 121 | -1 -0.333 l 122 | h 123 | 124 | 125 | 126 | 127 | 0 0 m 128 | -1 0.333 l 129 | -0.8 0 l 130 | -1 -0.333 l 131 | h 132 | 133 | 134 | 135 | 136 | -1 0.333 m 137 | 0 0 l 138 | -1 -0.333 l 139 | 140 | 141 | 142 | 143 | 0 0 m 144 | -1 0.333 l 145 | -1 -0.333 l 146 | h 147 | -1 0 m 148 | -2 0.333 l 149 | -2 -0.333 l 150 | h 151 | 152 | 153 | 154 | 155 | 0 0 m 156 | -1 0.333 l 157 | -1 -0.333 l 158 | h 159 | -1 0 m 160 | -2 0.333 l 161 | -2 -0.333 l 162 | h 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 128 384 m 237 | 128 128 l 238 | 448 128 l 239 | 448 384 l 240 | h 241 | 242 | 243 | 244 | 128 256 m 245 | 448 256 l 246 | 247 | 248 | 160 258.5 m 249 | 160 253.5 l 250 | 251 | 252 | 192 258.5 m 253 | 192 253.5 l 254 | 255 | 256 | 224 258.5 m 257 | 224 253.5 l 258 | 259 | 260 | 256 258.5 m 261 | 256 253.5 l 262 | 263 | 264 | 288 258.5 m 265 | 288 253.5 l 266 | 267 | 268 | 320 258.5 m 269 | 320 253.5 l 270 | 271 | 272 | 352 258.5 m 273 | 352 253.5 l 274 | 275 | 276 | 384 258.5 m 277 | 384 253.5 l 278 | 279 | 280 | 416 258.5 m 281 | 416 253.5 l 282 | 283 | 284 | 288 128 m 285 | 288 384 l 286 | 287 | 288 | 290.5 160 m 289 | 285.5 160 l 290 | 291 | 292 | 290.5 192 m 293 | 285.5 192 l 294 | 295 | 296 | 290.5 224 m 297 | 285.5 224 l 298 | 299 | 300 | 290.5 256 m 301 | 285.5 256 l 302 | 303 | 304 | 290.5 288 m 305 | 285.5 288 l 306 | 307 | 308 | 290.5 320 m 309 | 285.5 320 l 310 | 311 | 312 | 290.5 352 m 313 | 285.5 352 l 314 | 315 | 316 | 317 | 318 | 160 128 m 319 | 160 384 l 320 | 321 | 322 | 192 128 m 323 | 192 384 l 324 | 325 | 326 | 224 128 m 327 | 224 384 l 328 | 329 | 330 | 256 128 m 331 | 256 384 l 332 | 333 | 334 | 288 128 m 335 | 288 384 l 336 | 337 | 338 | 320 128 m 339 | 320 384 l 340 | 341 | 342 | 352 128 m 343 | 352 384 l 344 | 345 | 346 | 384 128 m 347 | 384 384 l 348 | 349 | 350 | 416 128 m 351 | 416 384 l 352 | 353 | 354 | 128 160 m 355 | 448 160 l 356 | 357 | 358 | 128 192 m 359 | 448 192 l 360 | 361 | 362 | 128 224 m 363 | 448 224 l 364 | 365 | 366 | 128 256 m 367 | 448 256 l 368 | 369 | 370 | 128 288 m 371 | 448 288 l 372 | 373 | 374 | 128 320 m 375 | 448 320 l 376 | 377 | 378 | 128 352 m 379 | 448 352 l 380 | 381 | 382 | 383 | 128 256 m 384 | 224 352 l 385 | 386 | 387 | 224 352 m 388 | 225.959 344.283 l 389 | 227.918 336.806 l 390 | 229.878 329.569 l 391 | 231.837 322.572 l 392 | 233.796 315.815 l 393 | 235.755 309.298 l 394 | 237.714 303.02 l 395 | 239.673 296.983 l 396 | 241.633 291.185 l 397 | 243.592 285.628 l 398 | 245.551 280.31 l 399 | 247.51 275.232 l 400 | 249.469 270.394 l 401 | 251.429 265.796 l 402 | 253.388 261.438 l 403 | 255.347 257.319 l 404 | 257.306 253.441 l 405 | 259.265 249.803 l 406 | 261.224 246.404 l 407 | 263.184 243.245 l 408 | 265.143 240.327 l 409 | 267.102 237.648 l 410 | 269.061 235.209 l 411 | 271.02 233.01 l 412 | 272.98 231.05 l 413 | 274.939 229.331 l 414 | 276.898 227.852 l 415 | 278.857 226.612 l 416 | 280.816 225.613 l 417 | 282.776 224.853 l 418 | 284.735 224.333 l 419 | 286.694 224.053 l 420 | 288.653 224.013 l 421 | 290.612 224.213 l 422 | 292.571 224.653 l 423 | 294.531 225.333 l 424 | 296.49 226.252 l 425 | 298.449 227.412 l 426 | 300.408 228.811 l 427 | 302.367 230.451 l 428 | 304.327 232.33 l 429 | 306.286 234.449 l 430 | 308.245 236.808 l 431 | 310.204 239.407 l 432 | 312.163 242.246 l 433 | 314.122 245.324 l 434 | 316.082 248.643 l 435 | 318.041 252.202 l 436 | 320 256 l 437 | 438 | 439 | 320 288 m 440 | 448 160 l 441 | 442 | 443 | 444 | $x$ 445 | $y$ 446 | 447 | 448 | -------------------------------------------------------------------------------- /manual/asym.ipe: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 0 0 m 9 | -1 0.333 l 10 | -1 -0.333 l 11 | h 12 | 13 | 14 | 15 | 16 | 0 0 m 17 | -1 0.333 l 18 | -1 -0.333 l 19 | h 20 | 21 | 22 | 23 | 24 | 0.6 0 0 0.6 0 0 e 25 | 0.4 0 0 0.4 0 0 e 26 | 27 | 28 | 29 | 30 | 0.6 0 0 0.6 0 0 e 31 | 32 | 33 | 34 | 35 | 36 | 0.5 0 0 0.5 0 0 e 37 | 38 | 39 | 0.6 0 0 0.6 0 0 e 40 | 0.4 0 0 0.4 0 0 e 41 | 42 | 43 | 44 | 45 | 46 | -0.6 -0.6 m 47 | 0.6 -0.6 l 48 | 0.6 0.6 l 49 | -0.6 0.6 l 50 | h 51 | -0.4 -0.4 m 52 | 0.4 -0.4 l 53 | 0.4 0.4 l 54 | -0.4 0.4 l 55 | h 56 | 57 | 58 | 59 | 60 | -0.6 -0.6 m 61 | 0.6 -0.6 l 62 | 0.6 0.6 l 63 | -0.6 0.6 l 64 | h 65 | 66 | 67 | 68 | 69 | 70 | -0.5 -0.5 m 71 | 0.5 -0.5 l 72 | 0.5 0.5 l 73 | -0.5 0.5 l 74 | h 75 | 76 | 77 | -0.6 -0.6 m 78 | 0.6 -0.6 l 79 | 0.6 0.6 l 80 | -0.6 0.6 l 81 | h 82 | -0.4 -0.4 m 83 | 0.4 -0.4 l 84 | 0.4 0.4 l 85 | -0.4 0.4 l 86 | h 87 | 88 | 89 | 90 | 91 | 92 | 93 | -0.43 -0.57 m 94 | 0.57 0.43 l 95 | 0.43 0.57 l 96 | -0.57 -0.43 l 97 | h 98 | 99 | 100 | -0.43 0.57 m 101 | 0.57 -0.43 l 102 | 0.43 -0.57 l 103 | -0.57 0.43 l 104 | h 105 | 106 | 107 | 108 | 109 | 110 | 0 0 m 111 | -1 0.333 l 112 | -1 -0.333 l 113 | h 114 | 115 | 116 | 117 | 118 | 0 0 m 119 | -1 0.333 l 120 | -0.8 0 l 121 | -1 -0.333 l 122 | h 123 | 124 | 125 | 126 | 127 | 0 0 m 128 | -1 0.333 l 129 | -0.8 0 l 130 | -1 -0.333 l 131 | h 132 | 133 | 134 | 135 | 136 | -1 0.333 m 137 | 0 0 l 138 | -1 -0.333 l 139 | 140 | 141 | 142 | 143 | 0 0 m 144 | -1 0.333 l 145 | -1 -0.333 l 146 | h 147 | -1 0 m 148 | -2 0.333 l 149 | -2 -0.333 l 150 | h 151 | 152 | 153 | 154 | 155 | 0 0 m 156 | -1 0.333 l 157 | -1 -0.333 l 158 | h 159 | -1 0 m 160 | -2 0.333 l 161 | -2 -0.333 l 162 | h 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 192 768 m 237 | 192 576 l 238 | 448 576 l 239 | 448 768 l 240 | h 241 | 242 | 243 | 244 | 192 672 m 245 | 448 672 l 246 | 247 | 248 | 224 674.5 m 249 | 224 669.5 l 250 | 251 | 252 | 256 674.5 m 253 | 256 669.5 l 254 | 255 | 256 | 288 674.5 m 257 | 288 669.5 l 258 | 259 | 260 | 320 674.5 m 261 | 320 669.5 l 262 | 263 | 264 | 352 674.5 m 265 | 352 669.5 l 266 | 267 | 268 | 384 674.5 m 269 | 384 669.5 l 270 | 271 | 272 | 416 674.5 m 273 | 416 669.5 l 274 | 275 | 276 | 320 576 m 277 | 320 768 l 278 | 279 | 280 | 322.5 608 m 281 | 317.5 608 l 282 | 283 | 284 | 322.5 640 m 285 | 317.5 640 l 286 | 287 | 288 | 322.5 672 m 289 | 317.5 672 l 290 | 291 | 292 | 322.5 704 m 293 | 317.5 704 l 294 | 295 | 296 | 322.5 736 m 297 | 317.5 736 l 298 | 299 | 300 | 301 | 302 | 192 669.867 m 303 | 193.597 669.81 195.195 669.75 196.792 669.685 c 304 | 198.389 669.621 199.987 669.552 201.584 669.479 c 305 | 203.182 669.406 204.779 669.327 206.376 669.243 c 306 | 207.974 669.159 209.571 669.069 211.168 668.972 c 307 | 212.766 668.874 214.363 668.77 215.96 668.656 c 308 | 217.558 668.543 219.155 668.421 220.752 668.287 c 309 | 222.35 668.154 223.947 668.01 225.545 667.851 c 310 | 227.142 667.692 228.739 667.52 230.337 667.329 c 311 | 231.934 667.139 233.531 666.93 235.129 666.697 c 312 | 236.726 666.464 238.323 666.208 239.921 665.919 c 313 | 241.518 665.63 243.116 665.309 244.713 664.944 c 314 | 246.31 664.579 247.908 664.17 249.505 663.695 c 315 | 251.102 663.22 252.7 662.68 254.297 662.049 c 316 | 255.894 661.417 257.492 660.694 259.089 659.801 c 317 | 260.687 658.908 262.284 657.846 263.881 656.582 c 318 | 265.479 655.318 267.076 653.852 268.673 651.653 c 319 | 270.271 649.453 271.868 646.519 273.465 643.293 c 320 | 275.063 640.067 276.66 636.548 278.257 626.39 c 321 | 279.855 616.232 281.452 599.435 283.05 576 c 322 | 323 | 324 | 293.872 768 m 325 | 294.789 756.304 295.706 747.18 296.622 740.626 c 326 | 297.539 734.072 298.456 730.089 299.373 726.749 c 327 | 300.289 723.409 301.206 720.711 302.123 718.518 c 328 | 303.04 716.325 303.957 714.637 304.873 713.208 c 329 | 305.79 711.78 306.707 710.611 307.624 709.629 c 330 | 308.54 708.646 309.457 707.85 310.374 707.184 c 331 | 311.291 706.518 312.207 705.982 313.124 705.549 c 332 | 314.041 705.116 314.958 704.785 315.875 704.541 c 333 | 316.791 704.296 317.708 704.138 318.625 704.059 c 334 | 319.542 703.98 320.458 703.98 321.375 704.059 c 335 | 322.292 704.138 323.209 704.296 324.125 704.541 c 336 | 325.042 704.785 325.959 705.116 326.876 705.549 c 337 | 327.793 705.982 328.709 706.518 329.626 707.184 c 338 | 330.543 707.85 331.46 708.646 332.376 709.629 c 339 | 333.293 710.611 334.21 711.78 335.127 713.208 c 340 | 336.043 714.637 336.96 716.325 337.877 718.518 c 341 | 338.794 720.711 339.711 723.409 340.627 726.749 c 342 | 341.544 730.089 342.461 734.072 343.378 740.626 c 343 | 344.294 747.18 345.211 756.304 346.128 768 c 344 | 345 | 346 | 356.95 576 m 347 | 358.548 599.435 360.145 616.232 361.743 626.39 c 348 | 363.34 636.548 364.937 640.067 366.535 643.293 c 349 | 368.132 646.519 369.729 649.453 371.327 651.653 c 350 | 372.924 653.852 374.521 655.318 376.119 656.582 c 351 | 377.716 657.846 379.313 658.908 380.911 659.801 c 352 | 382.508 660.694 384.106 661.417 385.703 662.049 c 353 | 387.3 662.68 388.898 663.22 390.495 663.695 c 354 | 392.092 664.17 393.69 664.579 395.287 664.944 c 355 | 396.884 665.309 398.482 665.63 400.079 665.919 c 356 | 401.677 666.208 403.274 666.464 404.871 666.697 c 357 | 406.469 666.93 408.066 667.139 409.663 667.329 c 358 | 411.261 667.52 412.858 667.692 414.455 667.851 c 359 | 416.053 668.01 417.65 668.154 419.248 668.287 c 360 | 420.845 668.421 422.442 668.543 424.04 668.656 c 361 | 425.637 668.77 427.234 668.874 428.832 668.972 c 362 | 430.429 669.069 432.026 669.159 433.624 669.243 c 363 | 435.221 669.327 436.818 669.406 438.416 669.479 c 364 | 440.013 669.552 441.611 669.621 443.208 669.685 c 365 | 444.805 669.75 446.403 669.81 448 669.867 c 366 | 367 | 368 | $x$ 369 | $y$ 370 | 371 | 372 | -------------------------------------------------------------------------------- /manual/param.ipe: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 0 0 m 9 | -1 0.333 l 10 | -1 -0.333 l 11 | h 12 | 13 | 14 | 15 | 16 | 0 0 m 17 | -1 0.333 l 18 | -1 -0.333 l 19 | h 20 | 21 | 22 | 23 | 24 | 0.6 0 0 0.6 0 0 e 25 | 0.4 0 0 0.4 0 0 e 26 | 27 | 28 | 29 | 30 | 0.6 0 0 0.6 0 0 e 31 | 32 | 33 | 34 | 35 | 36 | 0.5 0 0 0.5 0 0 e 37 | 38 | 39 | 0.6 0 0 0.6 0 0 e 40 | 0.4 0 0 0.4 0 0 e 41 | 42 | 43 | 44 | 45 | 46 | -0.6 -0.6 m 47 | 0.6 -0.6 l 48 | 0.6 0.6 l 49 | -0.6 0.6 l 50 | h 51 | -0.4 -0.4 m 52 | 0.4 -0.4 l 53 | 0.4 0.4 l 54 | -0.4 0.4 l 55 | h 56 | 57 | 58 | 59 | 60 | -0.6 -0.6 m 61 | 0.6 -0.6 l 62 | 0.6 0.6 l 63 | -0.6 0.6 l 64 | h 65 | 66 | 67 | 68 | 69 | 70 | -0.5 -0.5 m 71 | 0.5 -0.5 l 72 | 0.5 0.5 l 73 | -0.5 0.5 l 74 | h 75 | 76 | 77 | -0.6 -0.6 m 78 | 0.6 -0.6 l 79 | 0.6 0.6 l 80 | -0.6 0.6 l 81 | h 82 | -0.4 -0.4 m 83 | 0.4 -0.4 l 84 | 0.4 0.4 l 85 | -0.4 0.4 l 86 | h 87 | 88 | 89 | 90 | 91 | 92 | 93 | -0.43 -0.57 m 94 | 0.57 0.43 l 95 | 0.43 0.57 l 96 | -0.57 -0.43 l 97 | h 98 | 99 | 100 | -0.43 0.57 m 101 | 0.57 -0.43 l 102 | 0.43 -0.57 l 103 | -0.57 0.43 l 104 | h 105 | 106 | 107 | 108 | 109 | 110 | 0 0 m 111 | -1 0.333 l 112 | -1 -0.333 l 113 | h 114 | 115 | 116 | 117 | 118 | 0 0 m 119 | -1 0.333 l 120 | -0.8 0 l 121 | -1 -0.333 l 122 | h 123 | 124 | 125 | 126 | 127 | 0 0 m 128 | -1 0.333 l 129 | -0.8 0 l 130 | -1 -0.333 l 131 | h 132 | 133 | 134 | 135 | 136 | -1 0.333 m 137 | 0 0 l 138 | -1 -0.333 l 139 | 140 | 141 | 142 | 143 | 0 0 m 144 | -1 0.333 l 145 | -1 -0.333 l 146 | h 147 | -1 0 m 148 | -2 0.333 l 149 | -2 -0.333 l 150 | h 151 | 152 | 153 | 154 | 155 | 0 0 m 156 | -1 0.333 l 157 | -1 -0.333 l 158 | h 159 | -1 0 m 160 | -2 0.333 l 161 | -2 -0.333 l 162 | h 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 128 385 m 237 | 128 113 l 238 | 494 113 l 239 | 494 385 l 240 | h 241 | 242 | 243 | 311 362.333 m 244 | 317.411 362.328 323.782 361.659 330.113 360.326 c 245 | 336.445 358.993 342.736 356.996 348.925 354.375 c 246 | 355.114 351.753 361.2 348.506 367.139 344.69 c 247 | 373.078 340.875 378.87 336.491 384.467 331.616 c 248 | 390.065 326.742 395.469 321.377 400.637 315.616 c 249 | 405.805 309.855 410.737 303.698 415.393 297.255 c 250 | 420.05 290.812 424.431 284.082 428.503 277.185 c 251 | 432.575 270.288 436.337 263.223 439.76 256.116 c 252 | 443.183 249.009 446.266 241.86 448.986 234.796 c 253 | 451.706 227.731 454.062 220.75 456.036 213.978 c 254 | 458.01 207.206 459.602 200.641 460.799 194.401 c 255 | 461.996 188.161 462.798 182.245 463.199 176.759 c 256 | 463.6 171.272 463.6 166.214 463.199 161.675 c 257 | 462.798 157.136 461.996 153.116 460.799 149.685 c 258 | 459.602 146.255 458.01 143.414 456.036 141.214 c 259 | 454.062 139.013 451.706 137.453 448.986 136.56 c 260 | 446.266 135.668 443.183 135.443 439.76 135.89 c 261 | 436.337 136.337 432.575 137.456 428.503 139.227 c 262 | 424.431 140.998 420.05 143.421 415.393 146.453 c 263 | 410.737 149.485 405.805 153.126 400.637 157.311 c 264 | 395.469 161.497 390.065 166.227 384.467 171.418 c 265 | 378.87 176.609 373.078 182.261 367.139 188.273 c 266 | 361.2 194.285 355.112 200.658 348.925 207.279 c 267 | 342.738 213.9 336.451 220.769 330.113 227.763 c 268 | 323.776 234.758 317.388 241.879 311 249 c 269 | 304.612 256.121 298.224 263.242 291.887 270.237 c 270 | 285.549 277.231 279.262 284.1 273.075 290.721 c 271 | 266.888 297.342 260.8 303.715 254.861 309.727 c 272 | 248.922 315.739 243.13 321.391 237.533 326.582 c 273 | 231.935 331.773 226.531 336.503 221.363 340.689 c 274 | 216.195 344.874 211.263 348.515 206.607 351.547 c 275 | 201.95 354.579 197.569 357.002 193.497 358.773 c 276 | 189.425 360.544 185.663 361.663 182.24 362.11 c 277 | 178.817 362.557 175.734 362.332 173.014 361.44 c 278 | 170.294 360.547 167.938 358.987 165.964 356.786 c 279 | 163.99 354.586 162.398 351.745 161.201 348.315 c 280 | 160.004 344.884 159.202 340.864 158.801 336.325 c 281 | 158.4 331.786 158.4 326.728 158.801 321.241 c 282 | 159.202 315.755 160.004 309.839 161.201 303.599 c 283 | 162.398 297.359 163.99 290.794 165.964 284.022 c 284 | 167.938 277.25 170.294 270.269 173.014 263.204 c 285 | 175.734 256.14 178.817 248.991 182.24 241.884 c 286 | 185.663 234.777 189.425 227.712 193.497 220.815 c 287 | 197.569 213.918 201.95 207.188 206.607 200.745 c 288 | 211.263 194.302 216.195 188.145 221.363 182.384 c 289 | 226.531 176.623 231.935 171.258 237.533 166.384 c 290 | 243.13 161.509 248.922 157.125 254.861 153.31 c 291 | 260.8 149.494 266.888 146.247 273.075 143.625 c 292 | 279.262 141.004 285.549 139.008 291.887 137.674 c 293 | 298.224 136.34 304.612 135.667 311 135.667 c 294 | 317.388 135.667 323.776 136.34 330.113 137.674 c 295 | 336.451 139.008 342.738 141.004 348.925 143.625 c 296 | 355.112 146.247 361.2 149.494 367.139 153.31 c 297 | 373.078 157.125 378.87 161.509 384.467 166.384 c 298 | 390.065 171.258 395.469 176.623 400.637 182.384 c 299 | 405.805 188.145 410.737 194.302 415.393 200.745 c 300 | 420.05 207.188 424.431 213.918 428.503 220.815 c 301 | 432.575 227.712 436.337 234.777 439.76 241.884 c 302 | 443.183 248.991 446.266 256.14 448.986 263.204 c 303 | 451.706 270.269 454.062 277.25 456.036 284.022 c 304 | 458.01 290.794 459.602 297.359 460.799 303.599 c 305 | 461.996 309.839 462.798 315.755 463.199 321.241 c 306 | 463.6 326.728 463.6 331.786 463.199 336.325 c 307 | 462.798 340.864 461.996 344.884 460.799 348.315 c 308 | 459.602 351.745 458.01 354.586 456.036 356.786 c 309 | 454.062 358.987 451.706 360.547 448.986 361.44 c 310 | 446.266 362.332 443.183 362.557 439.76 362.11 c 311 | 436.337 361.663 432.575 360.544 428.503 358.773 c 312 | 424.431 357.002 420.05 354.579 415.393 351.547 c 313 | 410.737 348.515 405.805 344.874 400.637 340.689 c 314 | 395.469 336.503 390.065 331.773 384.467 326.582 c 315 | 378.87 321.391 373.078 315.739 367.139 309.727 c 316 | 361.2 303.715 355.112 297.342 348.925 290.721 c 317 | 342.738 284.1 336.451 277.231 330.113 270.237 c 318 | 323.776 263.242 317.388 256.121 311 249 c 319 | 304.612 241.879 298.224 234.758 291.887 227.763 c 320 | 285.549 220.769 279.262 213.9 273.075 207.279 c 321 | 266.888 200.658 260.8 194.285 254.861 188.273 c 322 | 248.922 182.261 243.13 176.609 237.533 171.418 c 323 | 231.935 166.227 226.531 161.497 221.363 157.311 c 324 | 216.195 153.126 211.263 149.485 206.607 146.453 c 325 | 201.95 143.421 197.569 140.998 193.497 139.227 c 326 | 189.425 137.456 185.663 136.337 182.24 135.89 c 327 | 178.817 135.443 175.734 135.668 173.014 136.56 c 328 | 170.294 137.453 167.938 139.013 165.964 141.214 c 329 | 163.99 143.414 162.398 146.255 161.201 149.685 c 330 | 160.004 153.116 159.202 157.136 158.801 161.675 c 331 | 158.4 166.214 158.4 171.272 158.801 176.759 c 332 | 159.202 182.245 160.004 188.161 161.201 194.401 c 333 | 162.398 200.641 163.99 207.206 165.964 213.978 c 334 | 167.938 220.75 170.294 227.731 173.014 234.796 c 335 | 175.734 241.86 178.817 249.009 182.24 256.116 c 336 | 185.663 263.223 189.425 270.288 193.497 277.185 c 337 | 197.569 284.082 201.95 290.812 206.607 297.255 c 338 | 211.263 303.698 216.195 309.855 221.363 315.616 c 339 | 226.531 321.377 231.935 326.742 237.533 331.616 c 340 | 243.13 336.491 248.922 340.875 254.861 344.69 c 341 | 260.8 348.506 266.886 351.753 273.075 354.375 c 342 | 279.264 356.996 285.555 358.993 291.887 360.326 c 343 | 298.218 361.659 304.589 362.328 311 362.333 c 344 | 345 | 346 | 347 | -------------------------------------------------------------------------------- /manual/function.ipe: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 0 0 m 9 | -1 0.333 l 10 | -1 -0.333 l 11 | h 12 | 13 | 14 | 15 | 16 | 0 0 m 17 | -1 0.333 l 18 | -1 -0.333 l 19 | h 20 | 21 | 22 | 23 | 24 | 0.6 0 0 0.6 0 0 e 25 | 0.4 0 0 0.4 0 0 e 26 | 27 | 28 | 29 | 30 | 0.6 0 0 0.6 0 0 e 31 | 32 | 33 | 34 | 35 | 36 | 0.5 0 0 0.5 0 0 e 37 | 38 | 39 | 0.6 0 0 0.6 0 0 e 40 | 0.4 0 0 0.4 0 0 e 41 | 42 | 43 | 44 | 45 | 46 | -0.6 -0.6 m 47 | 0.6 -0.6 l 48 | 0.6 0.6 l 49 | -0.6 0.6 l 50 | h 51 | -0.4 -0.4 m 52 | 0.4 -0.4 l 53 | 0.4 0.4 l 54 | -0.4 0.4 l 55 | h 56 | 57 | 58 | 59 | 60 | -0.6 -0.6 m 61 | 0.6 -0.6 l 62 | 0.6 0.6 l 63 | -0.6 0.6 l 64 | h 65 | 66 | 67 | 68 | 69 | 70 | -0.5 -0.5 m 71 | 0.5 -0.5 l 72 | 0.5 0.5 l 73 | -0.5 0.5 l 74 | h 75 | 76 | 77 | -0.6 -0.6 m 78 | 0.6 -0.6 l 79 | 0.6 0.6 l 80 | -0.6 0.6 l 81 | h 82 | -0.4 -0.4 m 83 | 0.4 -0.4 l 84 | 0.4 0.4 l 85 | -0.4 0.4 l 86 | h 87 | 88 | 89 | 90 | 91 | 92 | 93 | -0.43 -0.57 m 94 | 0.57 0.43 l 95 | 0.43 0.57 l 96 | -0.57 -0.43 l 97 | h 98 | 99 | 100 | -0.43 0.57 m 101 | 0.57 -0.43 l 102 | 0.43 -0.57 l 103 | -0.57 0.43 l 104 | h 105 | 106 | 107 | 108 | 109 | 110 | 0 0 m 111 | -1 0.333 l 112 | -1 -0.333 l 113 | h 114 | 115 | 116 | 117 | 118 | 0 0 m 119 | -1 0.333 l 120 | -0.8 0 l 121 | -1 -0.333 l 122 | h 123 | 124 | 125 | 126 | 127 | 0 0 m 128 | -1 0.333 l 129 | -0.8 0 l 130 | -1 -0.333 l 131 | h 132 | 133 | 134 | 135 | 136 | -1 0.333 m 137 | 0 0 l 138 | -1 -0.333 l 139 | 140 | 141 | 142 | 143 | 0 0 m 144 | -1 0.333 l 145 | -1 -0.333 l 146 | h 147 | -1 0 m 148 | -2 0.333 l 149 | -2 -0.333 l 150 | h 151 | 152 | 153 | 154 | 155 | 0 0 m 156 | -1 0.333 l 157 | -1 -0.333 l 158 | h 159 | -1 0 m 160 | -2 0.333 l 161 | -2 -0.333 l 162 | h 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 128 385 m 237 | 128 113 l 238 | 494 113 l 239 | 494 385 l 240 | h 241 | 242 | 243 | 138.953 249 m 244 | 140.111 247.08 141.27 245.163 142.429 243.25 c 245 | 143.587 241.336 144.746 239.425 145.904 237.522 c 246 | 147.063 235.619 148.221 233.725 149.38 231.841 c 247 | 150.539 229.958 151.697 228.086 152.856 226.229 c 248 | 154.014 224.373 155.173 222.531 156.331 220.709 c 249 | 157.49 218.887 158.648 217.083 159.807 215.303 c 250 | 160.966 213.522 162.124 211.764 163.283 210.032 c 251 | 164.441 208.3 165.6 206.594 166.758 204.918 c 252 | 167.917 203.242 169.076 201.596 170.234 199.982 c 253 | 171.393 198.368 172.551 196.788 173.71 195.243 c 254 | 174.868 193.698 176.027 192.19 177.186 190.721 c 255 | 178.344 189.251 179.503 187.821 180.661 186.433 c 256 | 181.82 185.045 182.978 183.698 184.137 182.397 c 257 | 185.296 181.096 186.454 179.839 187.613 178.629 c 258 | 188.771 177.42 189.93 176.258 191.088 175.145 c 259 | 192.247 174.033 193.405 172.969 194.564 171.958 c 260 | 195.723 170.947 196.881 169.987 198.04 169.082 c 261 | 199.198 168.176 200.357 167.324 201.515 166.527 c 262 | 202.674 165.73 203.833 164.988 204.991 164.304 c 263 | 206.15 163.619 207.308 162.992 208.467 162.422 c 264 | 209.625 161.853 210.784 161.341 211.943 160.889 c 265 | 213.101 160.437 214.26 160.044 215.418 159.711 c 266 | 216.577 159.378 217.735 159.105 218.894 158.892 c 267 | 220.053 158.679 221.211 158.527 222.37 158.436 c 268 | 223.528 158.345 224.687 158.314 225.845 158.345 c 269 | 227.004 158.375 228.162 158.466 229.321 158.619 c 270 | 230.48 158.771 231.638 158.983 232.797 159.256 c 271 | 233.955 159.529 235.114 159.862 236.272 160.255 c 272 | 237.431 160.648 238.59 161.101 239.748 161.612 c 273 | 240.907 162.123 242.065 162.693 243.224 163.32 c 274 | 244.382 163.947 245.541 164.632 246.7 165.373 c 275 | 247.858 166.114 249.017 166.911 250.175 167.763 c 276 | 251.334 168.615 252.492 169.521 253.651 170.48 c 277 | 254.81 171.439 255.968 172.451 257.127 173.514 c 278 | 258.285 174.576 259.444 175.689 260.602 176.851 c 279 | 261.761 178.013 262.919 179.223 264.078 180.479 c 280 | 265.237 181.735 266.395 183.037 267.554 184.382 c 281 | 268.712 185.728 269.871 187.117 271.029 188.546 c 282 | 272.188 189.976 273.347 191.446 274.505 192.954 c 283 | 275.664 194.461 276.822 196.007 277.981 197.587 c 284 | 279.139 199.166 280.298 200.781 281.457 202.427 c 285 | 282.615 204.072 283.774 205.749 284.932 207.454 c 286 | 286.091 209.159 287.249 210.892 288.408 212.649 c 287 | 289.567 214.406 290.725 216.188 291.884 217.99 c 288 | 293.042 219.793 294.201 221.616 295.359 223.456 c 289 | 296.518 225.297 297.676 227.154 298.835 229.025 c 290 | 299.994 230.896 301.152 232.781 302.311 234.675 c 291 | 303.469 236.569 304.628 238.472 305.786 240.382 c 292 | 306.945 242.291 308.104 244.206 309.262 246.123 c 293 | 310.421 248.04 311.579 249.96 312.738 251.877 c 294 | 313.896 253.794 315.055 255.709 316.214 257.618 c 295 | 317.372 259.528 318.531 261.431 319.689 263.325 c 296 | 320.848 265.219 322.006 267.104 323.165 268.975 c 297 | 324.324 270.846 325.482 272.703 326.641 274.544 c 298 | 327.799 276.384 328.958 278.207 330.116 280.01 c 299 | 331.275 281.812 332.433 283.594 333.592 285.351 c 300 | 334.751 287.108 335.909 288.841 337.068 290.546 c 301 | 338.226 292.251 339.385 293.928 340.543 295.573 c 302 | 341.702 297.219 342.861 298.834 344.019 300.413 c 303 | 345.178 301.993 346.336 303.539 347.495 305.046 c 304 | 348.653 306.554 349.812 308.024 350.971 309.454 c 305 | 352.129 310.883 353.288 312.272 354.446 313.618 c 306 | 355.605 314.963 356.763 316.265 357.922 317.521 c 307 | 359.081 318.777 360.239 319.987 361.398 321.149 c 308 | 362.556 322.311 363.715 323.424 364.873 324.486 c 309 | 366.032 325.549 367.19 326.561 368.349 327.52 c 310 | 369.508 328.479 370.666 329.385 371.825 330.237 c 311 | 372.983 331.089 374.142 331.886 375.3 332.627 c 312 | 376.459 333.368 377.618 334.053 378.776 334.68 c 313 | 379.935 335.307 381.093 335.877 382.252 336.388 c 314 | 383.41 336.899 384.569 337.352 385.728 337.745 c 315 | 386.886 338.138 388.045 338.471 389.203 338.744 c 316 | 390.362 339.017 391.52 339.229 392.679 339.381 c 317 | 393.838 339.534 394.996 339.625 396.155 339.655 c 318 | 397.313 339.686 398.472 339.655 399.63 339.564 c 319 | 400.789 339.473 401.947 339.321 403.106 339.108 c 320 | 404.265 338.895 405.423 338.622 406.582 338.289 c 321 | 407.74 337.956 408.899 337.563 410.057 337.111 c 322 | 411.216 336.659 412.375 336.147 413.533 335.578 c 323 | 414.692 335.008 415.85 334.381 417.009 333.696 c 324 | 418.167 333.012 419.326 332.27 420.485 331.473 c 325 | 421.643 330.676 422.802 329.824 423.96 328.918 c 326 | 425.119 328.013 426.277 327.053 427.436 326.042 c 327 | 428.595 325.031 429.753 323.967 430.912 322.855 c 328 | 432.07 321.742 433.229 320.58 434.387 319.371 c 329 | 435.546 318.161 436.704 316.904 437.863 315.603 c 330 | 439.022 314.302 440.18 312.955 441.339 311.567 c 331 | 442.497 310.179 443.656 308.749 444.814 307.279 c 332 | 445.973 305.81 447.132 304.302 448.29 302.757 c 333 | 449.449 301.212 450.607 299.632 451.766 298.018 c 334 | 452.924 296.404 454.083 294.758 455.242 293.082 c 335 | 456.4 291.406 457.559 289.7 458.717 287.968 c 336 | 459.876 286.236 461.034 284.478 462.193 282.697 c 337 | 463.352 280.917 464.51 279.113 465.669 277.291 c 338 | 466.827 275.469 467.986 273.627 469.144 271.771 c 339 | 470.303 269.914 471.461 268.042 472.62 266.159 c 340 | 473.779 264.275 474.937 262.381 476.096 260.478 c 341 | 477.254 258.575 478.413 256.664 479.571 254.75 c 342 | 480.73 252.837 481.889 250.92 483.047 249 c 343 | 344 | 345 | 346 | -------------------------------------------------------------------------------- /manual/spliced_curve.ipe: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 0 0 m 9 | -1 0.333 l 10 | -1 -0.333 l 11 | h 12 | 13 | 14 | 15 | 16 | 0 0 m 17 | -1 0.333 l 18 | -1 -0.333 l 19 | h 20 | 21 | 22 | 23 | 24 | 0.6 0 0 0.6 0 0 e 25 | 0.4 0 0 0.4 0 0 e 26 | 27 | 28 | 29 | 30 | 0.6 0 0 0.6 0 0 e 31 | 32 | 33 | 34 | 35 | 36 | 0.5 0 0 0.5 0 0 e 37 | 38 | 39 | 0.6 0 0 0.6 0 0 e 40 | 0.4 0 0 0.4 0 0 e 41 | 42 | 43 | 44 | 45 | 46 | -0.6 -0.6 m 47 | 0.6 -0.6 l 48 | 0.6 0.6 l 49 | -0.6 0.6 l 50 | h 51 | -0.4 -0.4 m 52 | 0.4 -0.4 l 53 | 0.4 0.4 l 54 | -0.4 0.4 l 55 | h 56 | 57 | 58 | 59 | 60 | -0.6 -0.6 m 61 | 0.6 -0.6 l 62 | 0.6 0.6 l 63 | -0.6 0.6 l 64 | h 65 | 66 | 67 | 68 | 69 | 70 | -0.5 -0.5 m 71 | 0.5 -0.5 l 72 | 0.5 0.5 l 73 | -0.5 0.5 l 74 | h 75 | 76 | 77 | -0.6 -0.6 m 78 | 0.6 -0.6 l 79 | 0.6 0.6 l 80 | -0.6 0.6 l 81 | h 82 | -0.4 -0.4 m 83 | 0.4 -0.4 l 84 | 0.4 0.4 l 85 | -0.4 0.4 l 86 | h 87 | 88 | 89 | 90 | 91 | 92 | 93 | -0.43 -0.57 m 94 | 0.57 0.43 l 95 | 0.43 0.57 l 96 | -0.57 -0.43 l 97 | h 98 | 99 | 100 | -0.43 0.57 m 101 | 0.57 -0.43 l 102 | 0.43 -0.57 l 103 | -0.57 0.43 l 104 | h 105 | 106 | 107 | 108 | 109 | 110 | 0 0 m 111 | -1 0.333 l 112 | -1 -0.333 l 113 | h 114 | 115 | 116 | 117 | 118 | 0 0 m 119 | -1 0.333 l 120 | -0.8 0 l 121 | -1 -0.333 l 122 | h 123 | 124 | 125 | 126 | 127 | 0 0 m 128 | -1 0.333 l 129 | -0.8 0 l 130 | -1 -0.333 l 131 | h 132 | 133 | 134 | 135 | 136 | -1 0.333 m 137 | 0 0 l 138 | -1 -0.333 l 139 | 140 | 141 | 142 | 143 | 0 0 m 144 | -1 0.333 l 145 | -1 -0.333 l 146 | h 147 | -1 0 m 148 | -2 0.333 l 149 | -2 -0.333 l 150 | h 151 | 152 | 153 | 154 | 155 | 0 0 m 156 | -1 0.333 l 157 | -1 -0.333 l 158 | h 159 | -1 0 m 160 | -2 0.333 l 161 | -2 -0.333 l 162 | h 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 320 128 m 238 | 64 0 0 -64 320 192 320 256 a 239 | 240 | 241 | 320 256 m 242 | 321.342 256 322.681 256.095 324.019 256.284 c 243 | 325.356 256.473 326.691 256.757 328.021 257.134 c 244 | 329.351 257.51 330.676 257.98 331.992 258.541 c 245 | 333.309 259.102 334.618 259.754 335.916 260.494 c 246 | 337.214 261.234 338.502 262.063 339.777 262.976 c 247 | 341.052 263.888 342.314 264.886 343.56 265.963 c 248 | 344.806 267.04 346.037 268.198 347.25 269.43 c 249 | 348.463 270.662 349.658 271.97 350.832 273.346 c 250 | 352.007 274.722 353.161 276.168 354.293 277.676 c 251 | 355.425 279.184 356.534 280.755 357.618 282.382 c 252 | 358.703 284.008 359.762 285.691 360.795 287.421 c 253 | 361.828 289.152 362.834 290.931 363.811 292.75 c 254 | 364.788 294.569 365.736 296.429 366.654 298.321 c 255 | 367.572 300.213 368.458 302.136 369.313 304.084 c 256 | 370.167 306.031 370.989 308.002 371.777 309.988 c 257 | 372.565 311.974 373.319 313.975 374.037 315.981 c 258 | 374.755 317.988 375.438 320.001 376.084 322.01 c 259 | 376.729 324.02 377.338 326.027 377.909 328.021 c 260 | 378.48 330.016 379.012 331.999 379.506 333.961 c 261 | 379.999 335.923 380.453 337.865 380.868 339.777 c 262 | 381.282 341.689 381.656 343.572 381.989 345.417 c 263 | 382.323 347.263 382.615 349.07 382.866 350.832 c 264 | 383.118 352.594 383.327 354.31 383.495 355.973 c 265 | 383.663 357.636 383.79 359.246 383.874 360.795 c 266 | 383.958 362.344 384 363.833 384 365.255 c 267 | 384 366.677 383.958 368.031 383.874 369.313 c 268 | 383.79 370.594 383.663 371.803 383.495 372.933 c 269 | 383.327 374.063 383.118 375.115 382.866 376.084 c 270 | 382.615 377.052 382.323 377.938 381.989 378.736 c 271 | 381.656 379.535 381.282 380.246 380.868 380.868 c 272 | 380.453 381.489 379.999 382.02 379.506 382.459 c 273 | 379.012 382.897 378.48 383.243 377.909 383.495 c 274 | 377.338 383.747 376.729 383.905 376.084 383.968 c 275 | 375.438 384.032 374.755 384 374.037 383.874 c 276 | 373.319 383.747 372.565 383.527 371.777 383.212 c 277 | 370.989 382.898 370.167 382.489 369.313 381.989 c 278 | 368.458 381.489 367.572 380.897 366.654 380.216 c 279 | 365.736 379.535 364.788 378.765 363.811 377.909 c 280 | 362.834 377.053 361.828 376.111 360.795 375.087 c 281 | 359.762 374.064 358.703 372.959 357.618 371.777 c 282 | 356.534 370.595 355.425 369.337 354.293 368.007 c 283 | 353.161 366.677 352.007 365.277 350.832 363.811 c 284 | 349.658 362.345 348.463 360.815 347.25 359.226 c 285 | 346.037 357.637 344.806 355.991 343.56 354.293 c 286 | 342.314 352.595 341.052 350.847 339.777 349.055 c 287 | 338.502 347.264 337.214 345.429 335.916 343.56 c 288 | 334.618 341.691 333.309 339.786 331.992 337.855 c 289 | 330.676 335.925 329.351 333.967 328.021 331.992 c 290 | 326.691 330.017 325.356 328.025 324.019 326.023 c 291 | 322.681 324.021 321.34 322.011 320 320 c 292 | 318.66 317.989 317.319 315.979 315.981 313.977 c 293 | 314.644 311.975 313.309 309.983 311.979 308.008 c 294 | 310.649 306.033 309.324 304.075 308.008 302.145 c 295 | 306.691 300.214 305.382 298.309 304.084 296.44 c 296 | 302.786 294.571 301.498 292.736 300.223 290.945 c 297 | 298.948 289.153 297.686 287.405 296.44 285.707 c 298 | 295.194 284.009 293.963 282.363 292.75 280.774 c 299 | 291.537 279.185 290.342 277.655 289.168 276.189 c 300 | 287.993 274.723 286.839 273.323 285.707 271.993 c 301 | 284.575 270.663 283.466 269.405 282.382 268.223 c 302 | 281.297 267.041 280.238 265.936 279.205 264.913 c 303 | 278.172 263.889 277.166 262.947 276.189 262.091 c 304 | 275.212 261.235 274.264 260.465 273.346 259.784 c 305 | 272.428 259.103 271.542 258.511 270.687 258.011 c 306 | 269.833 257.511 269.011 257.102 268.223 256.788 c 307 | 267.435 256.473 266.681 256.253 265.963 256.126 c 308 | 265.245 256 264.562 255.968 263.916 256.032 c 309 | 263.271 256.095 262.662 256.253 262.091 256.505 c 310 | 261.52 256.757 260.988 257.103 260.494 257.541 c 311 | 260.001 257.98 259.547 258.511 259.132 259.132 c 312 | 258.718 259.754 258.344 260.465 258.011 261.264 c 313 | 257.677 262.062 257.385 262.948 257.134 263.916 c 314 | 256.882 264.885 256.673 265.937 256.505 267.067 c 315 | 256.337 268.197 256.21 269.406 256.126 270.687 c 316 | 256.042 271.969 256 273.323 256 274.745 c 317 | 256 276.167 256.042 277.656 256.126 279.205 c 318 | 256.21 280.754 256.337 282.364 256.505 284.027 c 319 | 256.673 285.69 256.882 287.406 257.134 289.168 c 320 | 257.385 290.93 257.677 292.737 258.011 294.583 c 321 | 258.344 296.428 258.718 298.311 259.132 300.223 c 322 | 259.547 302.135 260.001 304.077 260.494 306.039 c 323 | 260.988 308.001 261.52 309.984 262.091 311.979 c 324 | 262.662 313.973 263.271 315.98 263.916 317.99 c 325 | 264.562 319.999 265.245 322.012 265.963 324.019 c 326 | 266.681 326.025 267.435 328.026 268.223 330.012 c 327 | 269.011 331.998 269.833 333.969 270.687 335.916 c 328 | 271.542 337.864 272.428 339.787 273.346 341.679 c 329 | 274.264 343.571 275.212 345.431 276.189 347.25 c 330 | 277.166 349.069 278.172 350.848 279.205 352.579 c 331 | 280.238 354.309 281.297 355.992 282.382 357.618 c 332 | 283.466 359.245 284.575 360.816 285.707 362.324 c 333 | 286.839 363.832 287.993 365.278 289.168 366.654 c 334 | 290.342 368.03 291.537 369.338 292.75 370.57 c 335 | 293.963 371.802 295.194 372.96 296.44 374.037 c 336 | 297.686 375.114 298.948 376.112 300.223 377.024 c 337 | 301.498 377.937 302.786 378.766 304.084 379.506 c 338 | 305.382 380.246 306.691 380.898 308.008 381.459 c 339 | 309.324 382.02 310.649 382.49 311.979 382.866 c 340 | 313.309 383.243 314.644 383.527 315.981 383.716 c 341 | 317.319 383.905 318.658 384 320 384 c 342 | 343 | 344 | 320 384 m 345 | 64 0 0 64 320 448 320 512 a 346 | 347 | 348 | 349 | 350 | -------------------------------------------------------------------------------- /manual/trig.ipe: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 0 0 m 9 | -1 0.333 l 10 | -1 -0.333 l 11 | h 12 | 13 | 14 | 15 | 16 | 0 0 m 17 | -1 0.333 l 18 | -1 -0.333 l 19 | h 20 | 21 | 22 | 23 | 24 | 0.6 0 0 0.6 0 0 e 25 | 0.4 0 0 0.4 0 0 e 26 | 27 | 28 | 29 | 30 | 0.6 0 0 0.6 0 0 e 31 | 32 | 33 | 34 | 35 | 36 | 0.5 0 0 0.5 0 0 e 37 | 38 | 39 | 0.6 0 0 0.6 0 0 e 40 | 0.4 0 0 0.4 0 0 e 41 | 42 | 43 | 44 | 45 | 46 | -0.6 -0.6 m 47 | 0.6 -0.6 l 48 | 0.6 0.6 l 49 | -0.6 0.6 l 50 | h 51 | -0.4 -0.4 m 52 | 0.4 -0.4 l 53 | 0.4 0.4 l 54 | -0.4 0.4 l 55 | h 56 | 57 | 58 | 59 | 60 | -0.6 -0.6 m 61 | 0.6 -0.6 l 62 | 0.6 0.6 l 63 | -0.6 0.6 l 64 | h 65 | 66 | 67 | 68 | 69 | 70 | -0.5 -0.5 m 71 | 0.5 -0.5 l 72 | 0.5 0.5 l 73 | -0.5 0.5 l 74 | h 75 | 76 | 77 | -0.6 -0.6 m 78 | 0.6 -0.6 l 79 | 0.6 0.6 l 80 | -0.6 0.6 l 81 | h 82 | -0.4 -0.4 m 83 | 0.4 -0.4 l 84 | 0.4 0.4 l 85 | -0.4 0.4 l 86 | h 87 | 88 | 89 | 90 | 91 | 92 | 93 | -0.43 -0.57 m 94 | 0.57 0.43 l 95 | 0.43 0.57 l 96 | -0.57 -0.43 l 97 | h 98 | 99 | 100 | -0.43 0.57 m 101 | 0.57 -0.43 l 102 | 0.43 -0.57 l 103 | -0.57 0.43 l 104 | h 105 | 106 | 107 | 108 | 109 | 110 | 0 0 m 111 | -1 0.333 l 112 | -1 -0.333 l 113 | h 114 | 115 | 116 | 117 | 118 | 0 0 m 119 | -1 0.333 l 120 | -0.8 0 l 121 | -1 -0.333 l 122 | h 123 | 124 | 125 | 126 | 127 | 0 0 m 128 | -1 0.333 l 129 | -0.8 0 l 130 | -1 -0.333 l 131 | h 132 | 133 | 134 | 135 | 136 | -1 0.333 m 137 | 0 0 l 138 | -1 -0.333 l 139 | 140 | 141 | 142 | 143 | 0 0 m 144 | -1 0.333 l 145 | -1 -0.333 l 146 | h 147 | -1 0 m 148 | -2 0.333 l 149 | -2 -0.333 l 150 | h 151 | 152 | 153 | 154 | 155 | 0 0 m 156 | -1 0.333 l 157 | -1 -0.333 l 158 | h 159 | -1 0 m 160 | -2 0.333 l 161 | -2 -0.333 l 162 | h 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 112 784 m 237 | 112 624 l 238 | 464 624 l 239 | 464 784 l 240 | h 241 | 242 | 243 | 244 | 112 704 m 245 | 464 704 l 246 | 247 | 248 | 156 707 m 249 | 156 701 l 250 | 251 | 252 | 200 707 m 253 | 200 701 l 254 | 255 | 256 | 244 707 m 257 | 244 701 l 258 | 259 | 260 | 288 707 m 261 | 288 701 l 262 | 263 | 264 | 332 707 m 265 | 332 701 l 266 | 267 | 268 | 376 707 m 269 | 376 701 l 270 | 271 | 272 | 420 707 m 273 | 420 701 l 274 | 275 | 276 | 288 624 m 277 | 288 784 l 278 | 279 | 280 | 291 631.273 m 281 | 285 631.273 l 282 | 283 | 284 | 291 667.636 m 285 | 285 667.636 l 286 | 287 | 288 | 291 704 m 289 | 285 704 l 290 | 291 | 292 | 291 740.364 m 293 | 285 740.364 l 294 | 295 | 296 | 291 776.727 m 297 | 285 776.727 l 298 | 299 | 300 | 301 | 112 740.364 m 302 | 113.185 741.902 114.37 743.048 115.556 743.801 c 303 | 116.741 744.555 117.926 744.916 119.111 744.909 c 304 | 120.296 744.902 121.481 744.528 122.667 743.833 c 305 | 123.852 743.138 125.037 742.122 126.222 740.852 c 306 | 127.407 739.582 128.593 738.057 129.778 736.357 c 307 | 130.963 734.658 132.148 732.784 133.333 730.824 c 308 | 134.519 728.864 135.704 726.818 136.889 724.776 c 309 | 138.074 722.734 139.259 720.697 140.444 718.751 c 310 | 141.63 716.805 142.815 714.951 144 713.264 c 311 | 145.185 711.578 146.37 710.06 147.556 708.772 c 312 | 148.741 707.484 149.926 706.426 151.111 705.641 c 313 | 152.296 704.855 153.481 704.343 154.667 704.123 c 314 | 155.852 703.904 157.037 703.978 158.222 704.342 c 315 | 159.407 704.707 160.593 705.361 161.778 706.28 c 316 | 162.963 707.198 164.148 708.381 165.333 709.78 c 317 | 166.519 711.179 167.704 712.794 168.889 714.559 c 318 | 170.074 716.325 171.259 718.24 172.444 720.226 c 319 | 173.63 722.212 174.815 724.269 176 726.307 c 320 | 177.185 728.345 178.37 730.365 179.556 732.277 c 321 | 180.741 734.188 181.926 735.991 183.111 737.598 c 322 | 184.296 739.205 185.481 740.617 186.667 741.756 c 323 | 187.852 742.895 189.037 743.761 190.222 744.293 c 324 | 191.407 744.825 192.593 745.023 193.778 744.845 c 325 | 194.963 744.667 196.148 744.112 197.333 743.163 c 326 | 198.519 742.214 199.704 740.87 200.889 739.137 c 327 | 202.074 737.404 203.259 735.282 204.444 732.803 c 328 | 205.63 730.323 206.815 727.486 208 724.346 c 329 | 209.185 721.206 210.37 717.764 211.556 714.094 c 330 | 212.741 710.424 213.926 706.527 215.111 702.494 c 331 | 216.296 698.462 217.481 694.294 218.667 690.095 c 332 | 219.852 685.895 221.037 681.663 222.222 677.507 c 333 | 223.407 673.351 224.593 669.271 225.778 665.373 c 334 | 226.963 661.476 228.148 657.76 229.333 654.326 c 335 | 230.519 650.892 231.704 647.739 232.889 644.952 c 336 | 234.074 642.164 235.259 639.742 236.444 637.752 c 337 | 237.63 635.761 238.815 634.202 240 633.116 c 338 | 241.185 632.03 242.37 631.418 243.556 631.296 c 339 | 244.741 631.174 245.926 631.542 247.111 632.39 c 340 | 248.296 633.239 249.481 634.567 250.667 636.34 c 341 | 251.852 638.113 253.037 640.33 254.222 642.93 c 342 | 255.407 645.531 256.593 648.516 257.778 651.805 c 343 | 258.963 655.093 260.148 658.685 261.333 662.486 c 344 | 262.519 666.286 263.704 670.294 264.889 674.406 c 345 | 266.074 678.517 267.259 682.731 268.444 686.94 c 346 | 269.63 691.149 270.815 695.353 272 699.446 c 347 | 273.185 703.54 274.37 707.523 275.556 711.3 c 348 | 276.741 715.078 277.926 718.65 279.111 721.936 c 349 | 280.296 725.222 281.481 728.223 282.667 730.877 c 350 | 283.852 733.531 285.037 735.84 286.222 737.765 c 351 | 287.407 739.69 288.593 741.231 289.778 742.377 c 352 | 290.963 743.523 292.148 744.274 293.333 744.641 c 353 | 294.519 745.008 295.704 744.992 296.889 744.629 c 354 | 298.074 744.267 299.259 743.557 300.444 742.558 c 355 | 301.63 741.559 302.815 740.27 304 738.766 c 356 | 305.185 737.261 306.37 735.54 307.556 733.689 c 357 | 308.741 731.837 309.926 729.854 311.111 727.831 c 358 | 312.296 725.807 313.481 723.743 314.667 721.728 c 359 | 315.852 719.712 317.037 717.746 318.222 715.91 c 360 | 319.407 714.075 320.593 712.371 321.778 710.868 c 361 | 322.963 709.366 324.148 708.065 325.333 707.017 c 362 | 326.519 705.97 327.704 705.177 328.889 704.669 c 363 | 330.074 704.162 331.259 703.941 332.444 704.014 c 364 | 333.63 704.087 334.815 704.455 336 705.103 c 365 | 337.185 705.751 338.37 706.679 339.556 707.849 c 366 | 340.741 709.02 341.926 710.433 343.111 712.032 c 367 | 344.296 713.631 345.481 715.414 346.667 717.31 c 368 | 347.852 719.206 349.037 721.213 350.222 723.247 c 369 | 351.407 725.281 352.593 727.342 353.778 729.339 c 370 | 354.963 731.337 356.148 733.271 357.333 735.052 c 371 | 358.519 736.833 359.704 738.46 360.889 739.853 c 372 | 362.074 741.245 363.259 742.401 364.444 743.252 c 373 | 365.63 744.103 366.815 744.649 368 744.836 c 374 | 369.185 745.023 370.37 744.853 371.556 744.294 c 375 | 372.741 743.734 373.926 742.787 375.111 741.444 c 376 | 376.296 740.102 377.481 738.364 378.667 736.25 c 377 | 379.852 734.136 381.037 731.646 382.222 728.822 c 378 | 383.407 725.999 384.593 722.843 385.778 719.419 c 379 | 386.963 715.995 388.148 712.304 389.333 708.43 c 380 | 390.519 704.556 391.704 700.499 392.889 696.357 c 381 | 394.074 692.216 395.259 687.989 396.444 683.784 c 382 | 397.63 679.58 398.815 675.396 400 671.343 c 383 | 401.185 667.29 402.37 663.366 403.556 659.676 c 384 | 404.741 655.985 405.926 652.528 407.111 649.396 c 385 | 408.296 646.264 409.481 643.458 410.667 641.053 c 386 | 411.852 638.647 413.037 636.643 414.222 635.094 c 387 | 415.407 633.545 416.593 632.452 417.778 631.844 c 388 | 418.963 631.236 420.148 631.113 421.333 631.479 c 389 | 422.519 631.844 423.704 632.699 424.889 634.018 c 390 | 426.074 635.338 427.259 637.123 428.444 639.324 c 391 | 429.63 641.526 430.815 644.145 432 647.109 c 392 | 433.185 650.074 434.37 653.385 435.556 656.953 c 393 | 436.741 660.521 437.926 664.347 439.111 668.329 c 394 | 440.296 672.311 441.481 676.449 442.667 680.636 c 395 | 443.852 684.824 445.037 689.06 446.222 693.237 c 396 | 447.407 697.414 448.593 701.533 449.778 705.492 c 397 | 450.963 709.451 452.148 713.251 453.333 716.803 c 398 | 454.519 720.354 455.704 723.658 456.889 726.644 c 399 | 458.074 729.63 459.259 732.299 460.444 734.595 c 400 | 461.63 736.891 462.815 738.814 464 740.364 c 401 | 402 | $\frac{\pi}{2}$ 403 | $\pi$ 404 | $\frac{3\pi}{2}$ 405 | $-\frac{\pi}{2}$ 406 | $-\pi$ 407 | $-\frac{3\pi}{2}$ 408 | $1$ 409 | $-1$ 410 | 411 | 412 | -------------------------------------------------------------------------------- /manual/manual.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \usepackage[]{amsmath} 3 | \usepackage[]{hyperref} 4 | \usepackage[]{graphicx} 5 | \usepackage{xcolor} 6 | \usepackage[backend=biber,style=numeric]{biblatex} 7 | 8 | \addbibresource{ipe.bib} 9 | 10 | \def\Ipe{\textsc{Ipe}} 11 | \title{IpePlots -- User Manual with Examples} 12 | \author{Jan Hlavacek\\(jhlavace@svsu.edu)} 13 | \begin{document} 14 | \maketitle 15 | \tableofcontents 16 | \begin{abstract} 17 | IpePlots is an extension (so called ``ipelet'') for the graphics editor \Ipe\ 18 | (\url{http://ipe7.sourceforge.net}). The purpose of this extension is to 19 | make creation of plots of functions, especially the type of plots used in 20 | mathematics education, easier. We provide basic introduction to IpePlots, 21 | as well as several step by step examples. 22 | \end{abstract} 23 | 24 | \section{Introduction} 25 | The \Ipe\ graphics editor, written by Otfried Cheong, is a drawing editor for 26 | creating figures in PDF or encapsulated PostScript format. According to the Ipe 27 | website\cite{ipeweb}, its main features are: 28 | \begin{itemize} 29 | \item Entry of text as \LaTeX\ source code. This makes it easy to enter 30 | mathematical expressions, and to reuse the \LaTeX-macros of the main 31 | document. In the display text is displayed as it will appear in the 32 | figure. 33 | \item Produces pure Postscript/PDF, including the text. \Ipe\ converts the \LaTeX-source to PDF or Postscript when the file is saved. 34 | \item It is easy to align objects with respect to each other (for instance, 35 | to place a point on the intersection of two lines, or to draw a circle 36 | through three given points) using various snapping modes. 37 | \item Users can provide ipelets (\Ipe\ plug-ins) to add functionality to 38 | \Ipe. This way, \Ipe\ can be extended for each task at hand. 39 | \item \Ipe\ can be compiled for Unix and Windows. 40 | \item \Ipe\ is written in standard C++ and Lua 5.1. 41 | \end{itemize} 42 | IpePlots is a plotting extension for the \Ipe. Its can help you include plots 43 | of functions, parametric curves and coordinate systems into your \Ipe\ 44 | drawings. IpePlots is written in Lua 5.1. It is released under the GPL v.2.0. 45 | 46 | \section{Installation} 47 | 48 | We will assume that you already have the \Ipe\ graphics editor installed on 49 | your computer. You can obtain the editor from the \Ipe\ webpage\cite{ipeweb}. 50 | 51 | Installation of IpePlots is very simple. All you have to do is to place the 52 | file \texttt{plots.lua} in the ``ipelets'' directory on your computer. On Unix 53 | and Unix-like systems, you can use for example the \verb|$HOME/.ipe/ipelets| 54 | directory. On Windows, the directory is determined by the value of the 55 | \texttt{IPELETPATH} environment variable. After installing IpePlots, simply 56 | restart \Ipe. If the installation was successful, you will have a ``Plots'' 57 | sub-menu under \Ipe's ``Ipelets'' menu (Figure~\ref{fig:ipewindow}). 58 | \begin{figure}[h] 59 | \begin{center} 60 | %\includegraphics{ipewindow_small.png} 61 | \includegraphics[scale=3]{ipewindow.png} 62 | \end{center} 63 | \caption{\Ipe\ window with the ``Plots'' sub-menu open} 64 | \label{fig:ipewindow} 65 | \end{figure} 66 | 67 | \section{Usage} 68 | To insert a plot or a coordinate system into your drawing, select one of the 69 | items in the ``Plots'' sub-menu under the ``Ipelets'' menu. In the current 70 | version of IpePlots, there are four items: 71 | \begin{description} 72 | \item[Coordinate system] will insert a Cartesian coordinate system into your 73 | drawing. It will consist of the horizontal axis, the vertical axis, and 74 | optional tics. IpePlots currently does not create any labels, if you 75 | want to label the axes or tics, you have to do so manually. 76 | \item[Coordinate grid] will insert a rectangular grid of vertical and 77 | horizontal line segments into your drawing. You can specify the location 78 | of the segments. 79 | \item[Parametrid plot] will insert a parametric curve defined by two 80 | functions, $x = f(t)$ and $y = g(t)$. 81 | \item[Function plot] will insert a plot of a function $y = f(x)$. 82 | \end{description} 83 | Depending of several things, IpePlots will do one of the following: 84 | \begin{itemize} 85 | \item If your current selection has a non-empty bounding box, IpePlot will 86 | use this bounding box as a ``viewport'' which will contain the coordinate 87 | system of the plot. 88 | \item If you do not have a current selection, or if the selections bounding 89 | box is empty, IpePlot will use the canvas coordinate system in the 90 | following way: 91 | \begin{itemize} 92 | \item If you previously set the origin of the \Ipe\ axis system, it 93 | will be used as the origin of the plot coordinate system. The 94 | base direction of the axis system is ignored, however, and the plot 95 | axis are always created horizontal and vertical. 96 | \item If you did not set the origin of the axis system, the absolute 97 | canvas coordinates are used instead. 98 | \end{itemize} 99 | \end{itemize} 100 | 101 | After selecting one of the menu items, you will be presented with a dialog box. 102 | 103 | The current version of IpePlots provides the following four menu items: 104 | 105 | \subsection{Coordinate System} 106 | creates a pair of coordinate axes, with optional ticks. If the current 107 | selection has a non-empty bounding box, the axes will be scaled so that they 108 | will exactly fit inside this bounding box. In the dialog box 109 | (Figure~\ref{fig:coord_sys_dialog}) you can set the range for $x$, the range for 110 | $y$, the optional size of ticks (defaults to 0 for no ticks), and the location 111 | of ticks (if left empty, and the size is non-zero, ticks are placed at integer 112 | coordinates). 113 | 114 | \begin{figure}[h] 115 | \begin{center} 116 | \includegraphics[scale=3]{coord_sys_dialog.png} 117 | \end{center} 118 | \caption{Dialog box for the Coordinate System} 119 | \label{fig:coord_sys_dialog} 120 | \end{figure} 121 | 122 | Note that in all fields except the two tick size fields, you can use Lua 123 | expressions, which makes it possible to enter values like \texttt{-pi - 0.2} or 124 | \texttt{sqrt(3)/2}. 125 | 126 | The syntax for the location of ticks is special: you could specify a comma 127 | separated list of numbers, or you could enter a single Lua table containing 128 | numbers. That way you can enter a Lua expression that generates a table of 129 | numbers. For example, IpePlots provides an internal function 130 | \texttt{range(from, to, step)} which produces a table of numbers starting with 131 | the value of ``\texttt{from}'' and incrementing by ``\texttt{step}'' until it 132 | exceeds ``\texttt{to}''. The values entered in the 133 | Figure~\ref{fig:coord_sys_dialog} will produced the coordinate system in 134 | Figure~\ref{fig:coord_sys}. Note that the rectangle containing the coordinate 135 | system was not created by IpePlots. It was already present in the drawing, and 136 | we selected it before using IpePlots. The coordinate system was created by 137 | IpePlots in such a way that it fits perfectly inside the bounding box of the 138 | rectangle. The rectangle can be deleted after the coordinate system is created. 139 | 140 | \begin{figure}[h] 141 | \begin{center} 142 | \includegraphics[scale=.7]{coord_sys} 143 | \end{center} 144 | \caption{An example of a coordinate system produced by IpePlots.} 145 | \label{fig:coord_sys} 146 | \end{figure} 147 | 148 | Also note that IpePlots does not create labels. We see that as an advantage. 149 | IpePlots will quickly create a axes system for you, and you can then label it 150 | in any way you want, IpePlots will not impose any labeling style on you. \Ipe's 151 | vertex snapping mode and the ``align'' and ``move'' ipelet groups can be very 152 | helpful when adding labels. 153 | 154 | If your selection is empty, or has an empty bounding box, you will be presented 155 | with the same dialog box, however, instead of scaling the coordinates in order 156 | to fit them into the given bounding box, IpePlots will use the absolute canvas 157 | coordinates. That means a coordinate system from $-\pi$ to $\pi$ would be 158 | really small, so it is probably more useful to specify coordinates like $-50$ 159 | to $50$. 160 | 161 | \subsection{Coordinate Grid} 162 | will create a rectangular grid of horizontal and vertical line segments at 163 | specified coordinates. The dialog box (see Figure~\ref{fig:coord_grid_dialog}) is 164 | very similar to the dialog box for Coordinate System, except that there are no 165 | fields for tick size, and instead of tick locations, you specify the locations 166 | of vertical and horizontal grid lines. 167 | 168 | \begin{figure}[h] 169 | \begin{center} 170 | \includegraphics[scale=3]{coord_grid_dialog.png} 171 | \end{center} 172 | \caption{Dialog box for the Coordinate System} 173 | \label{fig:coord_grid_dialog} 174 | \end{figure} 175 | 176 | The coordinate grid created by IpePlots with the values filled in as in 177 | Figure~\ref{fig:coord_grid_dialog} will produce the coordinate grid in 178 | Figure~\ref{fig:coord_grid}. Again, the rectangle containing the coordinate 179 | grid was not created by IpePlots. IpePlots created the coordinate grid inside 180 | the existing rectangle. 181 | 182 | \begin{figure}[h] 183 | \begin{center} 184 | \includegraphics[scale=.7]{coord_grid} 185 | \end{center} 186 | \caption{An example of a coordinate grid produced by IpePlots.} 187 | \label{fig:coord_grid} 188 | \end{figure} 189 | 190 | Note that only the coordinate grid was created, not the coordinate axes. If 191 | you want to create both, you have to use both ``Coordinate System'' and 192 | ``Coordiate Grid'' items from the ``Plots'' menu. You can find some examples 193 | of a complete work flow in section~\ref{sec:examples} on 194 | page~\pageref{sec:examples}. 195 | 196 | As for Coordinate System, if the current selection is empty or has an empty 197 | bounding box, IpePlot will use the absolute canvas coordinates when creating 198 | the grid. 199 | 200 | \subsection{Parametric Plot} 201 | creates a plot of a curve described by the parametric equations 202 | \begin{align*} 203 | x &= f(t)\\ 204 | y &= g(t)\\ 205 | a &\le t \le b 206 | \end{align*} 207 | The dialog box for Parametric Plot is shown in the 208 | Figure~\ref{fig:param_dialog}. You need to specify $x$ and $y$ as functions of 209 | a parameter $t$, and the bounds for $t$. If the current selection has a 210 | non-empty bounding box, you also have to specify the ranges of $x$ and $y$ 211 | coordinates that correspond to the bounding box. The plot will be scaled in 212 | such a way that the given $x$ and $y$ coordinate ranges will fit exactly into 213 | the bounding box. 214 | 215 | \begin{figure}[h] 216 | \begin{center} 217 | \includegraphics[scale=3]{param_dialog.png} 218 | \end{center} 219 | \caption{Dialog box for the Parametric Plot} 220 | \label{fig:param_dialog} 221 | \end{figure} 222 | 223 | You also need to specify the number of points used to draw the plot. The more 224 | points you use, the more precise is your plot going to be. On the other hand, 225 | the more points you specify, the larger the file containing the drawing, and 226 | with large number of points, \Ipe\ may slow down significantly, especially on 227 | systems with low resources. The default of $100$ seems to generally be a 228 | reasonable compromise. 229 | 230 | Finally, you can select whether you want the plot to be approximated by cubic 231 | splines or by series of line segments. Cubic splines will generally produce a 232 | smoother curve. Note that if you have less than 4 points specified, the cubic 233 | spline option will be ignored. 234 | 235 | The plot generated from the values entered in Figure~\ref{fig:param_dialog} is 236 | shown in Figure~\ref{fig:param}. Again, the rectangle containing the Lissajous 237 | curve was not generated by IpePlots. It was used as a bounding box, which will 238 | exactly represent the coordinate rectangle $-1.2\le x \le 1.2$, $-1.2\le y \le 239 | 1.2$. 240 | 241 | \begin{figure}[h] 242 | \begin{center} 243 | \includegraphics[scale=.7]{param} 244 | \end{center} 245 | \caption{An example of a parametric plot produced by IpePlots.} 246 | \label{fig:param} 247 | \end{figure} 248 | 249 | If the current selection is empty or has an empty bounding box, there is no 250 | need to specify the ranges of $x$ and $y$ coordinates, since IpePlots will be 251 | using the absolute canvas coordinates. The dialog box presented to you in such 252 | a case will not have the fields for these coordinates. You can use this mode 253 | to insert precise curves in the absolute canvas coordinates into your drawing. 254 | For example, the ornamental curve in Figure~\ref{fig:spliced_curve} was created by 255 | combining a partial Lissajous curve in absolute canvas coordinates with two 256 | semicircles. 257 | 258 | \begin{figure}[h] 259 | \begin{center} 260 | \includegraphics[scale=.5]{spliced_curve} 261 | \end{center} 262 | \caption{An example of a curve created by combining a parametric curve in 263 | absolute canvas coordinates with two semicircles.} 264 | \label{fig:spliced_curve} 265 | \end{figure} 266 | 267 | \subsection{Function Plot} 268 | creates a graph of a function $y = f(x)$. Note that IpePlots has no special 269 | treatment for things like discontinuities, asymptotes etc. See the 270 | section~\ref{subsec:asymptote} on page \pageref{subsec:asymptote} to see an 271 | example of plotting a graph of a function with a vertical asymptote. 272 | 273 | \begin{figure}[h] 274 | \begin{center} 275 | \includegraphics[scale=3]{function_dialog.png} 276 | \end{center} 277 | \caption{Dialog box for the Function Plot} 278 | \label{fig:function_dialog} 279 | \end{figure} 280 | 281 | The dialog box for the Function Plot is shown in 282 | Figure~\ref{fig:function_dialog}. In this dialog, you need to enter the actual 283 | function, the domain over which the function should be graphed, and the 284 | coordinate limits for the bounding box. If the current selection is empty or 285 | has an empty bounding box, the limits for the bounding box will not be present 286 | in the dialog. Just as in the parametric plot dialog, you can change the 287 | number of points used to draw the graph, and choose whether you want to use 288 | line segments or cubic splines to approximate the curve. 289 | 290 | \begin{figure}[h] 291 | \begin{center} 292 | \includegraphics[scale=.5]{function} 293 | \end{center} 294 | \caption{An example of a graph of a function produced by IpePlots.} 295 | \label{fig:function} 296 | \end{figure} 297 | 298 | The graph created from the parameters entered in 299 | Figure~\ref{fig:function_dialog} is shown in Figure~\ref{fig:function}. As 300 | before, the rectangle containing the graph was not created by IpePlots, 301 | instead it was used as a bounding box to fit the graph into. 302 | 303 | \clearpage 304 | \section{Examples}\label{sec:examples} 305 | \subsection{Plotting a Piecewise Function} 306 | In this example we will create a plot of the piecewise defined function: 307 | \[ 308 | f(x) = 309 | \begin{cases} 310 | x + 5 & \text{ if $x <= -2$}\\ 311 | x^2 - 1 & \text{ if $-2 \le x < 1$}\\ 312 | 2 - x & \text{ if $x \ge 1$} 313 | \end{cases} 314 | \] 315 | 316 | To show all the features, we will create a viewing rectangle approximately $-5 317 | < x < 5$ and $-4 < y < 4$. 318 | 319 | In order to create a plot with a $1:1$ aspect ratio, we need start by creating 320 | a rectangle with the ratio of horizontal to vertical side $5:4$. We can 321 | conveniently use the grid snapping mode in \Ipe (see the \Ipe\ 322 | manual(\cite{manual}) for details). An example of such rectangle 323 | is shown in the Figure~\ref{fig:piecewise_starting_rectangle} Notice that the 324 | rectangle is shown in {\color{red}red}, which means that it is currently 325 | selected. 326 | \begin{figure}[h] 327 | \begin{center} 328 | \includegraphics[scale=2]{piecewise_starting_rectangle.png} 329 | \end{center} 330 | \caption{A rectangle with $5:4$ side ratio} 331 | \label{fig:piecewise_starting_rectangle} 332 | \end{figure} 333 | 334 | Making sure the rectangle is selected, choose the ``Coordinate System'' entry 335 | from the ``Plots'' menu, and fill in the dialog as shown on 336 | Figure~\ref{fig:piecewise_system_dialog}. Note that the fields for location of 337 | ticks are left empty, which means that ticks will appear at every integer. This will define the viewing 338 | rectangle, and create the $x$ and $y$ axes, with 5 pt long ticks at every 339 | integer (Figure~\ref{fig:piecewise_system}). 340 | \begin{figure}[h] 341 | \begin{center} 342 | \includegraphics[scale=3]{piecewise_system_dialog.png} 343 | \end{center} 344 | \caption{The dialog box for coordinate system} 345 | \label{fig:piecewise_system_dialog} 346 | \end{figure} 347 | 348 | \begin{figure}[h] 349 | \begin{center} 350 | \includegraphics[scale=2]{piecewise_system.png} 351 | \end{center} 352 | \caption{The coordinate system created by the dialog box in 353 | Figure~\ref{fig:piecewise_system_dialog}} 354 | \label{fig:piecewise_system} 355 | \end{figure} 356 | 357 | After creating the coordinate system, it should be selected. If it is not, 358 | select it using the ``select'' tool. The next step will be creating a 359 | coordinate grid. Select the ``Coordinate grid'' entry from the ``Plots'' menu. 360 | The Coordinate grid dialog will appear, with information already filled 361 | (Figure~\ref{fig:piecewise_grid_dialog}). 362 | IpePlots automatically filled in this information based on the data you 363 | entered in the ``Coordinate system'' dialog. If you are happy with these 364 | choices, you can just click the OK button. The coordinate system shown in 365 | Figure~\ref{fig:piecewise_grid} will be created. It will be created with the 366 | currently active line style. For our purpose, we want to change this into 367 | dashed style using the \Ipe\ properties panel. 368 | 369 | \begin{figure}[h] 370 | \begin{center} 371 | \includegraphics[scale=3]{piecewise_grid_dialog.png} 372 | \end{center} 373 | \caption{The dialog for creation of a coordinate grid} 374 | \label{fig:piecewise_grid_dialog} 375 | \end{figure} 376 | 377 | \begin{figure}[h] 378 | \begin{center} 379 | \includegraphics[scale=2]{piecewise_grid.png} 380 | \end{center} 381 | \caption{The coordinate grid created by the dialog box in 382 | Figure~\ref{fig:piecewise_grid_dialog}} 383 | \label{fig:piecewise_grid} 384 | \end{figure} 385 | 386 | Now we need to create the first part of the graph: $y = x+5$ for $x < -2$. Make 387 | sure that either the coordinate system or the coordinate grid is selected. 388 | Then choose ``Function plot'' from the ``Plots'' menu. As before, the dialog is 389 | partially filled based on the information that you entered in the previous 390 | dialogs. Fill in the remaining entries as shown on 391 | Figure~\ref{fig:firstline_dialog}. Note that since we are plotting a line 392 | segment, we only need to use 2 points, and we do not want to use cubic 393 | splines\footnote{The figure will look perfectly fine with larger number of points, and of 394 | course when using cubic spline to approximate a linear function, we get the 395 | correct linear function, however, it would make IpePlots generate more 396 | complicated code, which would then result in a larger file.}. You can see the result in 397 | Figure~\ref{fig:firstline}. 398 | 399 | \begin{figure}[h] 400 | \begin{center} 401 | \includegraphics[scale=3]{firstline_dialog.png} 402 | \end{center} 403 | \caption{The dialog box that will create the first part of the plot: $y = 404 | x+5$ for $x < -2$} 405 | \label{fig:firstline_dialog} 406 | \end{figure} 407 | 408 | \begin{figure}[h] 409 | \begin{center} 410 | \includegraphics[scale=2]{firstline.png} 411 | \end{center} 412 | \caption{The first part of the plot of the piecewise function} 413 | \label{fig:firstline} 414 | \end{figure} 415 | 416 | The next part of the plot is the parabolic arc $y = x^2 - 1$ for $-2 \le x < 417 | 1$. First select either the coordinate system or the coordinate grid in which 418 | the parabola should be placed. Then choose ``Function plot'' from the 419 | ``Plots'' ipelet menu. The dialog box that will open will contain the values 420 | that you entered when plotting the first part. You need to edit those as shown 421 | in Figure~\ref{fig:secondline_dialog}. The entries you need to change are the 422 | equation for $y$ and the domain for $x$. Also, since we are no longer plotting 423 | a straight line segment, you probably want to increase the number of plot points. 424 | You may also want to select cubic spline approximation, which will result in a 425 | smoother plot\footnote{Since we are plotting a parabola, using cubic splines 426 | with 4 points would work perfectly fine.}. Figure~\ref{fig:secondline} shows 427 | the plot with the first two parts present. 428 | 429 | \begin{figure}[h] 430 | \begin{center} 431 | \includegraphics[scale=3]{secondline_dialog.png} 432 | \end{center} 433 | \caption{The dialog box for the second part of the plot of the piecewise 434 | function $f$} 435 | \label{fig:secondline_dialog} 436 | \end{figure} 437 | 438 | \begin{figure}[h] 439 | \begin{center} 440 | \includegraphics[scale=2]{secondline.png} 441 | \end{center} 442 | \caption{Plot of the first two parts of the piecewise function $f$} 443 | \label{fig:secondline} 444 | \end{figure} 445 | 446 | In a similar way, we create the third part of the plot. Using \Ipe\ marks with 447 | vertex snapping, you can place full and empty circles at the ends of the parts 448 | of the graph to indicate whether the endpoints are included or not. You can 449 | also change the style of the plot curves to ``fat'' or ``ultrafat'' to make 450 | them stand out against the coordinate grid. The finished plot is at 451 | Figure~\ref{fig:piecewise}. 452 | 453 | \begin{figure}[h] 454 | \begin{center} 455 | \includegraphics[scale=.7]{piecewise.pdf} 456 | \end{center} 457 | \caption{Graph of the piece wise function $f$} 458 | \label{fig:piecewise} 459 | \end{figure} 460 | \clearpage 461 | 462 | \subsection{Function with Vertical Asymptote}\label{subsec:asymptote} 463 | 464 | As the next example, we will plot the function 465 | \[g(x) = \frac{1}{1-x^2}.\] 466 | The function is undefined at $\pm 1$ and has vertical asymptotes there. The 467 | IpePlots ipelet is not smart enough to figure that out, and it will not be able 468 | to plot the function properly. It is our responsibility to choose the domain 469 | of the plot properly. We will plot the function for $x$ between $-4$ and $4$, 470 | and $y$ between $-3$ and $3$. Solving the equation 471 | \[\frac{1}{1-x^2} = -3\] 472 | will give us $x = \pm \sqrt{4/3}$, solving the equation 473 | \[\frac{1}{1-x^2} = 3\] 474 | results in $x = \pm \sqrt{2/3}$. 475 | We will plot the function on three intervals: $-4\le x \le -\sqrt{4/3}$, 476 | $-\sqrt{2/3} \le x \le -\sqrt{2/3}$ and $\sqrt{4/3} \le x \le 4$. 477 | \begin{figure}[h] 478 | \begin{center} 479 | \includegraphics[scale=.5]{asym1.png} 480 | \end{center} 481 | \caption{The dialog to create the first part of the graph of $g$.} 482 | \label{fig:asym1} 483 | \end{figure} 484 | 485 | First we will create a coordinate system. Then choose ``Function plot'' from 486 | the ``Plots'' menu, and fill in the dialog as shown on Figure~\ref{fig:asym1}. 487 | Note that it is possible to use expressions like \texttt{-sqrt(4/3)} in the 488 | ``from'' and ``to'' fields of the dialog. Figure~\ref{fig:asym2} shows the 489 | dialog for creation of the second part of the graph. The third part can be 490 | created in a similar way. Figure~\ref{fig:asym_plot} shows the resulting plot. 491 | 492 | \begin{figure}[h] 493 | \begin{center} 494 | \includegraphics[scale=.5]{asym2.png} 495 | \end{center} 496 | \caption{The dialog to create the second part of the graph of $g$.} 497 | \label{fig:asym2} 498 | \end{figure} 499 | \begin{figure}[h] 500 | \begin{center} 501 | \includegraphics[scale=.7]{asym.pdf} 502 | \end{center} 503 | \caption{The final plot of the function $g$.} 504 | \label{fig:asym_plot} 505 | \end{figure} 506 | \clearpage 507 | 508 | \subsection{Trigonometric Plot} 509 | As a final example, we will plot a trigonometric function, with ticks on the 510 | horizontal axis at multiples of $\pi/2$. We will start by creating a coordinate 511 | system, for $x$ between $-2\pi$ and $2\pi$, and $y$ between $-2.2$ and $2.2$. 512 | See Figure~\ref{fig:trig_coords}. 513 | \begin{figure}[h] 514 | \begin{center} 515 | \includegraphics[scale=.5]{trig_coords.png} 516 | \end{center} 517 | \caption{The dialog to create the coordinate system for a trigonometric 518 | plot.} 519 | \label{fig:trig_coords} 520 | \end{figure} 521 | The most interesting part is the expression entered in the ``Location of 522 | $x$-ticks'' field: \texttt{range(-2*pi,2*pi,pi/2)}. This will create ticks 523 | uniformly distributed between $-2\pi$ and $2\pi$, with distance $\pi/2$ between 524 | consecutive ticks. 525 | 526 | \begin{figure}[h] 527 | \begin{center} 528 | \includegraphics[scale=.5]{trig_dialog.png} 529 | \end{center} 530 | \caption{The dialog to create the coordinate system for a trigonometric 531 | plot.} 532 | \label{fig:trig_dialog} 533 | \end{figure} 534 | Next we will create the actual plot using the ``Function plot'' item from the 535 | ``Plots'' menu, as shown in Figure~\ref{fig:trig_dialog}. Finally, we change 536 | the line thickness of the graph to ``ultrafat'', and add some legend to the 537 | ticks on both horizontal and vertical axis. The resulting plot is shown in 538 | Figure~\ref{fig:trig} 539 | 540 | \begin{figure}[h] 541 | \begin{center} 542 | \includegraphics[scale=.7]{trig.pdf} 543 | \end{center} 544 | \caption{The final plot of the trigonometric function $\sin(x) + \cos(2x)$.} 545 | \label{fig:trig} 546 | \end{figure} 547 | 548 | \printbibliography 549 | \end{document} 550 | -------------------------------------------------------------------------------- /plots.lua: -------------------------------------------------------------------------------- 1 | ---------------------------------------------------------------------- 2 | -- plot ipelet 3 | ---------------------------------------------------------------------- 4 | --[[ 5 | 6 | This file is an extension of the drawing editor Ipe (ipe7.sourceforge.net) 7 | 8 | Copyright (c) 2009 Jan Hlavacek 9 | 10 | Version 1.0 11 | 12 | This file can be distributed and modified under the terms of the GNU General 13 | Public License as published by the Free Software Foundation; either version 14 | 3, or (at your option) any later version. 15 | 16 | This file is distributed in the hope that it will be useful, but WITHOUT ANY 17 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 19 | details. 20 | 21 | You can find a copy of the GNU General Public License at 22 | "http://www.gnu.org/copyleft/gpl.html", or write to the Free 23 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 24 | 25 | Basic documentation (more extensive documentation is contained in the manual) 26 | 27 | All functions provided by this ipelet use a selection to describe the plot 28 | "viewport" on the page. The only thing that is used from the selection is 29 | its bounding rectangle. This rectangle will represent the "viewport" of the 30 | plot on your page. Each function will present a dialog where you, in 31 | addition to other things, specify the corresponding plot coordinates for 32 | this viewport. 33 | 34 | For example, assume that you start with a selection that is a rectangle. 35 | You choose Parametric plot, type in cos(t) and sin(t) for x and y, t from 36 | -3.14 to 3.14, and viewport coordinates as x from -1 to 1, y from -1 to 1. 37 | 38 | This will make the originally selected rectangle represent a part of 39 | coordinate plane with corners (-1,-1), (-1,1), (1,1) and (1,-1), and, in 40 | effect, draw an inscribed ellipse into the rectangle. 41 | 42 | There is no clipping going on right now, so if your plot is larger than the 43 | specified viewport, it will simply stick out of the rectangle. 44 | 45 | After creating a coordinate system with the "Coordinate system" menu item, 46 | you can use this coordinate system as your initial selection for your plots, 47 | and they will be correctly placed on this coordinate system. 48 | 49 | When creating coordinate system, you can specify location of ticks on both 50 | axes. Here you can use expressions such as pi, 2*pi, etc. If you leave 51 | this empty, ticks will be placed at every integer. Ticks will only be drawn 52 | if the tick size is not 0. 53 | 54 | If you have questions, please contact me at jhlavace@svsu.edu. Also 55 | please contact me if you have any suggestions for improvement. 56 | 57 | This is my first attempt to write something in lua, and it has been put 58 | together quite in a hurry, so I am sure there are lot of places where things 59 | can be done better. 60 | 61 | --]] 62 | 63 | label = "Plots" 64 | 65 | about = [[ 66 | Parametric curves, plots of functions, coordinate systems 67 | ]] 68 | 69 | -- we will prepend this every time we use load, so user does not have to 70 | -- type math.foo for foo all the time: 71 | local mathdefs = [[ 72 | local abs = math.abs; 73 | local acos = math.acos; 74 | local asin = math.asin; 75 | local atan = math.atan; 76 | local atan2 = math.atan2; 77 | local ceil = math.ceil; 78 | local cos = math.cos; 79 | local cosh = math.cosh; 80 | local deg = math.deg; 81 | local exp = math.exp; 82 | local floor = math.floor; 83 | local fmod = math.fmod; 84 | local log = math.log; 85 | local log10 = math.log10; 86 | local max = math.max; 87 | local min = math.min; 88 | local modf = math.modf; 89 | local pi = math.pi; 90 | local pow = math.pow; 91 | local rad = math.rad; 92 | local sin = math.sin; 93 | local sinh = math.sinh; 94 | local sqrt = math.sqrt; 95 | local tan = math.tan; 96 | local tanh = math.tanh; 97 | local range = ipeplot_tick_range; 98 | ]] 99 | 100 | local beziername = "spline" 101 | if _G.config.version < "7.1.7" then 102 | beziername = "bezier" 103 | end 104 | 105 | -- some auxiliary functions: 106 | -- 1) tick generators 107 | 108 | -- Put first tick at f, second at f+s, ..., till t: 109 | function _G.ipeplot_tick_range (f,t,s) 110 | local a = {} 111 | if (s == 0) or (f*s >= t*s) then 112 | return a 113 | end 114 | local x = f 115 | local i = 1 116 | while x <= t do 117 | a[i] = x 118 | x = x + s 119 | i = i + 1 120 | end 121 | return a 122 | end 123 | 124 | local function isfinite(x) 125 | return (_G.type(x) == "number") and (x > - math.huge) and (x < math.huge) 126 | end 127 | 128 | local function bounding_box(p) 129 | local box = ipe.Rect() 130 | for i,obj,sel,layer in p:objects() do 131 | if sel then box:add(p:bbox(i)) end 132 | end 133 | return box 134 | end 135 | 136 | local function calculate_transform (model, x0, y0, x1, y1) 137 | local box = bounding_box(model:page()) 138 | if box:isEmpty() then 139 | if model.snap.with_axes then 140 | --ui:explain("Selection seems to be empty. Using coordinates with origin.") 141 | return ipe.Translation(model.snap.origin) 142 | else 143 | --ui:explain("Selection seems to be empty. Using global coordinates.") 144 | return ipe.Matrix() 145 | end 146 | end 147 | -- Selection is given. Calculate transformation to change real coordinates 148 | -- to canvas coordinates relative to the selection. 149 | local cstart = box:bottomLeft() 150 | local cend = box:topRight() 151 | local cdif = cend-cstart 152 | local cxlen = cdif.x 153 | local cylen = cdif.y 154 | local start = ipe.Vector(x0,y0) 155 | local xlen = x1-x0 156 | local ylen = y1-y0 157 | local scalem = ipe.Matrix(cxlen/xlen,0,0,cylen/ylen) 158 | local trans = ipe.Translation(cstart-scalem*start) * scalem 159 | return trans 160 | end 161 | 162 | local function get_number (model, string, error_msg) 163 | if string == "" then 164 | model:warning ("You need to specify " .. error_msg) 165 | return 166 | end 167 | lstring = mathdefs .. "return " .. string 168 | local f,err = _G.load(lstring,error_msg) 169 | if not f then 170 | model:warning("Could not compile " .. error_msg) 171 | return 172 | end 173 | local stat,num = _G.pcall(f) 174 | if not stat then 175 | model:warning(num) -- bug: error messages will be cryptic 176 | return 177 | end 178 | if not num then 179 | model:warning(string .. " is not a valid value for " .. error_msg) 180 | return 181 | end 182 | return num 183 | end 184 | 185 | local function get_dialog_parent(model) 186 | local ui = model.ui 187 | if(ui.win == nil) then 188 | return ui 189 | end 190 | return ui:win() 191 | end 192 | 193 | -- Cubic spline stuff (contributed by Zheng Dao): 194 | 195 | -- give a vector of d, find the tridiagonal solution for spline interpolation 196 | local function tridiag(d) 197 | local c, M={},{} 198 | local n = #d 199 | c[1]=1/5 200 | d[1]=d[1]/5 201 | for i=2,n-1 do 202 | c[i]=1/(4-c[i-1]) 203 | d[i]=(d[i]-d[i-1])/(4-c[i-1]) 204 | end 205 | d[n]=(d[n]-d[n-1])/(5-c[n-1]) 206 | M[n+1]=d[n] 207 | for i=n-1,1,-1 do 208 | M[i+1]=d[i]-c[i]*M[i+2] 209 | end 210 | M[1]=M[2] 211 | M[n+2]=M[n+1] 212 | return M 213 | end 214 | 215 | -- cubic function fit 216 | local function cubicfit(t0,t1,n,y) 217 | local d,p0,p1,p2,p3={},{},{},{},{} 218 | local h=(t1-t0)/(n-1) 219 | if n==2 then 220 | return y[1], 2.0*y[1]/3+y[2]/3.0, y[1]/3.0+y[2]*2.0/3, y[2] 221 | end 222 | for i=1,n-2 do 223 | d[i]= ( y[i]-2*y[i+1]+y[i+2] )*6/h^2 224 | end 225 | local M=tridiag(d) 226 | 227 | for i=1,n-1 do 228 | local a= (M[i+1]-M[i])/6/h 229 | local b= M[i]/2 230 | local c= (y[i+1]-y[i])/h - (M[i+1]+2*M[i])*h/6 231 | local d= y[i] 232 | p0[i]=d 233 | p1[i]=d+c*h/3 234 | p2[i]=d+2/3*c*h+b*h^2/3 235 | p3[i]=y[i+1] 236 | end 237 | return p0,p1,p2,p3 238 | end 239 | 240 | -- helpful functions for creating dialogs 241 | -- Set up a line counter so that we don't have to use absolute line numbers for 242 | -- dialogs. 243 | function line_counter() 244 | local line_no = 0 245 | local function same_line() 246 | return line_no 247 | end 248 | local function new_line() 249 | line_no = line_no + 1 250 | return line_no 251 | end 252 | return same_line, new_line 253 | end 254 | 255 | -- parametric plot 256 | function curve(model) 257 | local box = bounding_box(model:page()) 258 | local has_viewport = not box:isEmpty() 259 | local same, nxt = line_counter() 260 | local d = ipeui.Dialog(get_dialog_parent(model), "Parametric plot") 261 | d:add("label1", "label", {label="Enter parametric equations. Use t as a parameter."}, 262 | nxt(), 1, 1, 4) 263 | d:add("label2", "label", {label="x="}, nxt(), 1) 264 | d:add("xeq", "input", {}, same(), 2, 1, 3) 265 | d:add("label3", "label", {label="y="}, nxt(), 1) 266 | d:add("yeq", "input", {}, same(), 2, 1, 3) 267 | d:add("label4", "label", {label="Set the domain for t:"}, nxt(), 1, 1, 4) 268 | d:add("label5", "label", {label="from:"}, nxt(), 1, 1, 1) 269 | d:add("tfrom", "input", {}, same(), 2, 1, 1) 270 | d:add("label6", "label", {label="to:"}, same(), 3, 1, 1) 271 | d:add("tto", "input", {}, same(), 4, 1, 1) 272 | if has_viewport then 273 | d:add("label7", "label", {label="Set coordinates for viewport:"}, nxt(), 1, 1, 4) 274 | d:add("label8", "label", {label="from x="}, nxt(), 1, 1, 1) 275 | d:add("xfrom", "input", {}, same(), 2, 1, 1) 276 | d:add("label9", "label", {label="to x="}, same(), 3, 1, 1) 277 | d:add("xto", "input", {}, same(), 4, 1, 1) 278 | d:add("label10", "label", {label="from y="}, nxt(), 1, 1, 1) 279 | d:add("yfrom", "input", {}, same(), 2, 1, 1) 280 | d:add("label11", "label", {label="to y="}, 8, 3, 1, 1) 281 | d:add("yto", "input", {}, same(), 4, 1, 1) 282 | end 283 | d:add("label12", "label", {label="number of points"}, nxt(), 1, 1, 1) 284 | d:add("points", "input", {}, same(), 2, 1, 1) 285 | d:add("cubic", "checkbox", {label="use cubic splines"}, nxt(), 1, 1, 1) 286 | d:addButton("ok", "&Ok", "accept") 287 | d:addButton("cancel", "&Cancel", "reject") 288 | d:setStretch("column", 2, 1) 289 | d:setStretch("column", 4, 1) 290 | if xeqstore then d:set("xeq",xeqstore) end 291 | if yeqstore then d:set("yeq",yeqstore) end 292 | if has_viewport then 293 | if x0store then d:set("xfrom",x0store) end 294 | if x1store then d:set("xto",x1store) end 295 | if y0store then d:set("yfrom",y0store) end 296 | if y1store then d:set("yto",y1store) end 297 | end 298 | if t0store then d:set("tfrom",t0store) end 299 | if t1store then d:set("tto",t1store) end 300 | if not pointsstore then pointsstore = 100 end 301 | d:set("points",pointsstore) 302 | if hascubicstore then d:set("cubic",cubicstore) else d:set("cubic",true) end 303 | if not d:execute() then return end 304 | local s1 = d:get("xeq") 305 | local s2 = d:get("yeq") 306 | xeqstore = s1 307 | yeqstore = s2 308 | if has_viewport then 309 | x0store = d:get("xfrom") 310 | x1store = d:get("xto") 311 | y0store = d:get("yfrom") 312 | y1store = d:get("yto") 313 | end 314 | t0store = d:get("tfrom") 315 | t1store = d:get("tto") 316 | pointsstore = d:get("points") 317 | cubicstore = d:get("cubic") 318 | hascubicstore = true 319 | 320 | -- real coordinates 321 | local x0, x1, y0, y1 322 | if has_viewport then 323 | x0 = get_number(model,x0store,"lower x limit") 324 | if not x0 then return end 325 | x1 = get_number(model,x1store,"upper x limit") 326 | if not x1 then return end 327 | y0 = get_number(model,y0store,"lower y limit") 328 | if not y0 then return end 329 | y1 = get_number(model,y1store,"upper y limit") 330 | if not y1 then return end 331 | else 332 | x0 = 0 333 | y0 = 0 334 | x1 = 1 335 | y1 = 1 336 | end 337 | 338 | -- parameter 339 | local t0 = get_number(model,t0store,"initial value of t") 340 | if not t0 then return end 341 | local t1 = get_number(model,t1store,"final value of t") 342 | if not t1 then return end 343 | 344 | -- number of samples 345 | local n = get_number(model,pointsstore,"number of samples") 346 | if not n then return end 347 | if n<2 then 348 | model:warning("Number of samples must be at least 2") 349 | return 350 | end 351 | -- we need at least 4 points for cubic splines 352 | if n < 4 then cubicstore = false end 353 | n = math.floor(n) 354 | 355 | -- check validity of t limits: 356 | if t0 > t1 then 357 | t0, t1 = t1, t0 358 | end 359 | if t0 == t1 then 360 | model:warning("Limits for t cannot be equal") 361 | return 362 | end 363 | 364 | -- check validity of x and y limits: 365 | if x0 > x1 then 366 | x0, x1 = x1, x0 367 | end 368 | if x0 == x1 then 369 | model:warning("Limits for x cannot be equal") 370 | return 371 | end 372 | if y0 > y1 then 373 | y0, y1 = y1, y0 374 | end 375 | if y0 == y1 then 376 | model:warning("Limits for y cannot be equal") 377 | return 378 | end 379 | 380 | local trans = calculate_transform(model,x0,y0,x1,y1) 381 | local tlen = t1-t0 382 | local t = t0 383 | 384 | -- create user function 385 | local coordstr = s1 .. "," .. s2 386 | coordstr = mathdefs 387 | .. "return function (t) local v = ipe.Vector(" 388 | .. coordstr 389 | .. "); return v end" 390 | local f,err = _G.load(coordstr,"parametric_plot") 391 | if not f then 392 | model:warning("Could not compile coordinate functions") 393 | return 394 | end 395 | 396 | local curve = { type="curve", closed=false } 397 | 398 | local v0 = f()(t) 399 | local xs,ys={},{} 400 | xs[1],ys[1]=v0.x,v0.y 401 | 402 | v0=trans*v0 403 | local v1 = v0 404 | for i = 1,n do 405 | t = t + tlen/n 406 | v1 = f()(t) 407 | xs[i+1],ys[i+1]=v1.x,v1.y 408 | v1 = trans*v1 409 | curve[#curve + 1] = { type="segment", v0, v1 } 410 | v0 = v1 411 | end 412 | 413 | local graph = ipe.Path(model.attributes, { curve } ) 414 | 415 | -- if want cubic interpolation 416 | local spline= { type="curve", closed=false } 417 | if cubicstore==true then 418 | local p0x,p1x,p2x,p3x=cubicfit(t0,t1,n+1,xs) 419 | local p0y,p1y,p2y,p3y=cubicfit(t0,t1,n+1,ys) 420 | for i=1,n do 421 | spline[#spline+1]={ type=beziername, 422 | trans*ipe.Vector(p0x[i], p0y[i]), 423 | trans*ipe.Vector(p1x[i], p1y[i]), 424 | trans*ipe.Vector(p2x[i], p2y[i]), 425 | trans*ipe.Vector(p3x[i], p3y[i]) } 426 | end 427 | graph = ipe.Path(model.attributes, { spline } ) 428 | end 429 | 430 | model:creation("create graph", graph) 431 | end 432 | 433 | -- plot of a function: 434 | function func_plot(model) 435 | local box = bounding_box(model:page()) 436 | local has_viewport = not box:isEmpty() 437 | local same, nxt = line_counter() 438 | local d = ipeui.Dialog(get_dialog_parent(model), "Function Plot") 439 | d:add("label1", "label", {label="Enter y as a function of x"}, nxt(), 1, 1, 4) 440 | d:add("label2", "label", {label="y="}, nxt(), 1) 441 | d:add("xeq", "input", {}, same(), 2, 1, 3) 442 | d:add("label4", "label", {label="Set the domain for x:"}, nxt(), 1, 1, 4) 443 | d:add("label5", "label", {label="from:"}, nxt(), 1, 1, 1) 444 | d:add("tfrom", "input", {}, same(), 2, 1, 1) 445 | d:add("label6", "label", {label="to:"}, same(), 3, 1, 1) 446 | d:add("tto", "input", {}, same(), 4, 1, 1) 447 | if has_viewport then 448 | d:add("label7", "label", {label="Set coordinates for viewport:"}, nxt(), 1, 1, 4) 449 | d:add("label8", "label", {label="from x="}, nxt(), 1, 1, 1) 450 | d:add("xfrom", "input", {}, same(), 2, 1, 1) 451 | d:add("label9", "label", {label="to x="}, same(), 3, 1, 1) 452 | d:add("xto", "input", {}, same(), 4, 1, 1) 453 | d:add("label10", "label", {label="from y="}, nxt(), 1, 1, 1) 454 | d:add("yfrom", "input", {}, same(), 2, 1, 1) 455 | d:add("label11", "label", {label="to y="}, same(), 3, 1, 1) 456 | d:add("yto", "input", {}, same(), 4, 1, 1) 457 | end 458 | d:add("label12", "label", {label="number of points"}, nxt(), 1, 1, 1) 459 | d:add("points", "input", {}, same(), 2, 1, 1) 460 | d:add("cubic", "checkbox", {label="use cubic splines"}, nxt(), 1, 1, 1) 461 | d:addButton("ok", "&Ok", "accept") 462 | d:addButton("cancel", "&Cancel", "reject") 463 | d:setStretch("column", 2, 1) 464 | d:setStretch("column", 4, 1) 465 | if fstore then d:set("xeq",fstore) end 466 | if has_viewport then 467 | if x0store then d:set("xfrom",x0store) end 468 | if x1store then d:set("xto",x1store) end 469 | if y0store then d:set("yfrom",y0store) end 470 | if y1store then d:set("yto",y1store) end 471 | end 472 | if dom0store then d:set("tfrom",dom0store) end 473 | if dom1store then d:set("tto",dom1store) end 474 | if not pointsstore then pointsstore = 100 end 475 | d:set("points",pointsstore) 476 | if hascubicstore then d:set("cubic",cubicstore) else d:set("cubic",true) end 477 | if not d:execute() then return end 478 | local s1 = d:get("xeq") 479 | fstore = s1 480 | if has_viewport then 481 | x0store = d:get("xfrom") 482 | x1store = d:get("xto") 483 | y0store = d:get("yfrom") 484 | y1store = d:get("yto") 485 | end 486 | dom0store = d:get("tfrom") 487 | dom1store = d:get("tto") 488 | pointsstore = d:get("points") 489 | cubicstore = d:get("cubic") 490 | hascubicstore = true 491 | 492 | -- real coordinates 493 | local x0, x1, y0, y1 494 | if has_viewport then 495 | x0 = get_number(model,x0store,"lower x limit") 496 | if not x0 then return end 497 | x1 = get_number(model,x1store,"upper x limit") 498 | if not x1 then return end 499 | y0 = get_number(model,y0store,"lower y limit") 500 | if not y0 then return end 501 | y1 = get_number(model,y1store,"upper y limit") 502 | if not y1 then return end 503 | else 504 | x0=0 505 | y0=0 506 | x1=1 507 | y1=1 508 | end 509 | 510 | -- independent variable 511 | local t0 = get_number(model,dom0store,"initial value of x") 512 | if not t0 then return end 513 | local t1 = get_number(model,dom1store,"final value of x") 514 | if not t0 then return end 515 | 516 | -- number of samples 517 | local n = get_number(model,pointsstore,"number of samples") 518 | if not n then return end 519 | if n<2 then 520 | model:warning("Number of samples must be at least 2") 521 | return 522 | end 523 | -- we need at least 4 points for cubic spline 524 | if n < 4 then cubicstore = false end 525 | n = math.floor(n) 526 | 527 | -- check validity of t limits: 528 | if t0 > t1 then 529 | t0, t1 = t1, t0 530 | end 531 | if t0 == t1 then 532 | model:warning("Limits for x cannot be equal") 533 | return 534 | end 535 | 536 | -- check validity of x and y limits: 537 | if x0 > x1 then 538 | x0, x1 = x1, x0 539 | end 540 | if x0 == x1 then 541 | model:warning("Limits for x cannot be equal") 542 | return 543 | end 544 | if y0 > y1 then 545 | y0, y1 = y1, y0 546 | end 547 | if y0 == y1 then 548 | model:warning("Limits for y cannot be equal") 549 | return 550 | end 551 | 552 | -- scaling calculations 553 | local trans = calculate_transform(model,x0,y0,x1,y1) 554 | local tlen = t1-t0 555 | local t = t0 556 | 557 | -- create user function 558 | local coordstr = s1 559 | coordstr = mathdefs 560 | .. "return function (x) local v = ipe.Vector(x," 561 | .. coordstr 562 | .. "); return v end" 563 | -- attempt to load this string. Give a warning and quit if it fails. 564 | local f,err = _G.load(coordstr,"function plot") 565 | if not f then 566 | model:warning(err) -- bug: error messages will be cryptic 567 | return 568 | end 569 | -- execute the function obtained from the string. That should create the 570 | -- actual function usable for our calculations. Warn and quit if it fails. 571 | stat,f = _G.pcall(f) 572 | if not stat then 573 | model:warning(f) -- bug: error messages will be cryptic 574 | return 575 | end 576 | 577 | local curve = { type="curve", closed=false } 578 | local v0 579 | -- try to evaluate the function. Warn and quit if it fails. 580 | stat, v0 = _G.pcall(f,t) 581 | if not stat then 582 | model:warning(v0) -- bug: error messages will be cryptic 583 | return 584 | end 585 | if not isfinite(v0.x*v0.y) then 586 | model:warning("domain error") 587 | return 588 | end 589 | 590 | local ys={} 591 | ys[1]=v0.y 592 | 593 | v0 = trans*v0 594 | local v1 = v0 595 | n=n-1 596 | for i = 1,n do 597 | t = t + tlen/n 598 | stat, v1 = _G.pcall(f,t) 599 | if not stat then 600 | model:warning(v1) -- bug: error messages will be cryptic 601 | return 602 | end 603 | if not isfinite(v1.x*v1.y) then 604 | model:warning("domain error") 605 | return 606 | end 607 | 608 | ys[i+1]=v1.y 609 | v1 = trans*v1 610 | curve[#curve + 1] = { type="segment", v0, v1 } 611 | v0 = v1 612 | end 613 | 614 | local graph = ipe.Path(model.attributes, { curve } ) 615 | 616 | -- if want cubic interpolation 617 | local spline= { type="curve", closed=false } 618 | if cubicstore==true then 619 | local p0,p1,p2,p3=cubicfit(t0,t1,n+1,ys) 620 | local h=tlen/n 621 | local t=t0 622 | for i=1,n do 623 | spline[#spline+1]={ type=beziername, 624 | trans*ipe.Vector(t, p0[i]), 625 | trans*ipe.Vector(t+h/3, p1[i]), 626 | trans*ipe.Vector(t+2*h/3, p2[i]), 627 | trans*ipe.Vector(t+h, p3[i]) } 628 | t=t+h 629 | end 630 | graph = ipe.Path(model.attributes, { spline } ) 631 | end 632 | 633 | model:creation("create graph", graph) 634 | end 635 | 636 | -- coordinate system 637 | function make_axes(model, num) 638 | same, nxt = line_counter() 639 | local d = ipeui.Dialog(get_dialog_parent(model), "Coordinate System") 640 | d:add("label3", "label", {label="Set coordinates for viewport:"}, nxt(), 1, 1, 4) 641 | d:add("label8", "label", {label="from x="}, nxt(), 1, 1, 1) 642 | d:add("xfrom", "input", {}, same(), 2, 1, 1) 643 | d:add("label9", "label", {label="to x="}, same(), 3, 1, 1) 644 | d:add("xto", "input", {}, same(), 4, 1, 1) 645 | d:add("label10", "label", {label="from y="}, nxt(), 1, 1, 1) 646 | d:add("yfrom", "input", {}, same(), 2, 1, 1) 647 | d:add("label11", "label", {label="to y="}, same(), 3, 1, 1) 648 | d:add("yto", "input", {}, same(), 4, 1, 1) 649 | if num == 1 then 650 | d:add("label27", "label", {label="Size of x-ticks (in pt):"}, nxt(), 1, 1, 1) 651 | d:add("xticksize", "input", {}, same(), 2, 1, 1) 652 | d:add("label28", "label", {label="Size of y-ticks (in pt):"}, same(), 3, 1, 1) 653 | d:add("yticksize", "input", {}, same(), 4, 1, 1) 654 | d:add("label84", "label", {label="Locations of x-ticks:"},nxt(),1,1,1) 655 | d:add("xticklist", "input", {}, same(), 2, 1, 3) 656 | d:add("label85", "label", {label="Locations of y-ticks:"},nxt(),1,1,1) 657 | d:add("yticklist", "input", {}, same(), 2, 1, 3) 658 | else 659 | d:add("label84", "label", {label="Locations of vertical grid lines:"},nxt(),1,1,1) 660 | d:add("xticklist", "input", {}, same(), 2, 1, 3) 661 | d:add("label85", "label", {label="Locations of horizontal grid lines:"},nxt(),1,1,1) 662 | d:add("yticklist", "input", {}, same(), 2, 1, 3) 663 | end 664 | d:addButton("ok", "&Ok", "accept") 665 | d:addButton("cancel", "&Cancel", "reject") 666 | d:setStretch("column", 2, 1) 667 | d:setStretch("column", 4, 1) 668 | if x0store then d:set("xfrom",x0store) end 669 | if x1store then d:set("xto",x1store) end 670 | if y0store then d:set("yfrom",y0store) end 671 | if y1store then d:set("yto",y1store) end 672 | if not xticksizestore then xticksizestore = 0 end 673 | if not yticksizestore then yticksizestore = 0 end 674 | if (num == 1) then 675 | d:set("xticksize", xticksizestore) 676 | d:set("yticksize", yticksizestore) 677 | end 678 | if xtickstore then d:set("xticklist", xtickstore) end 679 | if ytickstore then d:set("yticklist", ytickstore) end 680 | if not d:execute() then return end 681 | x0store = d:get("xfrom") 682 | x1store = d:get("xto") 683 | y0store = d:get("yfrom") 684 | y1store = d:get("yto") 685 | if num == 1 then 686 | xticksizestore = d:get("xticksize") 687 | yticksizestore = d:get("yticksize") 688 | end 689 | xtickstore = d:get("xticklist") 690 | ytickstore = d:get("yticklist") 691 | 692 | -- real coordinates 693 | local x0 = get_number(model,x0store,"lower x limit") 694 | if not x0 then return end 695 | local x1 = get_number(model,x1store,"upper x limit") 696 | if not x1 then return end 697 | local y0 = get_number(model,y0store,"lower y limit") 698 | if not y0 then return end 699 | local y1 = get_number(model,y1store,"upper y limit") 700 | if not y1 then return end 701 | 702 | -- check validity of x and y limits: 703 | if x0 > x1 then 704 | x0, x1 = x1, x0 705 | end 706 | if x0 == x1 then 707 | model:warning("Limits for x cannot be equal") 708 | return 709 | end 710 | if y0 > y1 then 711 | y0, y1 = y1, y0 712 | end 713 | if y0 == y1 then 714 | model:warning("Limits for y cannot be equal") 715 | return 716 | end 717 | 718 | local trans = calculate_transform(model,x0,y0,x1,y1) 719 | 720 | -- ticks: 721 | xticksize = tonumber(xticksizestore) 722 | if not xticksize then xticksize = 0 end 723 | yticksize = tonumber(yticksizestore) 724 | if not yticksize then yticksize = 0 end 725 | 726 | -- tick locations: 727 | local xticks = {} 728 | local yticks = {} 729 | 730 | if xtickstore and (xtickstore ~= "") then 731 | local tickliststr = mathdefs .. "return {" .. xtickstore .. "}" 732 | -- attempt to load this string. Give a warning and quit if it fails. 733 | local f,err = _G.load(tickliststr,"x-ticks") 734 | if not f then 735 | model:warning(err) -- bug: error messages will be cryptic 736 | return 737 | end 738 | local xticklist 739 | stat, xticklist = _G.pcall(f,t) 740 | if not stat then 741 | model:warning(xticklist) -- bug: error messages will be cryptic 742 | return 743 | end 744 | if _G.type(xticklist[1]) == "table" then 745 | xticklist = xticklist[1] 746 | end 747 | for i,x in pairs(xticklist) do 748 | if isfinite(x) then 749 | if (x > x0) and (x < x1) then 750 | xticks[#xticks + 1] = x 751 | end 752 | end 753 | end 754 | else -- place ticks at every integer 755 | for i = math.floor(x0) + 1, math.ceil(x1)-1 do 756 | xticks[#xticks + 1] = i 757 | end 758 | end 759 | 760 | -- do the same for y-ticks 761 | if ytickstore and (ytickstore ~= "") then 762 | local tickliststr = mathdefs .. "return {" .. ytickstore .. "}" 763 | -- attempt to load this string. Give a warning and quit if it fails. 764 | local f,err = _G.load(tickliststr,"y-ticks") 765 | if not f then 766 | model:warning(err) -- bug: error messages will be cryptic 767 | return 768 | end 769 | local yticklist 770 | stat, yticklist = _G.pcall(f,t) 771 | if not stat then 772 | model:warning(yticklist) -- bug: error messages will be cryptic 773 | return 774 | end 775 | if _G.type(yticklist[1]) == "table" then 776 | yticklist = yticklist[1] 777 | end 778 | for i,y in pairs(yticklist) do 779 | if isfinite(y) then 780 | if (y > y0) and (y < y1) then 781 | yticks[#yticks + 1] = y 782 | end 783 | end 784 | end 785 | else -- place ticks at every integer 786 | for i = math.floor(y0) + 1, math.ceil(y1)-1 do 787 | yticks[#yticks + 1] = i 788 | end 789 | end 790 | 791 | if (num == 1) then 792 | local axes = { } 793 | 794 | -- only make x-axis if y0<=0<=y1 795 | if y0*y1 <= 0 then 796 | local v0 = trans*ipe.Vector(x0,0) 797 | local v1 = trans*ipe.Vector(x1,0) 798 | local curve = { type="curve", closed=false; { type="segment", v0, v1 }} 799 | local xaxis = ipe.Path(model.attributes, {curve}) 800 | xaxis:set("farrow",true) 801 | xaxis:set("pen","fat") 802 | axes[#axes + 1] = xaxis 803 | if xticksize ~= 0 then 804 | local half_tick = ipe.Vector(0,xticksize/2) 805 | for n,i in pairs(xticks) do 806 | v0 = trans*ipe.Vector(i,0) 807 | local tick = { type="curve", closed=false; 808 | { type="segment", v0+half_tick, v0-half_tick }} 809 | axes[#axes + 1] = ipe.Path(model.attributes, {tick}) 810 | end 811 | end 812 | end 813 | if x0*x1 <= 0 then 814 | local v0 = trans*ipe.Vector(0,y0) 815 | local v1 = trans*ipe.Vector(0,y1) 816 | curve = { type="curve", closed=false; { type="segment", v0, v1 }} 817 | local yaxis = ipe.Path(model.attributes, {curve}) 818 | yaxis:set("farrow",true) 819 | yaxis:set("pen","fat") 820 | axes[#axes + 1] = yaxis 821 | if yticksize ~= 0 then 822 | local half_tick = ipe.Vector(yticksize/2,0) 823 | for n,i in pairs(yticks) do 824 | v0 = trans*ipe.Vector(0,i) 825 | local tick = { type="curve", closed=false; 826 | { type="segment", v0+half_tick, v0-half_tick }} 827 | axes[#axes + 1] = ipe.Path(model.attributes, {tick}) 828 | end 829 | end 830 | end 831 | 832 | if #axes > 0 then 833 | local coordsys = ipe.Group(axes) 834 | model:creation("create coordinate system", coordsys) 835 | end 836 | else 837 | local grid = {} 838 | for n,i in pairs(xticks) do 839 | local v0 = trans*ipe.Vector(i,y0) 840 | local v1 = trans*ipe.Vector(i,y1) 841 | local line = { type="curve", closed=false; { type="segment", v0, v1 }} 842 | grid[#grid + 1] = ipe.Path(model.attributes, {line}) 843 | end 844 | for n,i in pairs(yticks) do 845 | local v0 = trans*ipe.Vector(x0,i) 846 | local v1 = trans*ipe.Vector(x1,i) 847 | local line = { type="curve", closed=false; { type="segment", v0, v1 }} 848 | grid[#grid + 1] = ipe.Path(model.attributes, {line}) 849 | end 850 | 851 | if #grid > 0 then 852 | local coordsys = ipe.Group(grid) 853 | model:creation("create coordinate grid", coordsys) 854 | end 855 | end 856 | end 857 | 858 | methods = { 859 | { label = "Coordinate system", run=make_axes }, 860 | { label = "Coordinate grid", run=make_axes }, 861 | { label = "Parametric plot", run=curve }, 862 | { label = "Function plot", run=func_plot }, 863 | } 864 | 865 | ---------------------------------------------------------------------- 866 | --------------------------------------------------------------------------------