├── LICENSE ├── README.md ├── TreeGenerator.png ├── tree_generatorV5.lua └── tree_generatorV5.tic /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TreeGenerator 2 | 3 | ![TreeGenerator](https://github.com/archaicvirus/TreeGenerator/assets/25288625/e8c023ad-99f2-480b-8809-5045c3036e8a) 4 | 5 | 6 | A procedural and customizable tree generator for the TIC80 fantasy computer. 7 | - Can be run in the web player [here](https://tic80.com/play?cart=3424) 8 | - Also available on itch https://archaicvirus.itch.io/procedural-tree-generator 9 | - See the [releases](https://github.com/archaicvirus/TreeGenerator/releases) page for native windows, mac, linux, and html versions. 10 | *html version has some bugs being worked on, avoid using for now 11 | 12 | 13 | ## Settings 14 | 15 | - [Trunk Width](#trunk-width) 16 | - [Trunk Height](#trunk-height) 17 | - [Step Height](#step-height) 18 | - [Shift/Step](#shiftstep) 19 | - [Sprite Id](#sprite-id) 20 | - [Branch Length](#branch-length) 21 | - [Branch Width](#branch-width) 22 | - [Branch Thickness](#branch-thickness) 23 | - [Branch Height](#branch-height) 24 | - [Branch Shift](#branch-shift) 25 | - [Total Branches](#total-branches) 26 | - [Branch Deviation](#branch-deviation) 27 | - [Leaf Density](#leaf-density) 28 | - [Leaf Cull Distance](#leaf-cull-distance) 29 | - [Leaf Fill Radius](#leaf-fill-radius) 30 | - [Leaf Fill Count](#leaf-fill-count) 31 | - [Vine Count](#vine-count) 32 | - [Fruit ID](#fruit-id) 33 | - [Fruit Density](#fruit-density) 34 | - [Save Width & Height](#save-width--height) 35 | - [Save X & Y](#save-x--y) 36 | - [Save ID](#save-id) 37 | - [Background Color](#background-color) 38 | 39 | ### Trunk Width 40 | 41 | The width in pixels of the main trunk 42 | 43 | ![trunk_width](https://github.com/archaicvirus/TreeGenerator/assets/25288625/8c16fa2c-d290-4ab7-be37-b94f9f736000) 44 | 45 | ### Trunk Height 46 | 47 | The total height of the combined trunk segments 48 | 49 | ![trunk_height](https://github.com/archaicvirus/TreeGenerator/assets/25288625/bd3e1e89-4b7b-4d4c-abbf-42ba5b31c5a4) 50 | 51 | ### Step Height 52 | 53 | The height in pixels of each vertical trunk segment (Does not affect overall height) 54 | 55 | ![step_height](https://github.com/archaicvirus/TreeGenerator/assets/25288625/ea9f9d65-8430-401d-945f-2f3a48e6c348) 56 | 57 | ### Shift/Step 58 | 59 | The random horizontal deviation in pixels, to shift each trunk segment as it 'grows' upwards 60 | 61 | ![shift-step](https://github.com/archaicvirus/TreeGenerator/assets/25288625/bf1af58b-2225-472a-b27c-335ace92fac8) 62 | 63 | ### Sprite Id 64 | 65 | Trunk & Branch texture. The sprite id used for the mesh fill algorithm 66 | 67 | ![sprite_id](https://github.com/archaicvirus/TreeGenerator/assets/25288625/a7943595-8e94-4459-b9ff-491ced8b7075) 68 | 69 | - Sprite id's 0-15 (the top row of tiles) can be selected to change the tree's texture. These can be customized in the sprite editor to your liking 70 | 71 | ![sprite_ids](https://github.com/archaicvirus/TreeGenerator/assets/25288625/fa5d4f02-e25e-447b-ab45-2a890a9c298a) 72 | 73 | ### Branch Length 74 | 75 | The average length in pixels of each branch 76 | 77 | ![branch_length](https://github.com/archaicvirus/TreeGenerator/assets/25288625/52e4371d-fd21-4a64-9c60-21b0bb75a278) 78 | 79 | ### Branch Width 80 | 81 | The width in pixels of each branch segment as the branch grows outwards 82 | 83 | ![branch_width](https://github.com/archaicvirus/TreeGenerator/assets/25288625/abe6cda4-3f12-49d3-8c97-4e1adae84104) 84 | 85 | ### Branch Thickness 86 | 87 | The height in pixels of each horizontal branch segment, as the segments 'grow' outwards 88 | 89 | ![branch_thickness](https://github.com/archaicvirus/TreeGenerator/assets/25288625/e9b2250a-818a-4db4-a711-355c55b21b35) 90 | 91 | ### Branch Height 92 | 93 | The height (in number of trunk segments), to snap branches to the nearest vertex of the main trunk 94 | 95 | ![branch_height](https://github.com/archaicvirus/TreeGenerator/assets/25288625/caf5a559-6fe9-4cce-859a-718582525d69) 96 | 97 | ### Branch Shift 98 | 99 | The random range in pixels that the branches are allowed to shift upwards at each growth step in the generation process, (lower values lead to straighter branches) 100 | 101 | ![branch_shift](https://github.com/archaicvirus/TreeGenerator/assets/25288625/86839abb-b687-4d3a-aed2-303b6f63f268) 102 | 103 | ### Total Branches 104 | 105 | The total amount of branches to spawn (distributed evenly between the left and right of the trunk) 106 | 107 | ![total_branches](https://github.com/archaicvirus/TreeGenerator/assets/25288625/8372995c-02ad-4164-b928-23780cf35ad2) 108 | 109 | ### Branch Deviation 110 | 111 | The relative offset between branches, scaled based on the number of branches and offset by the branch height parameter 112 | 113 | ![branch_deviation](https://github.com/archaicvirus/TreeGenerator/assets/25288625/4b94daf7-7875-4be7-a94a-ee7e027ff3c5) 114 | 115 | ### Leaf Density 116 | 117 | The average chance that leaves will spawn. Leaves are spawned starting from the tip of each branch, snapped to branch vertices, going towards the trunk 118 | 119 | ![leaf_density](https://github.com/archaicvirus/TreeGenerator/assets/25288625/d0288276-8e0b-4a47-8059-74563804e6b8) 120 | 121 | ### Leaf Cull Distance 122 | 123 | The distance (in number of branch segments) from the tip of each branch toward the tree's trunk, to limit leaf drawing 124 | 125 | ![leaf_cull_dist](https://github.com/archaicvirus/TreeGenerator/assets/25288625/ffda6a15-4aed-446d-bb08-cddd8f593ac2) 126 | 127 | ### Leaf Fill Radius 128 | 129 | The radius in pixels to randomly spread leaves (separate from leaf generation on branches). Always locked to the top of the tree trunk 130 | 131 | ![leaf_fill_radius](https://github.com/archaicvirus/TreeGenerator/assets/25288625/b5178bf9-d057-4da3-940a-cbbbca269935) 132 | 133 | ### Leaf Fill Count 134 | 135 | The total amount of tries to randomly distribute leaves within the fill radius 136 | 137 | ![leaf_fill_count](https://github.com/archaicvirus/TreeGenerator/assets/25288625/f2536a36-d94c-448f-9794-fc4ea0c34930) 138 | 139 | ### Vine Count 140 | 141 | The total amount of vines to spawn. Vines are spawned by picking vertices of two randomly selected branch segments and have a random 'sag' amount to vary the look 142 | 143 | ![vine_count](https://github.com/archaicvirus/TreeGenerator/assets/25288625/d88631c1-97ff-4262-84f6-377d92db9407) 144 | 145 | ### Fruit ID 146 | 147 | The sprite id to use for the layer of fruits/flowers. These are spawned using the same leaf-spawn method for the branches. In the sprite editor, sprite id's 32 - 47 are used for this layer - the third row. 148 | 149 | ![fruit_id](https://github.com/archaicvirus/TreeGenerator/assets/25288625/0d8e0b86-aef5-4ae8-a12f-f4650d3f33ba) 150 | 151 | ### Fruit Density 152 | 153 | Average chance to spawn fruits/flowers 154 | 155 | ![fruit_density](https://github.com/archaicvirus/TreeGenerator/assets/25288625/57802afe-d407-43b9-bb38-a937f2e1d5ae) 156 | 157 | ### Save Width & Height 158 | 159 | In pixels, the rectangular area of `SCREEN RAM` to copy to `SPRITE RAM` using `MEMCPY` 160 | 161 | ![save_width_height](https://github.com/archaicvirus/TreeGenerator/assets/25288625/d6f4be3a-57c9-423f-a579-07aa90b5a1f8) 162 | 163 | ### Save X & Y 164 | 165 | The top-left corner of the rectangular area to copy & save. 166 | 167 | ![save_x_y](https://github.com/archaicvirus/TreeGenerator/assets/25288625/253c63f0-c4bf-4166-926d-025f62fc10cf) 168 | 169 | ### Save ID 170 | 171 | Ranged 0 - 511 - The tile/sprite id to paste the copied rectangle. Keep in mind if the id is positioned near the border in the sprite editor, the copied tiles won't retain their original order 172 | 173 | ![save_id](https://github.com/archaicvirus/TreeGenerator/assets/25288625/0bd238ca-a901-494b-8fa8-16c0e5d50803) 174 | 175 | ### Background Color 176 | 177 | The current background color (for transparency reasons) - will be copied as the background when saving the tree 178 | 179 | ![background_color](https://github.com/archaicvirus/TreeGenerator/assets/25288625/452fd2a9-13a8-4245-9ccf-8f320cd7110d) 180 | -------------------------------------------------------------------------------- /TreeGenerator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/archaicvirus/TreeGenerator/a72c6fb38d9d691fad5c14d9fff7196a5b9a577f/TreeGenerator.png -------------------------------------------------------------------------------- /tree_generatorV5.lua: -------------------------------------------------------------------------------- 1 | -- title: Tree Generator 2 | -- author: ArchaicVirus 3 | -- desc: Procedural tree generator 4 | -- site: https://github.com/archaicvirus 5 | -- license: GPLV3 6 | -- version: 3 7 | -- script: lua 8 | 9 | 10 | UI_CORNER = 224 11 | UI_CURSOR = 271 12 | UI_BG = 8 13 | UI_FG = 9 14 | UI_TEXT_BG = 0 15 | UI_TEXT_FG = 4 16 | UI_SHADOW = 0 17 | UI_ARROW = 240 18 | UI_BUTTON = 241 19 | UI_BUTTON2 = 242 20 | ui = {} 21 | 22 | --tic80 wiki 23 | function pal(c0, c1) 24 | if not c0 and not c1 then 25 | for i = 0, 15 do 26 | poke4(0x3FF0 * 2 + i, i) 27 | end 28 | elseif type(c0) == 'table' then 29 | for i = 1, #c0, 2 do 30 | poke4(0x3FF0*2 + c0[i], c0[i + 1]) 31 | end 32 | else 33 | poke4(0x3FF0*2 + c0, c1) 34 | end 35 | end 36 | 37 | function ui.draw_panel(x, y, w, h, bg, fg, label, shadow) 38 | bg, fg = bg or UI_BG, fg or UI_FG 39 | local text_width = print(label, 0, -10, 0, false, 1, true) 40 | if text_width > w + 7 then w = text_width + 7 end 41 | rect(x + 2, y + 2, w - 4, h - 4, bg) -- background fill 42 | if label then 43 | pal(1, fg) 44 | pal(8, fg) 45 | spr(UI_CORNER, x, y, 0) 46 | spr(UI_CORNER, x + w - 8, y, 0, 1, 1) 47 | pal() 48 | pal(1, fg) 49 | pal(8, bg) 50 | spr(UI_CORNER, x + w - 8, y + h - 8, 0, 1, 3) 51 | spr(UI_CORNER, x, y + h - 8, 0, 1, 2) 52 | pal() 53 | rect(x, y + 6, w, 3, fg) -- header lower-fill 54 | rect(x + 2, y + h - 3, w - 4, 1, fg) -- bottom footer fill 55 | rect(x + 6, y + 2, w - 12, 4, fg)--header fill 56 | prints(label, x + w/2 - text_width/2, y + 2, 0, 4) -- header text 57 | else 58 | pal(1, fg) 59 | spr(UI_CORNER, x + w - 8, y + h - 8, {0, 8}, 1, 3) 60 | spr(UI_CORNER, x, y + h - 8, {0, 8}, 1, 2) 61 | spr(UI_CORNER, x, y, {0, 8}) 62 | spr(UI_CORNER, x + w - 8, y, {0, 8}, 1, 1) 63 | pal() 64 | end 65 | rect(x + 6, y, w - 12, 2, fg) -- top border 66 | rect(x, y + 6, 2, h - 12, fg) -- left border 67 | rect(x + w - 2, y + 6, 2, h - 12, fg) -- right border 68 | rect(x + 6, y + h - 2, w - 12, 2, fg) -- bottom border 69 | if shadow then 70 | line(x + 4, y + h, x + w - 3, y + h, shadow) -- shadow 71 | line(x + w - 2, y + h - 1, x + w, y + h - 3, shadow)-- shadow 72 | line(x + w, y + 4, x + w, y + h - 4, shadow)-- shadow 73 | end 74 | end 75 | 76 | function ui.draw_button(x, y, flip, id, color, shadow_color, hover_color) 77 | color, shadow_color, hover_color = color or 12, shadow_color or 0, hover_color or 11 78 | local _mouse, _box, ck, p = {x = cursor.x, y = cursor.y}, {x = x, y = y, w = 8, h = 8}, 1, {4, color, 2, shadow_color, 12, color} 79 | local hov = hovered(_mouse, _box) 80 | if hov and not cursor.l then 81 | p = {2, shadow_color, 12, hover_color, 4, hover_color} 82 | elseif hov and cursor.l then 83 | p = {2, hover_color, 12, hover_color, 4, hover_color} 84 | ck = {1, 4} 85 | end 86 | pal(p) 87 | spr(id, x, y, ck, 1, flip) 88 | pal() 89 | if hov and cursor.l and not cursor.ll then return true end 90 | return false 91 | end 92 | 93 | vec2 = {} 94 | vec2_mt = {} 95 | vec2_mt.__index = vec2_mt 96 | 97 | function vec2_mt:__add( v ) 98 | return vec2(self.x + v.x, self.y + v.y) 99 | end 100 | 101 | function vec2_mt:__sub( v ) 102 | return vec2(self.x - v.x, self.y - v.y) 103 | end 104 | 105 | function vec2_mt:__mul( v ) 106 | trace('v = ' .. tostring(v)) 107 | if type(v) == "table" 108 | then return vec2(self.x * v.x, self.y * v.y) 109 | else return vec2(self.x * v, self.y * v) end 110 | end 111 | 112 | function vec2_mt:__div( v ) 113 | if type(v) == "table" 114 | then return vec2(self.x / v.x, self.y / v.y) 115 | else return vec2(self.x / v, self.y / v) end 116 | end 117 | 118 | function vec2_mt:__unm() 119 | return vec2(-self.x, -self.y) 120 | end 121 | 122 | function vec2_mt:dot( v ) 123 | return self.x * v.x + self.y * v.y 124 | end 125 | 126 | function vec2_mt:length() 127 | return math.sqrt(self.x * self.x + self.y * self.y) 128 | end 129 | 130 | function vec2_mt:normalize() 131 | local length = self:length() 132 | if length == 0 then 133 | return vec2(0, 0) 134 | end 135 | return vec2(self.x / length, self.y / length) 136 | end 137 | 138 | function vec2_mt:rotate(angle) 139 | local cs = math.cos(angle) 140 | local sn = math.sin(angle) 141 | return vec2(self.x * cs - self.y * sn, self.x * sn + self.y * cs) 142 | end 143 | 144 | function vec2_mt:div() 145 | return self.x / self.y 146 | end 147 | 148 | function vec2_mt:min(v) 149 | if type(v) == "table" 150 | then return vec2(math.min(self.x, v.x), math.min(self.y, v.y)) 151 | else return math.min(self.x, self.y) end 152 | end 153 | 154 | function vec2_mt:max(v) 155 | if type(v) == "table" 156 | then return vec2(math.max(self.x, v.x), math.max(self.y, v.y)) 157 | else return math.max(self.x, self.y) end 158 | end 159 | 160 | function vec2_mt:abs() 161 | return vec2(math.abs(self.x), math.abs(self.y)) 162 | end 163 | 164 | function vec2_mt:mix(v, n) 165 | return self * n + v * math.max(0, 1 - n) 166 | end 167 | 168 | function vec2_mt:__tostring() 169 | return ("(%g | %g)"):format(self:tuple()) 170 | end 171 | 172 | function vec2_mt:tuple() 173 | return self.x, self.y 174 | end 175 | 176 | setmetatable(vec2, {__call = function(V, x, y ) 177 | return setmetatable({x = x or 0, y = y or x or 0}, vec2_mt) 178 | end}) 179 | 180 | tree = {} 181 | tick = 0 182 | floor = math.floor 183 | tx, ty = 120, 120 184 | 185 | cursor = { 186 | x = 8, 187 | y = 8, 188 | id = 352, 189 | lx = 8, 190 | ly = 8, 191 | sx = 0, 192 | sy = 0, 193 | lsx = 0, 194 | lsy = 0, 195 | l = false, 196 | ll = false, 197 | m = false, 198 | lm = false, 199 | r = false, 200 | lr = false, 201 | prog = false, 202 | hold_time = 0, 203 | drag = false, 204 | } 205 | 206 | tree_settings = { 207 | --left page 208 | {name = 'Trunk Width', val = 5, min = 1, max = 24, step = 1, update = function() update_trunk_width() end}, 209 | {name = 'Trunk Height', val = 38, min = 16, max = 80, step = 1, update = function() update_trunk_height() end}, 210 | {name = 'Step Height', val = 8, min = 1, max = 8, step = 1}, 211 | {name = 'Shift/Step', val = 1, min = 0, max = 8, step = 1}, 212 | {name = 'Sprite ID', val = 0, min = 0, max = 15, step = 1, update = function(self) tree.id = self.val end}, 213 | {name = 'Branch Length', val = 12, min = 8, max = 32, step = 1}, 214 | {name = 'Branch Width', val = 3, min = 2, max = 8, step = 1}, 215 | {name = 'Br. Thickness', val = 2, min = 1, max = 8, step = 1}, 216 | {name = 'Branch Height', val = 4, min = 1, max = 16, step = 1}, 217 | {name = 'Branch Shift', val = 8, min = 1, max = 8, step = 1}, 218 | {name = 'Total Branches', val = 5, min = 0, max = 16, step = 1}, 219 | {name = 'Branch Deviation', val = 16, min = 1, max = 16, step = 1}, 220 | {name = 'Leaf Density', val = 1.0, min = 0, max = 1.0, step = 0.05}, 221 | {name = 'Leaf Cull Dist', val = 2, min = 0, max = 10, step = 1}, 222 | {name = 'Leaf Fill Radius', val = 12, min = 4, max = 24, step = 1}, 223 | {name = 'Leaf Fill Count', val = 65, min = 0, max = 150, step = 5}, 224 | {name = 'Vine count', val = 2, min = 0, max = 10, step = 1}, 225 | 226 | --right page 227 | {name = 'Fruit ID', val = 33, min = 32, max = 47, step = 1}, 228 | {name = 'Fruit Density', val = 0.15, min = 0, max = 1.0, step = 0.05}, 229 | {name = 'Save Width', val = 40, min = 1, max = 128, step = 1}, 230 | {name = 'Save Height', val = 60, min = 1, max = 128, step = 1}, 231 | {name = 'Save X', val = 102, min = 0, max = 239, step = 1}, 232 | {name = 'Save Y', val = 60, min = 0, max = 125, step = 1}, 233 | {name = 'Save ID', val = 256, min = 0, max = 511, step = 1}, 234 | {name = 'BG Color', val = 8, min = 0, max = 15, step = 1}, 235 | } 236 | 237 | function copyScreenToSprite(startX, startY, width, height, spriteStart) 238 | local spriteWidth = 8 239 | local spriteHeight = 8 240 | local spriteLineBytes = spriteWidth / 2 -- Number of bytes in a sprite line 241 | local screenLineBytes = 240 / 2 -- Number of bytes in a screen line 242 | local spritesPerRow = 16 -- Number of sprites per row in sprite RAM 243 | 244 | -- Calculate the number of full and partial sprites to copy 245 | local numSpritesX = math.ceil(width / spriteWidth) 246 | local numSpritesY = math.ceil(height / spriteHeight) 247 | local partialSpriteWidth = width % spriteWidth 248 | local partialSpriteHeight = height % spriteHeight 249 | 250 | for spriteY = 0, numSpritesY - 1 do 251 | for spriteX = 0, numSpritesX - 1 do 252 | local numLines = spriteHeight 253 | if spriteY == numSpritesY - 1 and partialSpriteHeight > 0 then 254 | numLines = partialSpriteHeight 255 | end 256 | for spriteLine = 0, numLines - 1 do 257 | -- Calculate the number of bytes to copy for this line 258 | local copyBytes = spriteLineBytes 259 | if spriteX == numSpritesX - 1 and partialSpriteWidth > 0 then 260 | copyBytes = math.ceil(partialSpriteWidth / 2) 261 | end 262 | 263 | -- Calculate addresses in screen and sprite RAM 264 | local screenAddr = 0x0000 + ((startY + spriteY * spriteHeight + spriteLine) * screenLineBytes) + math.floor((startX + spriteX * spriteWidth) / 2) 265 | local spriteIndex = spriteStart + spriteY * spritesPerRow + spriteX 266 | local spriteAddr = 0x4000 + (spriteIndex * 32) + spriteLine * spriteLineBytes 267 | 268 | -- Copy the line of the sprite 269 | memcpy(spriteAddr, screenAddr, copyBytes) 270 | end 271 | end 272 | end 273 | end 274 | 275 | function save_tree() 276 | local t = tree_settings 277 | local save_width, save_height, save_x, save_y, save_id = t[20].val, t[21].val, t[22].val, t[23].val, t[24].val 278 | local x, y, w, h = save_x, save_y, save_width, save_height 279 | --startX, startY, width, height, spriteStart 280 | copyScreenToSprite(x, y, w, h, save_id) 281 | --trace('x: ' .. x .. ' y: ' .. y .. ' w: ' .. w .. ' h: ' .. h) 282 | sync(0,0,true) 283 | end 284 | 285 | function clamp(val, min, max) 286 | return math.max(min, math.min(val, max)) 287 | end 288 | 289 | function draw_cable(p1, p2, color, sag) 290 | -- calculate the length and midpoint of the cable 291 | local dx = p2.x - p1.x 292 | local dy = p2.y - p1.y 293 | local length = math.sqrt(dx * dx + dy * dy) 294 | local midpoint = { x = (p1.x + p2.x) / 2, y = (p1.y + p2.y) / 2 } 295 | 296 | -- calculate the height of the sag 297 | local sag_height = math.max(length / 8, sag) 298 | 299 | -- draw the cable 300 | for x = 0, length do 301 | local y = math.sin(x / length * math.pi) * sag_height 302 | local px = p1.x + dx * x / length + 0.5 303 | local py = p1.y + dy * x / length + y + 0.5 304 | if x > 0 then 305 | local px_prev = p1.x + dx * (x - 1) / length + 0.5 306 | local py_prev = p1.y + dy * (x - 1) / length + math.sin((x - 1) / length * math.pi) * sag_height + 0.5 307 | line(px_prev, py_prev, px, py, color) 308 | else 309 | pix(px, py, color) 310 | end 311 | end 312 | end 313 | 314 | function remap(n, a, b, c, d) 315 | return c + (n - a) * (d - c) / (b - a) 316 | end 317 | 318 | function prints(txt, x, y, bg, fg, shadow_offset) 319 | bg, fg = bg or 0, fg or 4 320 | shadow_offset = shadow_offset or {x = 1, y = 0} 321 | print(txt, x + shadow_offset.x, y + shadow_offset.y, bg, false, 1, true) 322 | print(txt, x, y, fg, false, 1, true) 323 | end 324 | 325 | function text_width(txt) 326 | return print(txt, 0, -10, 0, false, 1, true) 327 | end 328 | 329 | function hovered(_mouse, _box) 330 | local mx, my, bx, by, bw, bh = _mouse.x, _mouse.y, _box.x, _box.y, _box.w, _box.h 331 | return mx >= bx and mx < bx + bw and my >= by and my < by + bh 332 | end 333 | 334 | function update_cursor_state() 335 | local x, y, l, m, r, sx, sy = mouse() 336 | --update hold state for left and right click 337 | if l and cursor.l and not cursor.held_left and not cursor.r then 338 | cursor.held_left = true 339 | end 340 | 341 | if r and cursor.r and not cursor.held_right and not cursor.l then 342 | cursor.held_right = true 343 | end 344 | 345 | if cursor.held_left or cursor.held_right then 346 | cursor.hold_time = cursor.hold_time + 1 347 | end 348 | 349 | if not l and cursor.held_left then 350 | cursor.held_left = false 351 | cursor.hold_time = 0 352 | end 353 | 354 | if not r and cursor.held_right then 355 | cursor.held_right = false 356 | cursor.hold_time = 0 357 | end 358 | 359 | cursor.lx, cursor.ly, cursor.ll, cursor.lm, cursor.lr, cursor.lsx, cursor.lsy = cursor.x, cursor.y, cursor.l, cursor.m, cursor.r, cursor.sx, cursor.sy 360 | cursor.x, cursor.y, cursor.l, cursor.m, cursor.r, cursor.sx, cursor.sy = x, y, l, m, r, sx, sy 361 | end 362 | 363 | function draw_ui() 364 | local col = tree_settings[25].val 365 | ui.draw_panel(0, 0, 240, 136, col, 9, false) 366 | prints('Tree Generator', 120 - text_width('Tree Generator')/2, 3) 367 | --left set of ui buttons 368 | for i = 1, 17 do 369 | local v = tree_settings[i] 370 | local x, y = 4, 15 + (i-1) * 7 371 | prints(v.name, x, y) 372 | --x, y, flip, id, color, shadow_color, hover_color 373 | if ui.draw_button(62, y - 1, 1, UI_ARROW, 9, 0, 10) then 374 | v.val = clamp(v.val - v.step, v.min, v.max) 375 | if v.update then v:update() end 376 | --generate_tree() 377 | end 378 | if ui.draw_button(81, y - 1, 0, UI_ARROW, 9, 0, 10) then 379 | v.val = clamp(v.val + v.step, v.min, v.max) 380 | if v.update then v:update() end 381 | --generate_tree() 382 | end 383 | prints(v.val, 76 - floor(text_width(v.val)/2), y) 384 | end 385 | --right set of ui buttons 386 | for i = 18, #tree_settings do 387 | local v = tree_settings[i] 388 | local x, y = 165, 15 + (i-18) * 7 389 | prints(v.name, x, y) 390 | --x, y, flip, id, color, shadow_color, hover_color 391 | if ui.draw_button(x + 50, y - 1, 1, UI_ARROW, 9, 0, 10) then 392 | v.val = clamp(v.val - v.step, v.min, v.max) 393 | if v.update then v:update() end 394 | --generate_tree() 395 | end 396 | if ui.draw_button(x + 65, y - 1, 0, UI_ARROW, 9, 0, 10) then 397 | v.val = clamp(v.val + v.step, v.min, v.max) 398 | if v.update then v:update() end 399 | --generate_tree() 400 | end 401 | prints(v.val, x + 62 - floor(text_width(v.val)/2), y) 402 | end 403 | 404 | 405 | --Re-genrate tree button 406 | if ui.draw_button(3, 3, 0, UI_BUTTON, 12, 0, 11) then 407 | local width, height, step, rotation, id = table.unpack(tree_settings) 408 | tree = generate_tree(tx, ty, width.val, height.val, step.val, rotation.val, id.val) 409 | end 410 | 411 | end 412 | 413 | function generate_tree() 414 | --generate the main trunk 415 | tree = {} 416 | local t = tree_settings 417 | local tw, th, sh, ss, sid = t[1], t[2], t[3], t[4], t[5] 418 | local bl, bw, bt, bh, bs, nb, bd, lc, vn = t[6], t[7], t[8], t[9], t[10], t[11], t[12], t[14], t[17] 419 | local rad, count = t[15], t[16].val 420 | tree.id = sid.val 421 | local x, y = tx, ty 422 | tree.trunk = {{x1 = x, y1 = y, x2 = x + tw.val, y2 = y}} 423 | local i, last_height = 2, y 424 | while last_height > y - th.val do 425 | last_height = clamp(last_height - sh.val, y - th.val, y) 426 | local x1, x2 = tree.trunk[i-1].x1, tree.trunk[i-1].x2 427 | local shift = floor(math.random(-ss.val, ss.val)) 428 | tree.trunk[i] = {x1 = x1 + shift, y1 = last_height, x2 = x2 + shift, y2 = last_height} 429 | i = i + 1 430 | end 431 | 432 | --generate the branches 433 | tree.branches = {} 434 | for i = 1, nb.val do 435 | tree.branches[i] = {} 436 | tree.branches[i].wood = generate_branch(i) 437 | tree.branches[i].leaves = generate_leaves(tree.branches[i].wood) 438 | tree.branches[i].fruit = generate_fruit(tree.branches[i].wood) 439 | end 440 | 441 | --generate top leaves fill 442 | tree.fleaves = {[1] = {}, [2] = {}} 443 | local sx, sy = tree.trunk[#tree.trunk].x1 + t[1].val/2 - 4, ty - t[2].val - rad.val 444 | for i = 1, count do 445 | --local x, y = floor(sx + math.sin(math.random(-10, 10)*100)), floor(sy + math.cos(math.random(-10, 10)*100)) 446 | --circb(x, y, 6, 2) 447 | if math.random() < 0.5 then 448 | local side = math.random() > 0.5 449 | local angle = math.random() * 2 * math.pi -- Random angle in radians 450 | local distance = math.sqrt(math.random()) * rad.val -- Random distance within the radius 451 | local x = sx + distance * math.cos(angle) 452 | local y = sy + distance * math.sin(angle) 453 | table.insert(side and tree.fleaves[1] or tree.fleaves[2], {x = x, y = y, id = floor(math.random(2))}) 454 | end 455 | end 456 | --generate hanging vines 457 | tree.vines = {} 458 | for i = 1, vn.val do 459 | table.insert(tree.vines, generate_vine()) 460 | end 461 | return tree 462 | end 463 | 464 | function generate_leaves(branch) 465 | local leaves = {[1] = {}, [2] = {}} 466 | local leaf_density = tree_settings[13].val 467 | for i = #branch, 1, -1 do 468 | local step = 1 469 | if branch[i].x1 and math.random() < leaf_density then 470 | local xv = branch[i].x1 - 4 471 | local yv = branch[i].y1 - 4 472 | --local x = clamp(xv, tx + tw.val/2 - 16, tx + tw.val/2 + 16) 473 | --local y = clamp(yv, ty - th.val, ty) 474 | local side = math.random() > 0.5 475 | table.insert(side and leaves[1] or leaves[2], {x = xv, y = yv, id = floor(math.random(2))}) 476 | end 477 | if branch[i].x1 and math.random() < leaf_density then 478 | local xv = branch[i].x2 - 4 479 | local yv = branch[i].y2 - 4 480 | local side = math.random() > 0.5 481 | table.insert(side and leaves[1] or leaves[2], {x = xv, y = yv, id = floor(math.random(2))}) 482 | end 483 | step = step + 1 484 | end 485 | return leaves 486 | end 487 | 488 | function generate_fruit(branch) 489 | local t = tree_settings 490 | local fruit_id, fruit_count = t[18].val, t[19].val 491 | local fruit = {[1] = {}, [2] = {}} 492 | for i = #branch, 1, -1 do 493 | local step = 1 494 | if branch[i].x1 and math.random() < fruit_count then 495 | local xv = branch[i].x1 - 4 496 | local yv = branch[i].y1 - 4 497 | --local x = clamp(xv, tx + tw.val/2 - 16, tx + tw.val/2 + 16) 498 | --local y = clamp(yv, ty - th.val, ty) 499 | local side = math.random() > 0.5 500 | table.insert(side and fruit[1] or fruit[2], {x = xv, y = yv, id = floor(math.random(2))}) 501 | end 502 | if branch[i].x1 and math.random() < fruit_count then 503 | local xv = branch[i].x2 - 4 504 | local yv = branch[i].y2 - 4 505 | local side = math.random() > 0.5 506 | table.insert(side and fruit[1] or fruit[2], {x = xv, y = yv, id = floor(math.random(2))}) 507 | end 508 | step = step + 1 509 | end 510 | return fruit 511 | end 512 | 513 | function generate_branch(n) 514 | local t = tree_settings 515 | local tw, th, sh, ss, id = t[1], t[2], t[3], t[4], t[5] 516 | local bl, bw, bt, bh, bs, nb, bd, lc = t[6], t[7], t[8], t[9], t[10], t[11], t[12], t[14] 517 | local voff = clamp(n*(floor(math.random(-bd.val,bd.val))), -2, 12) 518 | local dir = n%2 == 0 519 | --find vertical trunk segment to attach branch 520 | local max_height = ty - th.val 521 | local index = math.ceil(remap(bh.val, 1, 16, 1, #tree.trunk - 1)) 522 | local x1 = dir and tree.trunk[index + 1].x2 or tree.trunk[index + 1].x1 523 | local y1 = clamp(tree.trunk[index+1].y1 - voff, max_height, ty) 524 | local x2 = dir and tree.trunk[index].x2 or tree.trunk[index].x1 525 | local y2 = clamp(y1 + bt.val, max_height, ty) 526 | local x, y = tx, ty 527 | local branch = {{x1 = x1, y1 = y1, x2 = x2, y2 = y2}} 528 | local i, last_x = 2, not dir and x or x + tw.val 529 | if dir then 530 | while last_x < x + bl.val + tw.val do 531 | last_x = clamp(last_x + bw.val, x, x + bl.val + tw.val) 532 | local shift = floor(math.random(bs.val)) 533 | local x1, x2, y1, y2 = last_x, last_x, branch[i-1].y1 - shift, branch[i-1].y2 - shift 534 | --x1 = floor(clamp(x1, tx + tw.val/2 - 20, tx + tw.val/2 + 20)) 535 | --y1 = floor(clamp(y1, ty - th.val, ty)) 536 | --x2 = floor(clamp(x2, tx + tw.val/2 - 20, tx + tw.val/2 + 20)) 537 | --y2 = floor(clamp(y2, ty - th.val, ty)) 538 | branch[i] = {x1 = x1, y1 = y1, x2 = x2, y2 = y2} 539 | i = i + 1 540 | end 541 | else 542 | while last_x > x - bl.val do 543 | last_x = clamp(last_x - bw.val, x - bl.val, x) 544 | local shift = floor(math.random(bs.val)) 545 | local x1, x2, y1, y2 = last_x, last_x, branch[i-1].y1 - shift, branch[i-1].y2 - shift 546 | --x1 = floor(clamp(x1, tx + tw.val/2 - 20, tx + tw.val/2 + 20)) 547 | --y1 = floor(clamp(y1, ty - th.val, ty)) 548 | --x2 = floor(clamp(x2, tx + tw.val/2 - 20, tx + tw.val/2 + 20)) 549 | --y2 = floor(clamp(y2, ty - th.val, ty)) 550 | branch[i] = {x1 = x1, y1 = y1, x2 = x2, y2 = y2} 551 | i = i + 1 552 | end 553 | end 554 | return branch 555 | end 556 | 557 | function generate_vine() 558 | local vine = {} 559 | local branch1, branch2 = math.ceil(math.random(#tree.branches)), math.ceil(math.random(#tree.branches)) 560 | local p1, p2 = tree.branches[branch1].wood[math.ceil(math.random(#tree.branches[branch1].wood))], tree.branches[branch2].wood[math.ceil(math.random(#tree.branches[branch2].wood))] 561 | return {x1 = p1.x1, y1 = p1.y1, x2 = p2.x2, y2 = p2.y2, color = 7 - floor(math.random(2)), sag = floor(math.random(10, 20))} 562 | end 563 | 564 | function update_trunk_width() 565 | local trunk_width = tree_settings[1].val 566 | for i = 1, #tree.trunk do 567 | local old_width = tree.trunk[i].x2 - tree.trunk[i].x1 568 | tree.trunk[i].x1 = tree.trunk[i].x1 + floor(old_width/2) - floor(trunk_width/2) 569 | tree.trunk[i].x2 = tree.trunk[i].x1 + trunk_width 570 | end 571 | end 572 | 573 | function update_trunk_height(old_height) 574 | local last_index = #tree.trunk 575 | local old_height = ty - tree.trunk[last_index].y1 576 | local new_height = tree_settings[2].val 577 | local step = tree_settings[3].val 578 | local ss = tree_settings[4].val 579 | local segment_height = tree.trunk[last_index - 1].y1 - tree.trunk[last_index].y1 580 | --if we're taller now 581 | if old_height < new_height then 582 | if segment_height < step then 583 | --raise current line 584 | tree.trunk[last_index].y1 = tree.trunk[last_index].y1 - 1 585 | tree.trunk[last_index].y2 = tree.trunk[last_index].y2 - 1 586 | else 587 | --add additional segment 588 | local shift = floor(math.random(-ss, ss)) 589 | table.insert(tree.trunk, {x1 = tree.trunk[last_index].x1 + shift, y1 = tree.trunk[last_index].y1 - 1, x2 = tree.trunk[last_index].x2 + shift, y2 = tree.trunk[last_index].y2 - 1}) 590 | end 591 | else 592 | --we're shorter now 593 | if segment_height > 1 then 594 | --reduce top segment 595 | tree.trunk[last_index].y1 = tree.trunk[last_index].y1 + 1 596 | tree.trunk[last_index].y2 = tree.trunk[last_index].y2 + 1 597 | else 598 | --or delete segment if h == 0 599 | table.remove(tree.trunk, last_index) 600 | end 601 | end 602 | end 603 | 604 | function mesh_fill(lines, id) 605 | id = id or 0 606 | local u = 8 * (id % 16) 607 | local v = 8 * floor(id / 16) 608 | for i = 1, #lines - 1 do 609 | --line(floor(tree.trunk[i].x1), floor(tree.trunk[i].y1), floor(tree.trunk[i+1].x1), floor(tree.trunk[i+1].y1), i%2 == 0 and 2 or 9) 610 | --line(floor(tree.trunk[i].x2), floor(tree.trunk[i].y2), floor(tree.trunk[i+1].x2), floor(tree.trunk[i+1].y2), i%2 == 0 and 2 or 9) 611 | -- Draw bottom triangle 612 | ttri( 613 | lines[i+0].x1, lines[i+0].y1, 614 | lines[i+0].x2, lines[i+0].y2, 615 | lines[i+1].x1, lines[i+1].y1, 616 | u, v+8, u+8, v+8, u, v, 0, 1 617 | ) 618 | 619 | -- Draw top triangle 620 | ttri( 621 | lines[i+0].x2, lines[i+0].y2, 622 | lines[i+1].x1, lines[i+1].y1, 623 | lines[i+1].x2, lines[i+1].y2, 624 | u+8, v+8, u, v, u+8, v, 0, 1 625 | ) 626 | end 627 | end 628 | 629 | function draw_tree() 630 | local t = tree_settings 631 | local tw, th, sh, ss, sid = t[1].val, t[2].val, t[3].val, t[4].val, t[5].val 632 | local bl, bw, bt, bh, bs, nb, bd, ld, leaf_cull_distance = t[6].val, t[7].val, t[8].val, t[9].val, t[10].val, t[11].val, t[12].val, t[13], t[14].val 633 | local fruit_id = t[18].val 634 | --draw background leaves first 635 | for k, v in ipairs(tree.branches) do 636 | --leaves 637 | for i, j in ipairs(v.leaves[1]) do 638 | if i <= leaf_cull_distance then 639 | spr(16 + j.id, j.x, j.y, 1, 1) 640 | end 641 | end 642 | --fruits 643 | for i, j in ipairs(v.fruit[1]) do 644 | --if i <= leaf_cull_distance then 645 | spr(fruit_id, j.x, j.y, 1, 1) 646 | --end 647 | end 648 | end 649 | 650 | for k, v in ipairs(tree.fleaves[1]) do 651 | spr(16 + v.id, v.x, v.y, 1, 1) 652 | end 653 | 654 | --draw main trunk 655 | mesh_fill(tree.trunk, tree.id) 656 | 657 | --draw all branches 658 | for i = 1, #tree.branches do 659 | mesh_fill(tree.branches[i].wood, tree.id) 660 | end 661 | 662 | for k, v in ipairs(tree.vines) do 663 | draw_cable({x = v.x1, y = v.y1}, {x = v.x2, y = v.y2}, v.color, v.sag) 664 | end 665 | --draw foreground leaves last 666 | for k, v in ipairs(tree.branches) do 667 | for i, j in ipairs(v.leaves[2]) do 668 | if i <= leaf_cull_distance then 669 | spr(16 + j.id, j.x, j.y, 1, 1) 670 | end 671 | end 672 | --fruits 673 | for i, j in ipairs(v.fruit[2]) do 674 | --if i <= leaf_cull_distance then 675 | spr(fruit_id, j.x, j.y, 1, 1) 676 | --end 677 | end 678 | for i, j in ipairs(v.fruit[1]) do 679 | --if i <= leaf_cull_distance then 680 | spr(fruit_id, j.x, j.y, 1, 1) 681 | --end 682 | end 683 | end 684 | 685 | for k, v in ipairs(tree.fleaves[2]) do 686 | spr(16 + v.id, v.x, v.y, 1, 1) 687 | end 688 | 689 | end 690 | 691 | tree = generate_tree() 692 | 693 | function TIC() 694 | cls(8) 695 | --cursor 696 | poke(0x3FFB, UI_CURSOR) 697 | --border 698 | poke(0x03FF8, 8) 699 | update_cursor_state() 700 | draw_ui() 701 | draw_tree() 702 | if keyp(20) then 703 | save_tree() 704 | end 705 | --save button 706 | prints('Save ->', 198, 4) 707 | if ui.draw_button(225, 3, 0, UI_BUTTON2, 12, 0, 11) then 708 | trace('saving tree') 709 | save_tree() 710 | end 711 | local t = tree_settings 712 | local save_width, save_height, save_x, save_y, save_id = t[20].val, t[21].val, t[22].val, t[23].val, t[24].val 713 | local x, y, w, h = save_x, save_y, save_width, save_height 714 | rectb(x-1, y-1, w+2, h+2, 2) 715 | tick = tick + 1 716 | end 717 | 718 | -- 719 | -- 000:bbbbcb0000bcb00c00bbc000b00cbc0000bbcbbc0bbcb0cbbbbbc00cbbcb000b 720 | -- 001:0bbbb0b0bbb0bbbbbbbbb0bb0b0bbbbb0bbbbbb0bbb0b0bbbb0bb0bb0bbb0bb0 721 | -- 002:3333323233333233333333233333333233333232333332333333322333333322 722 | -- 003:1122331111322311112223111122331111322311112223111122331111322311 723 | -- 004:1333323113323221133233211333323113333321133233211333322113323231 724 | -- 005:11bcbb1111bbdc1111bcbd1111bbcb1111bcbc1111bbcb1111bccb1111bcdc11 725 | -- 006:eeeeeffeeefeefefeeeeeeefeeeeeeffeeeeeeeeeeeeeffeeeeeeeefefeeefef 726 | -- 007:4344e44e4344e4e43444e4ee3444e4e443344eee3444444e3444e4e43344e4ee 727 | -- 008:1111111111111111111111111111111111111111111111111111111111111111 728 | -- 009:1111111111111111111111111111111111111111111111111111111111111111 729 | -- 010:1111111111111111111111111111111111111111111111111111111111111111 730 | -- 011:1111111111111111111111111111111111111111111111111111111111111111 731 | -- 012:1111111111111111111111111111111111111111111111111111111111111111 732 | -- 013:1111111111111111111111111111111111111111111111111111111111111111 733 | -- 014:1111111111111111111111111111111111111111111111111111111111111111 734 | -- 015:1111111111111111111111111111111111111111111111111111111111111111 735 | -- 016:1111111111656561165656565567676516767676177777771177777111111111 736 | -- 017:1111111111656561165656565567676516767676177777771177777111111111 737 | -- 018:1111111111577671156567675656567615757555156567671156557111111111 738 | -- 019:1111111112443411232343414242424132343432232323211222221111111111 739 | -- 020:1111111111422321143432324343432314242444143432321143442111111111 740 | -- 021:1111111112443411232343414242424132323232222222211222221111111111 741 | -- 032:1b111111bdb111111b1111111111111111111111111111111111111111111111 742 | -- 033:111157b111177b3b117171b1171b751111b3b171111b11611151111711171111 743 | -- 034:7761111771771176611b117111b6b671117b11711b611b71b7b1b7b11b711b11 744 | -- 035:117111111117111111132111112222111122b211111221111111111111111111 745 | -- 036:1167711111111711111176111167111111173111113333111133431111133111 746 | -- 037:1111111111111111111111111111111111111111111111111111111111111111 747 | -- 048:1111111111656561165656565567676516767676177777771177777111111111 748 | -- 049:1111111111577671156567675656567615757555156567671156557111111111 749 | -- 050:1111111116565611656565615676765567676761777777711777771111111111 750 | -- 051:1111111111111111111111111111111111111111111111111111111111111111 751 | -- 052:1111111111111111111111111111111111111111111111111111111111111111 752 | -- 053:1111111111111111111111111111111111111111111111111111111111111111 753 | -- 064:1b111111bdb111111b1111111111111111111111111111111111111111111111 754 | -- 065:111157b111177b3b117171b1171b751111b3b171111b11611151111711171111 755 | -- 066:1111111111111111111111111111111111111111111111111111111111111111 756 | -- 067:1111111111111111111111111111111111111111111111111111111111111111 757 | -- 068:1111111111111111111111111111111111111111111111111111111111111111 758 | -- 069:1111111111111111111111111111111111111111111111111111111111111111 759 | -- 224:0011110001111100111888001188880011888800118888000000000000000000 760 | -- 240:1111111111141111111c4111111cc411111cc211111c21111112111111111111 761 | -- 241:1111111111111111114441111400c4111c0c0c111cc00c1112ccc21111222111 762 | -- 242:144444414cc0ccc4ccc00cccccc000ccccc00cccccc0cccc2cccccc212222221 763 | -- 764 | 765 | -- 766 | -- 000:8888888888888888888888888888888888888888888888888888888888888888 767 | -- 001:8888888888888888888888888888888588888888888888888888888888888888 768 | -- 002:8885656786565656656575755675656767675655777777788777778888888885 769 | -- 003:6788888876888888558888886788888878888888857767885656767865656768 770 | -- 004:8888888888888888888888888888888888888888888888888888888888888888 771 | -- 015:b0000000bb000000bbc00000bde0000000000000000000000000000000000000 772 | -- 016:8888888888885776888565678856577688856567885656568885757588856567 773 | -- 017:8888888878888888678888887688888867888865768886565557556765656676 774 | -- 018:8885776788565656866565656556767665675776565665656765565676767575 775 | -- 019:5757555856567678656557565765657757767656656767655656765775755556 776 | -- 020:8888888888888888857767886756767876756768676755585556767876755778 777 | -- 032:8888565588888888888888878888887888885776888565678856565688857575 778 | -- 033:565657777575757705656765b75655567bc78565678658577688785655888585 779 | -- 034:7777656577765656776767655676767665676777575557775676777765577777 780 | -- 035:6567676556557567565776776565676756565676657575557565676777565577 781 | -- 036:5776676877775558767676785667578865668888765588886767888877788888 782 | -- 048:8885656788885655888888888888888088888885888888568888856588885757 783 | -- 049:67888058788888b5888888088888888b77678880567678886567688857555887 784 | -- 050:888880cb888800bc55880bc08855bcb08857b555077b3bb07878bbc08b750cbb 785 | -- 051:00880777b8bb0558c0055888b55c888858b88888b8088888cc888888bc888888 786 | -- 052:7768888886888888868888888688888886888888868888888688888886888888 787 | -- 064:8885655688565655888575758885656788885655888888888888888888888888 788 | -- 065:5676788865578888558888886757767875656767565656768575755585656767 789 | -- 066:b3b07bcb8b806c0c588bb700878bcb06888bbcb08880bb0c8880bc008880cb00 790 | -- 067:c888888888888888888888888888888868888888688888866888888668888886 791 | -- 068:6888888868888888688888886888888868888888888888888888888888888888 792 | -- 080:8888888888888888888888888888888888888888888888888888888888888888 793 | -- 081:885655788888bcb8888880cb888888cc8888888c888888878888888888888887 794 | -- 082:8800bcb8880bc0c88857b008b77b3bb87877bb080b753bc8b3bb70088b756c08 795 | -- 083:8688888686888868868888688868886888688688888666888888888888888888 796 | -- 084:8888888888888888888888888888888888888888888888888888888888888888 797 | -- 096:8888888888888888888888888888888888888888888888888888888888888888 798 | -- 097:8888888888888888888888888888888888888888888888888888888888888888 799 | -- 098:53bb77c8870b60b858bbb7c887bcb0b888bbbb08880bc0c8880bb00888b0cc08 800 | -- 099:8888888888888888888888888888888888888888888888888888888888888888 801 | -- 100:8888888888888888888888888888888888888888888888888888888888888888 802 | -- 112:8888888888888888888888888888888800000000000000000000000000000000 803 | -- 113:8888888888888888888888888888888800000000000000000000000000000000 804 | -- 114:880bbbc8880bc0b888bbb0c888bcb0b800000000000000000000000000000000 805 | -- 115:8888888888888888888888888888888800000000000000000000000000000000 806 | -- 116:8888888888888888888888888888888800000000000000000000000000000000 807 | -- 808 | 809 | -- 810 | -- 000:00000000ffffffff00000000ffffffff 811 | -- 001:0123456789abcdeffedcba9876543210 812 | -- 002:0123456789abcdef0123456789abcdef 813 | -- 814 | 815 | -- 816 | -- 000:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000304000000000 817 | -- 818 | 819 | -- 820 | -- 000:100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 821 | -- 822 | 823 | -- 824 | -- 000:889999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999988 825 | -- 001:899999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998 826 | -- 002:999888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888999 827 | -- 003:998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888444088888888888888844088888888888888888888840888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 828 | -- 004:9988888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888408404084408440884088844044088440404044084440840840408888888888888888888888888888888888888888888888888888440888888888888888888408888bb0bbb88888899 829 | -- 005:99888ccc8888888888888888888888888888888888888888888888888888888888888888888888888888888888888840844084040404088404040404040404044088440840840404408888888888888888888888888888888888888888888888888888408844084040844088888884088bbb00bbb8888899 830 | -- 006:9988c00cc888888888888888888888888888888888888888888888888888888888888888888888888888888888888840840884408440888404044084040440840884040840840404088888888888888888888888888888888888888888888888888888840884404040404088444088408bbb000bb8888899 831 | -- 007:9988c0c0c888888888888888888888888888888888888888888888888888888888888888888888888888888888888840840888440844088844084404040844040884440884084084088888888888888888888888888888888888888888888888888888884040404040440888888884088bbb00bbb8888899 832 | -- 008:9988cc00c888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888440844408408844088888840888bbb0bbbb8888899 833 | -- 009:99880ccc0888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888bbbbbbbb8888899 834 | -- 010:9988800088888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888bbbbbb88888899 835 | -- 011:998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 836 | -- 012:998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 837 | -- 013:998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 838 | -- 014:998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 839 | -- 015:998844408888888888884088884040408840840840888888888888888888888888988888884440888888988888888888888888888888888888888888888888888888888888888888888888888888888888888444088888888408408884440440888888888888888888888888888988844084408889888899 840 | -- 016:998884084040404044084040884040888440444044088888888888888888888889988888884088888888998888888888888888888888888888888888888888888888888888888888888888888888888888888408840404040884440888408404088888888888888888888888889988888408840889988899 841 | -- 017:998884084408404040404408884040404040840840408888888888888888888899988888884408888888999888888888888888888888888888888888888888888888888888888888888888888888888888888440844084040408408888408404088888888888888888888888899988884088408889998899 842 | -- 018:998884084088404040404408884440404040840840408888888888888888888809988888888840888888990888888888888888888888888888888888888888888888888888888888888888888888888888888408840884040408408888408404088888888888888888888888809988888408840889908899 843 | -- 019:998884084088844040404040884440408440884040408888888888888888888880988888884408888888908888888888888888888888888888888888888888888888888888888888888888888888888888888408840888440408840884440440888888888888888888888888880988844084408889088899 844 | -- 020:998888888888888888888888888888888888888888888888888888888888888888088888888888888888088888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888088888888888880888899 845 | -- 021:998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 846 | -- 022:998844408888888888884088884040888840888840888408888888888888888888988888440844408888988888888888888888888888888888888888888888888888888888888888888888888888888888888444088888888408408884408888888888888408408888888888888984408884084440888899 847 | -- 023:998884084040404044084040884040844088844044084440888888888888888889988888884040408888998888888888888888888888888888888888888888888888888888888888888888888888888888888408840404040884440884040844044088440884440404088888889940408844084089988899 848 | -- 024:998884084408404040404408884440404040404040408408888888888888888899988888840844408888999888888888888888888888888888888888888888888888888888888888888888888888888888888440844084040408408884040404040404408408408404088888899940408884084409998899 849 | -- 025:998884084088404040404408884040440840444040408408888888888888888809988888884040408888990888888888888888888888888888888888888888888888888888888888888888888888888888888408840884040408408884040440840408840408408844088888809940408884088840908899 850 | -- 026:998884084088844040404040884040844040884040408840888888888888888880988888440844408888908888888888888888888888888888888888888888888888888888888888888888888888888888888408840888440408840884408844040404408408840884088888880944084044404409088899 851 | -- 027:998888888888888888888888888888888888840888888888888888888888888888088888888888888888088888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888840888888888088888888888880888899 852 | -- 028:998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 853 | -- 029:998884408408888888888840408888408888408884088888888888888888888888988888884440888888988888888888888888888888888888888888888888888888888888888888888888888888888888888844088888888888888404040884084084088888888888888888888988840408440889888899 854 | -- 030:998840884440844044088840408440888440440844408888888888888888888889988888884040888888998888888888888888888888888888888888888888888888888888888888888888888888888888888408844084040844088404088844044404408888888888888888889988840404040889988899 855 | -- 031:998884088408404040408844404040404040404084088888888888888888888899988888884440888888999888888888888888888888888888888888888888888888888888888888888888888888888888888840884404040404088404040404084084040888888888888888899988844404040889998899 856 | -- 032:998888408408440840408840404408404440404084088888888888888888888809988888884040888888990888888888888888888888888888888888888888888888888888888888888888888888888888888884040404040440888444040404084084040888888888888888809988888404040889908899 857 | -- 033:998844088840844044088840408440408840404088408888888888888888888880988888884440888888908888888888888888888888888888888888888888888888888888888888888888888888888888888440844408408844088444040844088404040888888888888888880988888404408889088899 858 | -- 034:998888888888888840888888888888888408888888888888888888888888888888088888888888888888088888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888088888888888880888899 859 | -- 035:998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 860 | -- 036:998884404088408840840888888440840888888888888888888888888888888888988888888408888888988888888888888888888888888888888888888888888888888888888888888888888888888888888844088888888888888404088884088884088840888888888888888988884408440889888899 861 | -- 037:998840884408888408444088404088444084404408888888888888888888888889988888884408888888998888888888888888888888888888888888888888888888888888888888888888888888888888888408844084040844088404084408884404408444088888888888889988840884040889988899 862 | -- 038:998884084040404440840884088408840840404040888888888888888888888899988888888408888888999888888888888888888888888888888888888888888888888888888888888888888888888888888840884404040404088444040404040404040840888888888888899988844404040889998899 863 | -- 039:998888404040408408840840888840840844084040888888888888888888888809988888888408888888990888888888888888888888888888888888888888888888888888888888888888888888888888888884040404040440888404044084044404040840888888888888809988840404040889908899 864 | -- 040:998844084040408408884088884408884084404408888888888888888888888880988888884440888888908888888888888888888888888888888888888888888888888888888888888888888888888888888440844408408844088404084404088404040884088888888888880988844404408889088899 865 | -- 041:998888888888888888888888888888888888884088888888888888888888888888088888888888888888088888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888884088888888888888888888888088888888888880888899 866 | -- 042:998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 867 | -- 043:998884408888888840840888888844404408888888888888888888888888888888988888888440888888988888888888888888888888888888888888888888888888888888888888888888888888888888888844088888888888888404088888888888888888888888888888888988408844044089888899 868 | -- 044:998840884408404088444084408884084040888888888888888888888888888889988888884040888888998888888888888888888888888888888888888888888888888888888888888888888888888888888408844084040844088404088888888888888888888888888888889984408404088409988899 869 | -- 045:998884084040440840840840408884084040888888888888888888888888888899988888884040888888999888888888888888888888888888888888888888888888888888888888888888888888888888888840884404040404088840888888888888888888888888888888899988408404084089998899 870 | -- 046:998888404040408840840844088884084040888888888888888888888888888809988888884040888888990888888888888888888888888888888888888888888888888888888888888888888888888888888884040404040440888404088888888888888888888888888888809988408404040889908899 871 | -- 047:998844084408408840884084408844404408888888888888888888888888888880988888884408888888908888888888888888888888888888888888888888888888888888888888888888888888888888888440844408408844088404088888888888888888888888888888880984440440844409088899 872 | -- 048:998888884088888888888888888888888888888888888888888888888888888888088888888888888888088888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888088888888888880888899 873 | -- 049:998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 874 | -- 050:998844088888888888888888408888408888888888888884084088888888888888988888840844088888988888888888888888888888888888888888888888888888888888888888888888888888888888888844088888888888888404088888888888888888888888888888888988884408440889888899 875 | -- 051:998840404040440844088440440888408884404408844044404408888888888889988888440888408888998888888888888888888888888888888888888888888888888888888888888888888888888888888408844084040844088404088888888888888888888888888888889988840884040889988899 876 | -- 052:998844084408844040404088404088408840404040404084084040888888888899988888840884088888999888888888888888888888888888888888888888888888888888888888888888888888888888888840884404040404088840888888888888888888888888888888899988844404040889998899 877 | -- 053:998840404088404040404088404088408844084040444084084040888888888809988888840840888888990888888888888888888888888888888888888888888888888888888888888888888888888888888884040404040440888840888888888888888888888888888888809988840404040889908899 878 | -- 054:998844084088444040408440404088444084404040884088404040888888888880988888444044408888908888888888888888888888888888888888888888888888888888888888888888888888888888888440844408408844088840888888888888888888888888888888880988844404408889088899 879 | -- 055:998888888888888888888888888888888888888888840888888888888888888888088888888888888888088888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888088888888888880888899 880 | -- 056:998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 881 | -- 057:998844088888888888888888408888404040884084084088888888888888888888988888884408888888988888888888888888888888888888888888888888888888888888888888888888888888888888888844088888888888888444044088888888888888888888888888888984408444084409888899 882 | -- 058:998840404040440844088440440888404088844044404408888888888888888889988888888840888888998888888888888888888888888888888888888888888888888888888888888888888888888888888408844084040844088840840408888888888888888888888888889988840408840889988899 883 | -- 059:998844084408844040404088404088404040404084084040888888888888888899988888888408888888999888888888888888888888888888888888885776788888888888888888888888888888888888888840884404040404088840840408888888888888888888888888899988408440844409998899 884 | -- 060:998840404088404040404088404088444040404084084040888888888888888809988888888840888888990888888888888888888888888888888888856567678888888888888888888888888888888888888884040404040440888840840408888888888888888888888888809984088884040409908899 885 | -- 061:998844084088444040408440404088444040844088404040888888888888888880988888884408888888908888888888888888888888888888888886565656768888888888888888888888888888888888888440844408408844088444044088888888888888888888888888880984440440844409088899 886 | -- 062:998888888888888888888888888888888888888888888888888888888888888888088888888888888888088888888888888888888888888888888865657575558888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888088888888888880888899 887 | -- 063:998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888556756567678888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 888 | -- 064:998844088888888844404088408888408888888888888888888888888888888888988888884408888888988888888888888888888888888888888867675655788888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 889 | -- 065:998840404040888884084408888440404044088440844084408888888888888889988888888840888888998888888888888888888888888888888877777778857767888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 890 | -- 066:998844084408888884084040404088440840404040440844088888888888888899988888888408888888999888888888888888888888888888888887777788565676788888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 891 | -- 067:998840404088888884084040404088440840404408884088408888888888888809988888884088888888990888888888888888888888888888888888888885656567688888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 892 | -- 068:998844084088408884084040408440404040408440440844088888888888888880988888884440888888908888888888888888888888888888888888857767575755588888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 893 | -- 069:998888888888888888888888888888888888888888888888888888888888888888088888888888888888088888888888888888888857767888888888565656565676788888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 894 | -- 070:998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888565676788888886656565656557568577678888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 895 | -- 071:998844088888888888888888408888404088884088884088840888888888888888988888884040888888988888888888888888885657767688888865567676576565776756767888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 896 | -- 072:998840404040440844088440440888404084408884404408444088888888888889988888884040888888998888888888888888888565676788886565675776577676567675676888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 897 | -- 073:998844084408844040404088404088444040404040404040840888888888888899988888884440888888999888888888888888885656567688865656566565656767656767555888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 898 | -- 074:998840404088404040404088404088404044084044404040840888888888888809988888888840888888990888888888888888888575755557556767655656565676575556767888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 899 | -- 075:998844084088444040408440404088404084404088404040884088888888888880988888888840888888908888888888888888888565676565667676767575757555567675577888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 900 | -- 076:998888888888888888888888888888888888888884088888888888888888888888088888888888888888088888888888888888888856555656577777776565656767655776676888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 901 | -- 077:998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888887575757777765656565575677777555888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 902 | -- 078:998844088888888888888888408888844040884088408408888888888888888888988888884440888888988888888888888888888888870565676577676765565776777676767888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 903 | -- 079:99884040404044084408844044088840884408888408444088888888888888888998888888404088888899888888888888888888888878b756555656767676656567675667578888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 904 | -- 080:998844084408844040404088404088840840404044408408888888888888888899988888884440888888999888888888888888888857767bc7856565676777565656766566888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 905 | -- 081:998840404088404040404088404088884040404084088408888888888888888809988888884040888888990888888888888888888565676786585757555777657575557655888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 906 | -- 082:998844084088444040408440404088440840404084088840888888888888888880988888884440888888908888888888888888885656567688785656767777756567676767888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 907 | -- 083:998888888888888888888888888888888888888888888888888888888888888888088888888888888888088888888888888888888575755588858565577777775655777778888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 908 | -- 084:9988888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888885656767888058888880cb008807777768888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 909 | -- 085:99884440888884088888440888440888888888888888884088888888888888888898888888444088888898888888888888888888885655788888b5888800bcb8bb05588688888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 910 | -- 086:998884088408444044088408884040404044084408844044088440844088888889988888884088888888998888888888888888888888888888880855880bc0c00558888688888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 911 | -- 087:998884084040840884408408884408440884404040408840404040440888888899988888884408888888999888888888888888888888808888888b8855bcb0b55c88888688888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 912 | -- 088:99888408404084084040840888404040884040404040884040440888408888880998888888884088888899088888888888888888888885776788808857b55558b888888688888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 913 | -- 089:9988840884088840444044408844084088444040408440404084404408888888809888888844088888889088888888888888888888885656767888077b3bb0b80888888688888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 914 | -- 090:99888888888888888888888888888888888888888888888888888888888888888808888888888888888808888888888888888888888565656768887878bbc0cc8888888688888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 915 | -- 091:99888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888885757575558878b750cbbbc8888888688888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 916 | -- 092:9988440888888888888888884088884408888888884088888408408888888888889888888408844088889888888888888888888885655656767888b3b07bcbc88888886888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 917 | -- 093:99884040404044084408844044088840408440404088440844408884084408888998888844084088888899888888888888888888565655655788888b806c0c888888886888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 918 | -- 094:9988440844088440404040884040884040404040404084408408404040404088999888888408444088889998888888888888888885757555888888588bb700888888886888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 919 | -- 095:9988404040884040404040884040884040440840404040408408404040404088099888888408404088889908888888888888888885656767577678878bcb06888888886888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 920 | -- 096:9988440840884440404084404040884408844084084044408840408408404088809888884440444088889088888888888888888888565575656767888bbcb0688888886888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 921 | -- 097:99888888888888888888888888888888888888888888888888888888888888888808888888888888888808888888888888888888888888565656768880bb0c688888868888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 922 | -- 098:99888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888857575558880bc00688888868888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 923 | -- 099:99884088888888888840884408888888888888408408888888888888888888888898888840888844088898888888888888888888888888856567678880cb00688888868888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 924 | -- 100:99884088844044088408884040844044088440884440404088888888888888888998888440888404088899888888888888888888888888885655788800bcb8868888868888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 925 | -- 101:998840884040844044408840404040404044084084084040888888888888888899988888408884040888999888888888888888888888888888bcb8880bc0c8868888688888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 926 | -- 102:99884088440840408408884040440840408840408408844088888888888888880998888840888404088899088888888888888888888888888880cb8857b008868888688888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 927 | -- 103:99884440844044408408884408844040404408408840884088888888888888888098888444040440888890888888888888888888888888888888ccb77b3bb8886888688888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 928 | -- 104:998888888888888888888888888888888888888888888408888888888888888888088888888888888888088888888888888888888888888888888c7877bb08886886888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 929 | -- 105:99888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888870b753bc8888666888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 930 | -- 106:9988408888888888884088844088884408440888440840888884088888888888889888888844088888889888888888888888888888888888888888b3bb7008888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 931 | -- 107:99884088844044088408884088404084088408884040888440444088888888888998888888884088888899888888888888888888888888888888878b756c08888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 932 | -- 108:998840884040844044408840884040840884088840404044088408888888888899988888888408888888999888888888888888888888888888888853bb77c8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 933 | -- 109:9988408844084040840888408840408408840888404040884084088888888888099888888840888888889908888888888888888888888888888888870b60b8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 934 | -- 110:998844408440444084088884408440444044408844084044088840888888888880988888884440888888908888888888888888888888888888888858bbb7c8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 935 | -- 111:998888888888888888888888888888888888888888888888888888888888888888088888888888888888088888888888888888888888888888888887bcb0b8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 936 | -- 112:998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888bbbb08888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 937 | -- 113:9988408888888888884088444040440844088844088888884040888888888888889888888408440888889888888888888888888888888888888888880bc0c8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 938 | -- 114:9988408884404408840888408888840884088840404408844088404084408888899888884408884088889988888888888888888888888888888888880bb008888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 939 | -- 115:998840884040844044408844084084088408884440844040404040404408888899988888840884088888999888888888888888888888888888888888b0cc08888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 940 | -- 116:9988408844084040840888408840840884088844084040404040404088408888099888888408408888889908888888888888888888888888888888880bbbc8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 941 | -- 117:9988444084404440840888408840444044408840404440844040844044088888809888884440444088889088888888888888888888888888888888880bc0b8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 942 | -- 118:998888888888888888888888888888888888888888888888888888888888888888088888888888888888088888888888888888888888888888888888bbb0c8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 943 | -- 119:998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888bcb0b8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 944 | -- 120:998840888888888888408844404044084408888440888888888888840888888888988888844044408888988888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 945 | -- 121:998840888440440884088840888884088408884088840840404408444088888889988888408840888888998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 946 | -- 122:998840884040844044408844084084088408884088404040404040840888888899988888444044088888999888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 947 | -- 123:998840884408404084088840884084088408884088404040404040840888888809988888404088408888990888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 948 | -- 124:998844408440444084088840884044404440888440840884404040884088888880988888444044088888908888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 949 | -- 125:998888888888888888888888888888888888888888888888888888888888888888088888888888888888088888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 950 | -- 126:998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 951 | -- 127:998840404088888888888888888888888888840888888888888888888888888888988888884408888888988888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 952 | -- 128:998840408844088440888440840840404408444088888888888888888888888889988888888840888888998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 953 | -- 129:998840404040404040884088404040404040840888888888888888888888888899988888888408888888999888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 954 | -- 130:998840404040404408884088404040404040840888888888888888888888888809988888884088888888990888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 955 | -- 131:998884084040408440888440840884404040884088888888888888888888888880988888884440888888908888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 956 | -- 132:998888888888888888888888888888888888888888888888888888888888888888088888888888888888088888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888899 957 | -- 133:999888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888999 958 | -- 134:899999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998 959 | -- 135:889999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999988 960 | -- 961 | 962 | -- 963 | -- 000:1010105d245db13e50ef9157ffff6daee65061be3c047f5005344c185dc95999f6e6eaf2b6baba8d8d9d7150042c2404 964 | -- 965 | 966 | -------------------------------------------------------------------------------- /tree_generatorV5.tic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/archaicvirus/TreeGenerator/a72c6fb38d9d691fad5c14d9fff7196a5b9a577f/tree_generatorV5.tic --------------------------------------------------------------------------------