![]() | ||
Original author(s) Initial release 27 June 2012; 4 years ago (2012-06-27) Type Software extension / part of an application |
LibreLogo is a Logo-like, Python programming environment that uses interactive turtle vector graphics. Its final output is a vector graphics rendition within the LibreOffice suite; and it can be used for education and desktop publishing.
Contents
History
Logo toolbar and interpreter was programmed by László Németh, and help with integration was provided by András Tímár. It was released as an extension to LibreOffice before code was merged into LibreOffice 4.2.3.3 main code in 2014.
The lightweight implementation (1400 lines in Python-PyUNO) uses the embedded Python to give a simplified programming interface to the vector graphics of LibreOffice for graphic design and education (including teaching of word processing).
Installation
LibreLogo is embedded in every version of LibreOffice later than 4.2.3.3 (released in 2014). It can also be installed as an extension for earlier versions.
It's a toolbar in Writer
(View
→ Toolbars
→ Logo
).
Use
Touching the up-arrow on the Logo toolbar, activates the turtle, then the source code is typed directly onto the same page. The graphic is in SVG format and can be copy & pasted into other documents.
The syntax of LibreLogo is similar to UCBLogo. It supports the ¨word syntax for strings as well as the 'word' notation. Importantly LibreLogo supports recursion. Commands can entered into the toolbar, or compiled and run from the Writer page.
Hello world example
Here is a "Hello, World!" example.
circle 10cmfillcolor 'blue' pencolor 'red' pensize 2 circle 5cmforward 200 right 89 circle 5repeat 88 [ forward 200 right 89 ] fillrepeat 9 [ label 'Hello, World!' right 20 ]repeat 100 [ penup position any pendown pensize random 10 fillcolor any square 20 + random 100 ]