Jackalope-Asemic

So I did mine with the idea of making a page with some botanical illustration. I wanted to make asemic writing relating to plants in someway, and ended up deciding that the shape of different trees was fairly letter-like. I’m overall happy with the results, although Golan did bring up that it would’ve been better to have generated the plant illustrations with code as well, which I somehow did not consider until that point. Too late for that though! Things I’m dissatisfied with: not procedurally generating the plants, the points for my alphabet are created in a incredibly non-complex hack-y way, and the writing ended up not a particularly convincing example of asemic writing.

Heres the code for making the page. Below is my code for making each tree/letter;

// see https://processing.org/reference/libraries/pdf/index.htmls
//special thanks to Rato Marczak for his chart of tree shapes which can be found at
// http://www.ratomodeling.com/articles/base1/base1.html
 
import processing.pdf.*;
boolean bRecordingPDF;
int pdfOutputCount = 0; 
int[] T1 = {196, 620, 217, 618, 222, 617, 228, 617, 240, 617, 242, 617, 253, 616, 255, 616, 266, 613, 266, 612, 268, 593, 269, 576, 269, 573, 266, 563, 254, 577, 254, 581, 253, 588, 242, 595, 238, 595, 238, 587, 241, 577, 238, 572, 228, 574, 226, 574, 225, 574, 220, 572, 229, 562, 233, 556, 230, 556, 227, 556, 223, 558, 219, 558, 215, 559, 205, 567, 189, 580, 187, 581, 178, 584, 176, 586, 178, 582, 187, 570, 188, 568, 192, 560, 183, 564, 177, 564, 178, 555, 159, 552, 161, 540, 193, 516, 162, 518, 189, 499, 197, 491, 189, 491, 185, 491, 185, 490, 190, 485, 201, 468, 193, 460, 227, 442, 231, 435, 232, 435, 232, 429, 227, 429, 223, 429, 217, 431, 211, 433, 183, 442, 180, 442, 179, 443, 172, 443, 172, 441, 183, 431, 190, 427, 193, 424, 203, 416, 208, 412, 213, 406, 215, 403, 226, 390, 227, 389, 241, 377, 240, 376, 240, 375, 244, 372, 250, 369, 246, 360, 248, 357, 249, 356, 249, 355, 248, 355, 242, 355, 229, 352, 230, 351, 230, 350, 228, 343, 220, 337, 231, 333, 209, 344, 265, 265, 256, 267, 272, 249, 273, 244, 263, 237, 263, 235, 266, 233, 266, 229, 264, 229, 259, 229, 239, 225, 248, 213, 259, 205, 262, 203, 269, 196, 291, 150, 292, 148, 293, 145, 296, 138, 304, 119, 304, 121, 303, 127, 304, 147, 316, 173, 329, 182, 340, 191, 339, 192, 323, 200, 318, 201, 302, 205, 301, 205, 309, 212, 316, 219, 317, 227, 312, 228, 316, 236, 307, 245, 308, 246, 337, 253, 342, 254, 366, 268, 363, 271, 330, 275, 343, 291, 338, 297, 332, 299, 327, 301, 322, 303, 320, 304, 319, 305, 330, 316, 332, 319, 332, 321, 328, 322, 313, 324, 310, 327, 314, 331, 318, 338, 332, 367, 354, 394, 373, 403, 367, 403, 362, 402, 357, 402, 352, 402, 346, 402, 342, 403, 334, 403, 333, 402, 320, 396, 321, 403, 322, 405, 339, 417, 339, 449, 350, 459, 339, 463, 362, 466, 352, 468, 358, 480, 386, 491, 392, 495, 396, 498, 392, 501, 377, 502, 358, 502, 354, 502, 313, 489, 306, 487, 309, 490, 330, 511, 347, 524, 358, 530, 357, 530, 341, 532, 375, 552, 346, 562, 330, 562, 332, 569, 295, 562, 344, 599, 336, 599, 334, 599, 331, 599, 328, 599, 316, 593, 294, 583, 290, 577, 291, 586, 292, 590, 297, 602, 349, 608, 369, 606, 396, 607, 401, 608, 414, 609, 416, 609};
int[] T2 = {220, 614, 251, 610, 254, 609, 253, 606, 250, 594, 249, 591, 248, 588, 246, 583, 244, 577, 242, 568, 242, 564, 241, 561, 241, 560, 241, 555, 241, 544, 240, 542, 226, 527, 221, 525, 216, 523, 214, 530, 215, 531, 213, 559, 210, 561, 208, 562, 203, 560, 201, 560, 191, 562, 189, 561, 179, 560, 177, 560, 170, 556, 169, 543, 170, 539, 175, 533, 178, 530, 178, 527, 172, 512, 170, 512, 168, 512, 162, 502, 164, 500, 172, 492, 174, 490, 156, 493, 145, 498, 139, 498, 129, 495, 126, 494, 124, 494, 120, 489, 137, 468, 127, 425, 130, 423, 128, 421, 123, 418, 121, 416, 135, 420, 152, 424, 158, 428, 159, 428, 160, 408, 156, 406, 157, 389, 158, 388, 173, 375, 171, 373, 183, 364, 181, 359, 184, 352, 186, 350, 191, 347, 197, 344, 211, 347, 215, 353, 223, 356, 227, 355, 228, 354, 231, 349, 228, 334, 201, 312, 199, 310, 187, 303, 210, 292, 227, 264, 226, 252, 225, 251, 225, 248, 229, 242, 230, 241, 224, 232, 217, 225, 219, 221, 221, 220, 255, 187, 256, 164, 257, 158, 259, 155, 260, 154, 266, 151, 274, 157, 274, 160, 276, 179, 301, 205, 306, 221, 304, 224, 304, 235, 305, 236, 325, 256, 328, 264, 354, 281, 357, 291, 353, 310, 352, 312, 352, 320, 362, 327, 366, 329, 367, 330, 368, 331, 363, 334, 361, 336, 360, 336, 361, 341, 367, 347, 369, 349, 371, 355, 371, 356, 371, 361, 370, 362, 359, 379, 355, 380, 351, 382, 351, 383, 362, 387, 380, 390, 395, 403, 384, 410, 365, 414, 364, 415, 360, 417, 347, 424, 344, 424, 341, 430, 349, 438, 351, 439, 360, 444, 368, 449, 371, 452, 372, 454, 376, 460, 374, 469, 371, 470, 360, 481, 368, 488, 370, 492, 372, 500, 372, 503, 344, 511, 332, 503, 332, 500, 336, 478, 319, 466, 312, 472, 310, 476, 306, 478, 303, 478, 302, 448, 298, 448, 288, 454, 281, 471, 292, 493, 301, 498, 303, 503, 308, 502, 322, 488, 334, 487, 334, 488, 334, 489, 326, 505, 302, 530, 291, 541, 273, 559, 269, 580, 270, 585, 271, 599, 279, 634, 281, 636, 300, 629, 307, 627, 327, 627, 331, 627, 368, 626, 379, 626, 397, 627};
int[] T3 = {159, 613, 215, 605, 227, 603, 242, 597, 249, 588, 249, 586, 250, 578, 251, 561, 249, 555, 223, 487, 222, 485, 219, 482, 199, 457, 195, 456, 191, 454, 177, 453, 175, 457, 175, 458, 177, 464, 177, 467, 174, 472, 154, 473, 137, 490, 133, 490, 133, 489, 133, 483, 133, 477, 121, 476, 119, 476, 116, 476, 116, 478, 113, 483, 103, 488, 95, 483, 90, 479, 89, 478, 88, 471, 90, 468, 90, 467, 90, 466, 93, 466, 100, 466, 105, 446, 104, 440, 107, 431, 97, 425, 87, 427, 78, 429, 77, 429, 68, 424, 73, 406, 81, 399, 90, 390, 97, 387, 96, 387, 93, 363, 96, 363, 98, 367, 100, 376, 104, 377, 133, 366, 139, 358, 139, 357, 139, 356, 137, 350, 136, 349, 162, 345, 164, 343, 133, 324, 132, 324, 130, 331, 130, 337, 129, 349, 128, 350, 127, 351, 120, 354, 115, 354, 96, 352, 84, 334, 71, 325, 65, 319, 68, 306, 73, 303, 76, 301, 99, 287, 99, 286, 113, 277, 110, 273, 107, 266, 111, 260, 107, 246, 99, 235, 123, 212, 121, 210, 120, 210, 149, 188, 154, 173, 187, 165, 227, 164, 236, 153, 244, 146, 250, 144, 258, 142, 265, 142, 272, 142, 309, 142, 313, 143, 326, 149, 330, 150, 334, 150, 351, 147, 354, 142, 361, 135, 405, 146, 405, 147, 406, 149, 407, 160, 406, 167, 379, 189, 364, 204, 367, 209, 371, 210, 380, 210, 387, 210, 396, 210, 414, 206, 428, 225, 432, 232, 435, 241, 433, 246, 440, 253, 456, 256, 459, 260, 466, 274, 469, 279, 467, 292, 452, 303, 452, 307, 444, 339, 441, 341, 438, 343, 396, 339, 401, 377, 415, 384, 424, 394, 428, 402, 419, 443, 360, 437, 357, 434, 339, 423, 319, 426, 308, 431, 275, 379, 272, 379, 268, 379, 266, 379, 257, 388, 295, 453, 333, 404, 352, 415, 348, 421, 296, 483, 289, 494, 283, 503, 281, 507, 271, 525, 273, 554, 274, 556, 276, 560, 277, 564, 282, 581, 294, 595, 301, 592, 316, 589, 352, 588, 423, 585, 434, 582, 440, 582, 449, 581};
int[] T4 = {141, 592, 212, 588, 221, 587, 223, 587, 225, 586, 242, 582, 246, 580, 248, 578, 251, 574, 251, 571, 244, 550, 242, 545, 241, 521, 239, 507, 226, 484, 220, 485, 214, 449, 212, 448, 210, 447, 201, 425, 197, 425, 197, 416, 199, 411, 201, 406, 203, 393, 203, 392, 202, 382, 201, 380, 201, 378, 201, 377, 201, 376, 216, 371, 217, 359, 214, 307, 215, 304, 223, 293, 221, 288, 226, 273, 230, 267, 235, 237, 222, 210, 225, 203, 239, 172, 236, 153, 244, 135, 244, 134, 244, 133, 254, 101, 270, 44, 269, 40, 274, 32, 277, 25, 278, 23, 278, 19, 278, 16, 283, 6, 284, 5, 288, 2, 288, 4, 288, 6, 290, 12, 291, 15, 294, 33, 294, 38, 295, 43, 298, 61, 301, 75, 306, 114, 315, 139, 315, 142, 316, 152, 317, 159, 318, 160, 318, 155, 329, 119, 337, 177, 333, 197, 328, 204, 323, 218, 323, 221, 329, 215, 335, 212, 334, 248, 332, 257, 331, 260, 328, 272, 324, 288, 325, 291, 335, 299, 342, 309, 342, 319, 337, 360, 331, 359, 312, 358, 312, 359, 320, 359, 340, 355, 341, 355, 355, 408, 353, 433, 350, 469, 348, 474, 344, 476, 342, 476, 328, 482, 323, 478, 319, 476, 317, 468, 326, 451, 323, 464, 296, 542, 289, 539, 287, 539, 286, 539, 285, 539, 285, 536, 281, 541, 277, 541, 270, 544, 269, 545, 273, 569, 276, 585, 308, 588, 330, 591, 288, 575, 289, 576, 296, 579, 304, 583, 350, 577, 356, 575};
int[] T5 = {218, 606, 232, 604, 284, 593, 283, 589, 279, 560, 279, 556, 277, 549, 273, 536, 272, 534, 242, 491, 241, 490, 226, 475, 219, 470, 215, 468, 199, 461, 202, 486, 202, 489, 202, 491, 200, 501, 183, 491, 173, 499, 154, 542, 149, 543, 144, 538, 138, 536, 147, 516, 151, 507, 154, 501, 159, 485, 163, 468, 165, 463, 167, 459, 167, 457, 162, 455, 146, 452, 145, 452, 149, 440, 151, 436, 156, 409, 147, 393, 144, 384, 160, 376, 169, 361, 169, 360, 170, 345, 171, 341, 169, 336, 197, 338, 200, 334, 201, 332, 206, 318, 206, 315, 206, 314, 209, 308, 215, 300, 202, 299, 211, 285, 225, 274, 223, 272, 228, 265, 222, 256, 221, 255, 216, 241, 214, 230, 215, 220, 219, 218, 226, 216, 228, 215, 224, 211, 231, 200, 231, 197, 216, 176, 247, 181, 248, 187, 250, 191, 262, 187, 263, 180, 263, 171, 263, 168, 266, 162, 267, 155, 265, 132, 267, 123, 268, 123, 270, 122, 275, 122, 285, 131, 288, 118, 302, 96, 307, 99, 310, 109, 313, 127, 323, 148, 322, 150, 331, 160, 355, 153, 361, 151, 363, 149, 361, 148, 372, 135, 384, 128, 378, 153, 381, 161, 395, 165, 398, 162, 404, 167, 386, 182, 379, 199, 379, 201, 392, 214, 395, 223, 393, 228, 382, 235, 381, 239, 385, 242, 390, 250, 382, 258, 390, 262, 391, 263, 394, 264, 396, 264, 399, 259, 402, 246, 400, 240, 411, 239, 413, 247, 413, 251, 412, 256, 413, 267, 415, 271, 416, 272, 416, 277, 418, 278, 421, 278, 439, 274, 449, 281, 446, 287, 444, 295, 433, 327, 427, 344, 434, 348, 458, 369, 459, 360, 459, 356, 463, 351, 482, 349, 482, 353, 481, 355, 477, 368, 477, 389, 478, 392, 483, 398, 480, 406, 479, 408, 502, 419, 501, 421, 484, 454, 487, 462, 489, 470, 481, 475, 478, 507, 480, 517, 480, 522, 455, 573, 453, 570, 450, 566, 447, 566, 440, 556, 440, 534, 436, 518, 423, 513, 410, 512, 408, 512, 405, 521, 375, 526, 374, 524, 375, 488, 346, 463, 345, 459, 339, 441, 307, 440, 295, 442, 290, 441, 289, 441, 284, 435, 280, 432, 298, 490, 299, 495, 304, 522, 305, 523, 313, 519, 313, 518, 349, 480, 351, 476, 362, 469, 369, 468, 346, 495, 346, 505, 355, 503, 363, 498, 387, 490, 386, 493, 369, 515, 348, 519, 340, 522, 339, 523, 333, 526, 332, 527, 320, 538, 312, 548, 306, 557, 303, 561, 303, 567, 302, 586, 303, 591, 305, 599, 309, 603, 314, 605, 314, 606, 350, 605};
int[] T6 = {138, 584, 152, 585, 156, 585, 204, 582, 319, 585, 336, 585, 345, 585, 349, 585, 360, 582, 362, 580, 371, 576, 372, 576, 374, 574, 368, 559, 360, 542, 358, 533, 356, 525, 355, 523, 351, 514, 342, 505, 308, 510, 294, 499, 291, 498, 248, 477, 243, 474, 239, 471, 232, 465, 225, 459, 219, 458, 215, 459, 205, 463, 197, 465, 189, 466, 187, 466, 174, 445, 170, 447, 161, 450, 157, 453, 142, 458, 140, 430, 127, 424, 125, 420, 127, 420, 141, 416, 144, 416, 147, 416, 137, 415, 132, 409, 143, 376, 127, 369, 127, 367, 185, 360, 185, 362, 186, 372, 190, 374, 218, 367, 240, 357, 232, 353, 230, 352, 242, 346, 307, 346, 319, 354, 328, 359, 354, 355, 389, 350, 421, 351, 425, 351, 434, 365, 427, 367, 425, 367, 411, 374, 391, 388, 295, 408, 246, 345, 246, 344, 216, 339, 246, 303, 282, 311, 271, 291, 271, 287, 273, 285, 267, 286, 190, 303, 189, 302, 187, 289, 189, 281, 193, 275, 202, 256, 205, 254, 228, 248, 234, 247, 266, 247, 271, 247, 288, 229, 302, 227, 308, 229, 324, 241, 337, 242, 340, 241, 358, 238, 371, 228, 377, 215, 427, 211, 438, 211, 467, 223, 470, 224, 496, 252, 502, 250, 506, 249, 508, 249, 509, 249, 542, 273, 547, 272, 561, 270, 598, 277, 612, 288, 616, 303, 582, 324, 589, 337, 589, 345, 483, 309, 478, 294, 476, 293, 421, 284, 420, 285, 419, 287, 418, 289, 417, 298, 441, 310, 452, 310, 497, 309, 523, 316, 531, 331, 534, 335, 537, 339, 538, 341, 539, 344, 539, 358, 539, 379, 565, 383, 582, 399, 586, 398, 594, 403, 595, 405, 602, 416, 590, 458, 588, 461, 586, 499, 572, 504, 534, 477, 506, 460, 513, 431, 464, 414, 457, 411, 446, 404, 409, 387, 378, 391, 372, 393, 366, 394, 337, 400, 327, 409, 326, 422, 348, 448, 362, 426, 368, 419, 389, 396, 400, 383, 412, 377, 413, 382, 407, 400, 398, 415, 370, 444, 348, 472, 347, 474, 347, 484, 347, 491, 347, 492, 347, 493, 381, 501, 396, 502, 403, 499, 412, 495, 420, 492, 420, 490, 422, 486, 426, 479, 432, 466, 433, 465, 439, 459, 419, 420, 409, 390, 413, 396, 432, 423, 440, 432, 445, 437, 456, 449, 463, 449, 517, 414, 526, 409, 527, 410, 470, 455, 467, 458, 400, 491, 393, 499, 379, 520, 389, 548, 393, 561, 401, 572, 471, 564, 501, 564, 554, 569, 624, 584, 627, 584, 632, 584, 635, 584, 651, 585, 654, 586, 657, 586};
int[] T7 = {163, 600, 200, 594, 214, 594, 216, 594, 227, 592, 229, 592, 230, 592, 234, 592, 247, 588, 258, 578, 260, 575, 261, 575, 264, 568, 268, 557, 262, 518, 261, 517, 249, 493, 247, 473, 246, 466, 246, 465, 245, 462, 244, 459, 242, 457, 242, 457, 244, 462, 246, 476, 245, 477, 241, 480, 236, 488, 234, 495, 228, 508, 205, 504, 197, 495, 195, 493, 192, 492, 189, 478, 194, 468, 189, 472, 186, 476, 185, 476, 184, 472, 176, 457, 176, 451, 155, 436, 156, 428, 158, 426, 164, 425, 187, 421, 188, 421, 191, 420, 192, 420, 195, 415, 191, 385, 168, 393, 157, 400, 161, 366, 161, 364, 158, 353, 174, 354, 193, 319, 192, 318, 192, 307, 183, 289, 174, 286, 174, 285, 163, 290, 161, 277, 162, 269, 172, 260, 173, 259, 174, 258, 181, 247, 180, 246, 179, 241, 179, 239, 179, 236, 179, 228, 180, 225, 183, 223, 202, 229, 208, 231, 220, 230, 225, 225, 228, 216, 223, 208, 208, 192, 208, 187, 208, 186, 214, 165, 260, 153, 261, 155, 261, 150, 251, 145, 247, 140, 261, 122, 272, 119, 275, 118, 276, 118, 301, 133, 302, 135, 302, 136, 297, 141, 296, 144, 296, 146, 296, 148, 295, 170, 294, 174, 294, 176, 291, 186, 290, 191, 290, 192, 295, 206, 300, 206, 313, 202, 317, 202, 322, 202, 338, 212, 334, 217, 332, 221, 331, 234, 329, 240, 326, 238, 319, 233, 320, 228, 322, 224, 324, 220, 324, 219, 325, 218, 326, 211, 326, 198, 315, 191, 311, 191, 304, 191, 299, 184, 300, 182, 300, 177, 301, 174, 302, 168, 304, 163, 318, 145, 321, 145, 338, 145, 351, 152, 356, 158, 357, 160, 357, 166, 357, 167, 361, 171, 363, 172, 370, 176, 375, 178, 382, 172, 401, 161, 406, 164, 408, 167, 412, 174, 413, 190, 415, 210, 409, 232, 406, 242, 405, 249, 405, 252, 406, 262, 402, 288, 402, 290, 403, 305, 413, 342, 414, 358, 413, 363, 392, 382, 394, 385, 396, 395, 395, 396, 382, 402, 382, 401, 382, 398, 380, 413, 367, 415, 356, 420, 353, 415, 350, 388, 343, 367, 335, 360, 288, 365, 305, 361, 325, 361, 337, 366, 346, 414, 346, 418, 352, 422, 362, 423, 370, 423, 383, 416, 385, 411, 391, 409, 397, 413, 400, 422, 400, 427, 394, 459, 393, 465, 395, 475, 382, 483, 376, 518, 366, 518, 353, 516, 314, 474, 303, 463, 298, 446, 284, 427, 279, 427, 269, 436, 270, 439, 283, 506, 284, 501, 321, 452, 321, 457, 316, 466, 312, 473, 305, 481, 297, 492, 279, 507, 276, 516, 276, 521, 276, 531, 278, 534, 291, 543, 314, 519, 333, 498, 334, 498, 339, 495, 341, 495, 342, 499, 329, 528, 316, 542, 309, 549, 288, 565, 287, 567, 288, 570, 290, 574, 293, 580, 294, 583, 304, 601, 321, 596, 328, 593, 336, 591, 348, 590, 363, 590, 381, 592, 383, 592, 388, 591, 396, 589, 399, 588, 404, 588};
int[] T8 = {236, 585, 240, 585, 257, 585, 294, 584, 297, 583, 300, 583, 301, 582, 315, 579, 315, 577, 315, 573, 316, 573, 320, 568, 323, 560, 324, 550, 321, 546, 314, 533, 313, 532, 310, 526, 303, 514, 302, 512, 272, 454, 271, 452, 265, 427, 263, 418, 262, 413, 255, 394, 240, 362, 221, 333, 217, 327, 214, 323, 198, 306, 185, 291, 165, 280, 127, 262, 112, 231, 91, 247, 89, 249, 84, 253, 65, 229, 66, 225, 75, 217, 74, 216, 54, 214, 38, 204, 47, 168, 43, 163, 52, 158, 76, 157, 84, 157, 86, 158, 88, 159, 111, 171, 112, 172, 116, 169, 116, 165, 117, 158, 119, 154, 122, 149, 130, 111, 142, 108, 157, 107, 169, 104, 183, 104, 187, 107, 196, 118, 197, 120, 215, 132, 220, 133, 228, 134, 228, 135, 255, 99, 258, 98, 281, 83, 273, 72, 271, 69, 268, 59, 271, 56, 274, 54, 282, 51, 292, 37, 305, 34, 310, 34, 328, 36, 331, 38, 331, 45, 329, 47, 317, 59, 316, 60, 309, 70, 307, 73, 306, 75, 309, 76, 326, 83, 334, 88, 340, 92, 333, 100, 334, 102, 331, 118, 317, 130, 323, 136, 346, 144, 339, 148, 337, 149, 386, 150, 399, 152, 399, 153, 418, 148, 418, 146, 425, 140, 429, 141, 436, 141, 443, 144, 430, 149, 422, 153, 414, 161, 411, 162, 411, 150, 410, 149, 408, 147, 385, 146, 377, 146, 355, 135, 347, 110, 347, 106, 344, 101, 343, 101, 323, 100, 323, 99, 337, 78, 335, 73, 314, 60, 314, 58, 305, 50, 305, 49, 304, 48, 306, 44, 315, 41, 369, 48, 374, 49, 381, 58, 377, 64, 397, 81, 411, 78, 416, 74, 427, 60, 469, 53, 472, 53, 474, 52, 476, 52, 488, 51, 508, 55, 529, 79, 551, 81, 556, 84, 559, 85, 563, 86, 577, 91, 577, 98, 599, 87, 630, 101, 631, 105, 630, 118, 628, 118, 624, 119, 599, 126, 601, 125, 593, 134, 561, 133, 559, 133, 550, 127, 547, 123, 542, 124, 521, 145, 523, 152, 525, 154, 530, 157, 572, 144, 581, 143, 588, 143, 593, 143, 606, 144, 612, 144, 621, 150, 625, 139, 626, 131, 653, 132, 655, 156, 651, 173, 649, 183, 648, 184, 641, 190, 639, 191, 642, 201, 650, 205, 660, 208, 663, 211, 667, 215, 671, 217, 685, 215, 687, 215, 709, 230, 651, 260, 647, 251, 638, 250, 607, 256, 587, 257, 574, 267, 530, 256, 525, 254, 522, 254, 515, 256, 507, 257, 499, 257, 490, 275, 483, 285, 472, 282, 450, 277, 435, 275, 422, 270, 411, 270, 398, 277, 386, 276, 296, 286, 294, 281, 286, 274, 274, 270, 268, 270, 258, 366, 264, 360, 263, 353, 263, 342, 263, 339, 264, 322, 264, 319, 266, 311, 267, 303, 269, 297, 272, 281, 272, 279, 274, 265, 276, 264, 280, 265, 282, 266, 288, 274, 289, 286, 282, 311, 275, 382, 275, 390, 275, 396, 275, 397, 275, 402, 275, 410, 275, 420, 276, 422, 277, 425, 278, 428, 280, 429, 283, 430, 287, 433, 292, 438, 299, 448, 315, 466, 317, 468, 324, 475, 337, 470, 370, 375, 372, 371, 375, 356, 376, 350, 378, 340, 378, 338, 379, 320, 375, 298, 374, 288, 373, 269, 373, 267, 377, 266, 378, 267, 380, 271, 382, 280, 383, 287, 386, 306, 388, 329, 389, 336, 390, 343, 396, 337, 427, 309, 430, 306, 439, 301, 442, 299, 466, 289, 467, 289, 473, 286, 488, 282, 490, 285, 490, 286, 478, 301, 475, 303, 472, 306, 459, 315, 457, 316, 456, 316, 450, 318, 435, 323, 434, 324, 431, 326, 428, 327, 418, 335, 415, 338, 404, 351, 402, 354, 401, 354, 391, 366, 390, 367, 387, 371, 384, 376, 384, 377, 380, 387, 377, 396, 372, 411, 369, 418, 367, 423, 363, 430, 362, 432, 355, 452, 350, 462, 351, 492, 353, 495, 355, 495, 359, 494, 361, 493, 370, 484, 425, 416, 427, 414, 433, 408, 470, 381, 529, 341, 548, 327, 551, 324, 575, 304, 578, 301, 584, 295, 586, 294, 588, 292, 594, 288, 596, 286, 600, 284, 605, 279, 612, 272, 613, 271, 615, 270, 629, 260, 631, 259, 633, 258, 644, 252, 648, 253, 634, 266, 616, 277, 604, 287, 602, 289, 595, 295, 594, 296, 584, 305, 580, 310, 578, 311, 563, 325, 562, 326, 561, 326, 554, 333, 554, 334, 543, 343, 542, 344, 537, 348, 536, 348, 530, 353, 527, 355, 525, 356, 519, 360, 503, 371, 499, 373, 473, 387, 449, 404, 447, 405, 420, 428, 410, 439, 392, 471, 389, 480, 388, 481, 386, 485, 385, 488, 383, 492, 379, 502, 378, 505, 378, 506, 376, 511, 375, 518, 375, 527, 374, 535, 379, 544, 387, 556, 390, 559, 426, 578, 430, 578, 456, 578, 486, 577, 503, 578, 608, 584};
int[] T9 = {200, 585, 209, 585, 221, 584, 231, 583, 247, 581, 265, 580, 277, 580, 279, 579, 282, 574, 282, 565, 281, 560, 273, 548, 265, 542, 259, 539, 258, 538, 248, 533, 242, 529, 240, 527, 239, 526, 238, 524, 224, 512, 213, 505, 197, 495, 186, 483, 184, 480, 177, 487, 164, 498, 155, 499, 139, 477, 138, 477, 137, 476, 135, 473, 155, 459, 151, 458, 146, 436, 148, 435, 152, 423, 148, 416, 147, 414, 153, 398, 170, 395, 167, 388, 168, 382, 171, 380, 181, 378, 181, 374, 183, 369, 186, 367, 204, 369, 204, 359, 214, 354, 222, 354, 227, 357, 234, 352, 255, 349, 261, 342, 264, 336, 295, 334, 297, 340, 297, 342, 297, 344, 297, 347, 304, 342, 306, 341, 315, 338, 318, 339, 330, 342, 339, 343, 346, 342, 349, 339, 349, 342, 354, 346, 355, 347, 377, 347, 385, 353, 390, 359, 390, 360, 391, 363, 391, 364, 391, 365, 390, 366, 387, 367, 389, 373, 393, 370, 336, 373, 341, 376, 336, 373, 334, 373, 323, 373, 275, 391, 275, 389, 275, 388, 278, 377, 284, 375, 292, 373, 297, 372, 355, 377, 381, 371, 385, 373, 388, 375, 394, 369, 395, 369, 399, 373, 412, 379, 440, 408, 439, 454, 448, 478, 441, 496, 439, 498, 412, 504, 371, 492, 342, 487, 317, 488, 307, 490, 294, 496, 322, 501, 333, 501, 393, 515, 396, 514, 399, 507, 408, 494, 390, 511, 386, 513, 368, 521, 360, 523, 347, 529, 331, 550, 331, 557, 328, 566, 321, 575, 315, 582, 313, 573, 317, 508, 315, 478, 327, 487, 332, 497, 332, 501, 328, 532, 327, 535, 326, 538, 325, 541, 324, 544, 323, 552, 323, 554, 323, 556, 323, 557, 328, 555, 329, 553, 331, 548, 333, 542, 334, 539, 338, 530, 346, 515, 352, 510, 362, 501, 364, 499, 368, 496, 374, 491, 375, 490, 355, 526, 336, 551, 394, 564, 463, 576, 478, 577};
int[] T10 = {216, 576, 271, 574, 275, 575, 279, 576, 281, 577, 290, 580, 314, 574, 318, 573, 330, 568, 330, 566, 330, 565, 332, 556, 332, 554, 330, 548, 329, 547, 331, 538, 331, 535, 331, 532, 331, 530, 331, 529, 317, 521, 304, 511, 295, 511, 277, 514, 272, 515, 265, 517, 263, 517, 255, 518, 245, 515, 227, 508, 212, 503, 208, 493, 198, 476, 170, 478, 159, 476, 151, 470, 148, 468, 111, 453, 110, 452, 107, 451, 107, 450, 113, 450, 150, 449, 154, 451, 196, 472, 203, 475, 206, 476, 213, 478, 214, 469, 217, 466, 231, 453, 240, 447, 240, 454, 242, 453, 262, 449, 278, 461, 280, 441, 265, 447, 259, 442, 249, 444, 245, 445, 243, 446, 234, 448, 233, 448, 232, 448, 225, 449, 208, 451, 204, 451, 199, 451, 193, 447, 189, 447, 173, 444, 172, 442, 166, 439, 165, 438, 162, 436, 154, 435, 151, 436, 121, 454, 107, 452, 96, 454, 76, 460, 74, 456, 40, 447, 37, 442, 34, 410, 28, 401, 25, 399, 26, 391, 61, 396, 77, 392, 80, 390, 81, 389, 82, 389, 87, 390, 89, 391, 93, 393, 109, 390, 116, 385, 122, 370, 131, 366, 136, 365, 138, 364, 154, 367, 164, 372, 172, 367, 176, 359, 188, 360, 189, 360, 193, 359, 197, 353, 170, 331, 170, 324, 171, 322, 171, 321, 174, 314, 200, 309, 205, 311, 221, 316, 222, 316, 224, 317, 231, 309, 264, 296, 270, 291, 290, 289, 323, 264, 348, 247, 371, 252, 380, 267, 382, 283, 383, 284, 385, 286, 387, 288, 409, 284, 412, 284, 418, 287, 426, 288, 428, 287, 431, 284, 435, 279, 440, 278, 443, 277, 445, 277, 447, 277, 456, 279, 460, 283, 495, 296, 494, 299, 493, 301, 491, 313, 494, 314, 502, 314, 546, 305, 549, 305, 551, 305, 566, 314, 572, 316, 574, 316, 609, 317, 566, 342, 541, 345, 538, 340, 539, 338, 532, 336, 514, 337, 509, 339, 504, 342, 468, 341, 464, 344, 461, 345, 450, 345, 464, 342, 505, 343, 526, 347, 530, 347, 543, 349, 557, 351, 569, 352, 571, 354, 570, 359, 609, 362, 612, 360, 613, 359, 613, 360, 640, 331, 649, 329, 664, 343, 664, 350, 664, 357, 664, 368, 664, 370, 664, 373, 664, 374, 671, 377, 674, 377, 681, 376, 694, 377, 716, 368, 717, 369, 723, 374, 733, 398, 746, 405, 746, 415, 745, 414, 739, 410, 758, 405, 768, 405, 767, 409, 751, 414, 693, 429, 691, 428, 687, 425, 648, 418, 642, 418, 612, 426, 609, 428, 608, 428, 587, 423, 582, 424, 575, 429, 574, 430, 557, 444, 550, 440, 546, 432, 544, 433, 537, 425, 531, 433, 509, 462, 512, 464, 517, 469, 523, 472, 529, 477, 533, 480, 540, 487, 541, 492, 535, 497, 528, 497, 526, 496, 516, 495, 512, 492, 498, 496, 459, 484, 442, 487, 439, 488, 435, 495, 435, 496, 435, 500, 435, 501, 433, 508, 411, 495, 409, 497, 407, 498, 390, 510, 382, 510, 377, 509, 354, 504, 361, 551, 363, 550, 370, 535, 371, 534, 374, 529, 375, 527, 392, 508, 395, 504, 398, 501, 409, 491, 415, 497, 416, 503, 406, 511, 401, 516, 397, 521, 386, 539, 382, 551, 388, 545, 400, 539, 428, 519, 470, 501, 477, 499, 481, 498, 494, 495, 471, 511, 462, 518, 455, 523, 449, 527, 448, 528, 446, 529, 445, 529, 442, 531, 434, 537, 414, 552, 411, 554, 401, 559, 394, 562, 391, 563, 381, 574, 394, 587, 405, 586, 407, 586, 409, 586, 413, 585, 421, 585, 433, 585, 442, 586, 445, 586, 448, 586, 459, 587, 460, 587, 461, 587, 462, 587, 465, 587, 490, 591, 499, 592, 539, 594, 541, 594};
int lWidth = 20;
 
void setup() {
  size(800, 1150);
  bRecordingPDF = true;
}
 
void keyPressed() {
  // When you press a key, it will initiate a PDF export
  bRecordingPDF = true;
}
 
 
void drawt(int[] Tree, int col, int row, float scale) {
  float x = col; 
  float y = row;
  float cx = col; 
  float cy = row;
  for (int i = 0; i<(Tree.length)/2; i++) {
    int xjitter = (int)random(-2, 1);
    int yjitter = (int)random(-1, 2);
    int drop = (int)random(35);
    float thicc = 1.5*noise(i*.003);
    strokeWeight(thicc);
    if(drop!=1){
      x = cx+Tree[2*i]*scale+xjitter;
      y = cy+Tree[2*i+1]*scale+yjitter;
    }
    curveVertex(x, y);
  }
}
 
void draw() {
  if (bRecordingPDF) {
    background(255); // this should come BEFORE beginRecord()
    beginRecord(PDF, "botanical_illustration_" + pdfOutputCount + ".pdf");
    noFill();
 
    //draws the paragraph at the bottom
    int x = 20; 
    int y = 720;
    boolean space = false;
    for (int j = 0; j<6; j++) {
      beginShape();
      for (int i = 0; i<24; i++) { int num = (int)random(50); if (i==0) num-=15; if (num>=35) {
          if (!space)
            endShape();
          space = true;
        } else {
          if (space)
            beginShape();
          space = false;
        }
 
        if (num<10)
          drawt(T1, x, y, .1);
        else if (num<12)
          drawt(T2, x, y, .1);
        else if (num<17)
          drawt(T3, x, y, .1);
        else if (num<23)
          drawt(T4, x, y, .1);
        else if (num<27)
          drawt(T5, x, y, .1);
        else if (num<29) 
          drawt(T6, x, y, .1);
        else if (num<31)
          drawt(T7, x, y, .1);
        else if (num<33)
          drawt(T8, x, y, .1);
        else if (num<34)
          drawt(T9, x, y, .1);
        else if (num<35)
          drawt(T10, x, y, .1);
        x+=30;
      }
      endShape();
      y+=60;
      x=20;
    }
 
    //draws top left 
    x = 30; 
    y = 50;
    space = false;
    beginShape();
    for (int i = 0; i<6; i++) { int num = (int)random(38); if (i==0) num-=15; if (num>=35) {
        if (!space)
          endShape();
        space = true;
      } else {
        if (space)
          beginShape();
        space = false;
      }
 
      if (num<10)
        drawt(T1, x, y, .1);
      else if (num<12)
        drawt(T2, x, y, .1);
      else if (num<17)
        drawt(T3, x, y, .1);
      else if (num<23)
        drawt(T4, x, y, .1);
      else if (num<27)
        drawt(T5, x, y, .1);
      else if (num<29) 
        drawt(T6, x, y, .1);
      else if (num<31)
        drawt(T7, x, y, .1);
      else if (num<33)
        drawt(T8, x, y, .1);
      else if (num<34)
        drawt(T9, x, y, .1);
      else if (num<35)
        drawt(T10, x, y, .1);
 
 
 
      x+=30;
    }
    endShape();
 
    //draws top right
    x = 520; 
    y = 50;
    space = false;
    beginShape();
    for (int i = 0; i<8; i++) { int num = (int)random(40); if (i==0) num-=15; if (num>=35) {
        if (!space)
          endShape();
        space = true;
      } else {
        if (space)
          beginShape();
        space = false;
      }
      if (num<10)
        drawt(T1, x, y, .1);
      else if (num<12)
        drawt(T2, x, y, .1);
      else if (num<17)
        drawt(T3, x, y, .1);
      else if (num<23)
        drawt(T4, x, y, .1);
      else if (num<27)
        drawt(T5, x, y, .1);
      else if (num<29) 
        drawt(T6, x, y, .1);
      else if (num<31)
        drawt(T7, x, y, .1);
      else if (num<33)
        drawt(T8, x, y, .1);
      else if (num<34)
        drawt(T9, x, y, .1);
      else if (num<35)
        drawt(T10, x, y, .1);
      x+=30;
    }
    endShape();
    endRecord();
 
    bRecordingPDF = false;
    pdfOutputCount++;
  }
}
// tree making code
int ptNumber = 0;
ArrayList TreePts = new ArrayList(); 
PImage img;
 
void setup() {
  size(800, 800);
  img = loadImage("C:\\Users\\yixin\\Documents\\Processing\\Asemic_Writing\\Tree_Making\\ref.jpg");
 
}
 
void mouseDragged(){
  if((int)(random(8))==1){
     TreePts.add(mouseX);
     print(mouseX+", ");
     ptNumber++;
     TreePts.add(mouseY);
     print(mouseY+", ");
     ptNumber++;
 }
}
 
void draw() {
    background(255); // this should come BEFORE beginRecord()
    pushMatrix();
    scale(4);
    translate(-120,-190);
      image(img, 0, 0);
    popMatrix();
    noFill();
    beginShape();
    for(int i = 0; i<ptNumber/2; i++){
      curveVertex(TreePts.get(2*i), TreePts.get(2*i+1));       
      //println(TreePts.get(2*i)+", "+ TreePts.get(2*i+1)+", ");
    }
    endShape();
}