LibreLogo
Vector graphics language
- 1 min read
- 3 chapters
Related on Lably
Through Python (programming language), LibreOffice and Recursion (computer science)
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 (1,400 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).
Sign in to keep reading
2 more chapters are free with a Lably account.
Installation
LibreLogo is embedded in every version of LibreOffice after 4.2.3.3, released in 2014. It can also be installed as an extension for earlier versions.
Its main UI is a toolbar in Writer (View ▸ Toolbars ▸ Logo).
Usage
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 Scalable Vector Graphics (SVG) format and can be copied and pasted into other documents.
The syntax of LibreLogo is similar to UCBLogo. It supports the ¨word syntax for strings, the 'word' notation, and importantly, recursion. Commands can be entered in the toolbar, or compiled and run from the Writer page.
Hello world example
Here is a "Hello, World!" program example.
circle 10cm fillcolor 'blue' pencolor 'red' pensize 2 circle 5cm forward 200 right 89 circle 5 repeat 88 [ forward 200 right 89 ] fill repeat 9 [ label 'Hello, World!' right 20 ] repeat 100 [ penup position any pendown pensize random 10 fillcolor any square 20 + random 100 ]

