TgDraw is a very substantial rewrite, expansion and improvement of a program that was posted on the PBCC forum [URL below] about two months ago. Petr Schreiber is the co-author. He programmed entirely in PBWin 8.04 while I worked entirely in PBCC 4.04; the program will run almost identically, and equally well, in either. Thanks to Petr's knowledge of double buffering, macros and other new-fangled esoterica, the program can run many times faster than its PBCC prototype, and that was already fast compared to VB or PBDOS.
It is Freeware, and placed by us in the Public Domain.
TgDraw is not a full-blown emulation of LOGO's Turtle Graphics because, among other things, it is written in PowerBASIC, and PowerBASIC is a compiler rather than an interpreter. What our program does is to implement the turtle's most basic commands (e.g., turn n degrees, go forward x steps) and to enable one to invoke them either directly or via the much more concise terminology of DRAW code. TgDraw thus emulates and extends
DOS-BASIC's DRAW command, which is really a very powerful and useful mini-language for handling graphics data.
All source code, demos, tutorials and documentation are in a single .ZIP file, which is attached to this post. The most important file in the ZIP is tgDraw.INC; it contains all the turtle and drawing engines and basic supporting subroutines. If you are familiar with the DOS-DRAW language you might well get by with just tgDraw.Inc and BareBonesTemplate.BAS, which lists the few lines that you need to get set for programming in a Windows version of PowerBASIC. There are, however, also numerous demos and tutorials, plus a QuickReference Card that covers all available tgDraw commands. The demos and tutorials are heavily commented. The syntax of tgDraw differs a bit from that of PBDOS, but we are betting that you will prefer it.
We welcome your comments, critiques, suggestions and demos or related programs of your own. Post them, if you can, on http://powerbasic.com/support/pbforums/showthread.php?t=37325
It is Freeware, and placed by us in the Public Domain.
TgDraw is not a full-blown emulation of LOGO's Turtle Graphics because, among other things, it is written in PowerBASIC, and PowerBASIC is a compiler rather than an interpreter. What our program does is to implement the turtle's most basic commands (e.g., turn n degrees, go forward x steps) and to enable one to invoke them either directly or via the much more concise terminology of DRAW code. TgDraw thus emulates and extends
DOS-BASIC's DRAW command, which is really a very powerful and useful mini-language for handling graphics data.
All source code, demos, tutorials and documentation are in a single .ZIP file, which is attached to this post. The most important file in the ZIP is tgDraw.INC; it contains all the turtle and drawing engines and basic supporting subroutines. If you are familiar with the DOS-DRAW language you might well get by with just tgDraw.Inc and BareBonesTemplate.BAS, which lists the few lines that you need to get set for programming in a Windows version of PowerBASIC. There are, however, also numerous demos and tutorials, plus a QuickReference Card that covers all available tgDraw commands. The demos and tutorials are heavily commented. The syntax of tgDraw differs a bit from that of PBDOS, but we are betting that you will prefer it.
We welcome your comments, critiques, suggestions and demos or related programs of your own. Post them, if you can, on http://powerbasic.com/support/pbforums/showthread.php?t=37325
Comment