No caption needed…

vakacio
…because the picture is the illustrated version of the sentence “VAKÁCIÓ!”, the obligate, usually colourful and imaginatively designed text on the blackboards of the Hungarian elementary schools before the long Summer vacation (zoom). The animated SVG version of the picture shows how the text is longer day by day, started with the exclamation mark.

Interestingly, the coloured chalk was invented 200 years ago, according to the resources of Wikipedia (see blackboard): James Pillans Scottish classical scholar and educational reformer created it from ground chalk, dyes and porridge in 1814 for teaching geography.

The Boy Who Loved Math

The most simple perfect squared square (zoom, in Wikimedia Commons and SVG)
The most simple perfect squared square (in 750px, Wikipedia and SVG)

The Boy Who Loved Math: The Improbable Life of Paul ErdősThe Boy Who Loved Math: The Improbable Life of Paul Erdős is a funny children book about the legendary Hungarian mathematician. Author of the book, Deborah Heiligman has got the help of Erdős’s friends and colleagues, also the illustrator of the book, Le Uyen Pham has traveled to Budapest to create great illustrations about the place of birth and childhood of the world wanderer Paul Erdős. According to the New York Times’s review (Nate Silver: Beautiful Minds), this book “should make excellent reading for nerds of all ages.” It contains also several interesting mathematical problems, including the illustrated one: how can we tile a square using other squares whose sizes are all different and have integer lengths. The squaring on the picture is the simplest one, and it was discovered by A. J. W. Duijvestijn in 1978, see its interesting history on Squaring.net.
The LibreLogo source code of the illustration uses the mapping and grid drawing procedures of the tangram drawing example of the previous post, also the new procedure box for drawing a square with random filling color with 50% transparency (using the new FILLTRANSPARENCY command of LibreOffice 4.3) and a title showing the actual size: Continue reading

Draw tangram

drawtangram_previewLibreLogo can export SVG animations in the upcoming LibreOffice 4.3. The attached picture is the animated GIF preview of the SVG/SMIL Wikipedia animation about tangram drawing, see the SVG animation in your browser.
Saving animated SVG pictures needs to use only the SLEEP command within the PICTURE block. If the PICTURE block ends also with a SLEEP command, the result will be a looping SVG animation, as in this example.

TO place x y
POSITION [200+x*40, 400-y*40]
END

TO line x y x2 y2
PENUP place x y
PENDOWN place x2 y2
END

TO grid x y x2 y2
REPEAT y2-y+1 [
    line x y+REPCOUNT-1 x2 y+REPCOUNT-1
]
REPEAT x2-x+1 [
    line x+REPCOUNT-1 y x+REPCOUNT-1 y2
]
END

PICTURE “drawtangram.svg” [
PENSIZE 2 HIDETURTLE
PENCAP “ROUND”
PENCOLOR “SILVER”
grid 0 0 4 4 SLEEP 1000
PENCOLOR “BLACK”
line 0 4 4 0 SLEEP 1000
line 2 4 4 2 SLEEP 1000
line 1 3 2 4 SLEEP 1000
line 0 0 3 3 SLEEP 1000
line 3 3 3 1 SLEEP 1000
FILLCOLOR “RED” line 0 0 0 4 place 2 2 FILL
FILLCOLOR “BLUE” line 0 0 4 0 place 2 2 FILL
FILLCOLOR “GREEN” line 0 4 2 4 place 1 3 FILL
FILLCOLOR “PURPLE” line 2 4 4 4 place 4 2 FILL
FILLCOLOR “LIME” line 3 1 2 2 place 3 3 FILL
FILLCOLOR “FUCHSIA” line 2 4 1 3 place 2 2 place 3 3 FILL
FILLCOLOR “YELLOW” line 3 1 3 3 place 4 2 place 4 0 FILL
SLEEP 2000
]

Note: this code shows an example to use arbitrary Cartesian coordinate system with LibreLogo: the procedure place moves the turtle to the given coordinate, mapping it to the PostScript like coordinate system of LibreOffice. Procedure line calls place two times to draw a line. With combining line with place calls it’s possible to draw the filled tangram shapes using simple Cartesian coordinates.

The tangram is a popular dissection puzzle (see the LibreLogo turtle). Chinese mathematicians Fu Traing Wang and Chuan-Chih Hsiung proofed in 1942, that there are only 13 convex polygons can be formed by the tangram. Solving them is a good play (especially with a real tangram set):
convex_tangram_shapes_black
[The solution (with an extended LibreLogo source code moving the origin of the Cartesian coordinate system to draw multiple shapes with simple Cartesian coordinates): convex tangram shapes (SVG).]

Triangles

triangles_mini

Next pictures are related to the equilateral triangle: angles of the regular triangle (in SVG), extreme points of an equilateral triangle with rounded corners (in SVG) and the impossible object Reutersvärd triangle (in SVG).

Angles of regular polygons

We can draw an equilateral triangle repeating FORWARD and RIGHT commands:

REPEAT 3 [ FORWARD 100 RIGHT 120 ]

More automatization could create the series of regular polygons, also with angles and other annotation, see the gallery and attached LibreLogo source code of the Wikipedia illustration:
regpol_mini

Extreme points

Next triangle is the result of the SVG transition of a mathematical illustration (the original picture was in the Wikimedia Commons category Top 200 images that should use vector graphics by usage).
The program of the picture draws 1 inch width outline with rounded corners, and in a second turn, narrow arcs with the appropriate radius.

HIDETURTLE 
PICTURE “Extreme points.svg” [
    FILLCOLOR “SKYBLUE” PENCOLOR “SKYBLUE”
    PENSIZE 72 RIGHT 30
    FORWARD 100 RIGHT 120 FORWARD 100 FILL
    PENCOLOR “RED” PENSIZE 2
    REPEAT 3 [
        CIRCLE [70, 70, 9h, 1h, 3] 
        PENUP RIGHT 120 FORWARD 100 PENDOWN
    ]
]

svg_export_bug
Note: this illustration helped to find a rare SVG export problem, see the enlarged line end on the right picture and the LibreOffice bug report.

Reutersvärd optical illusion

One of the best optical illusions, created by the Swedish artist, Oscar Reutersvärd at the age of 18, in 1934. The next program draws the left picture. To get the optical illusion, open the SVG file in LibreOffice Draw, and place two shapes (bottom sides of the first cube) to foreground manually (for example, by Ctrl-Shift-+).
Reutersvard_mod

TO tile
LEFT 60
REPEAT 2 [
    FORWARD 40 RIGHT 120 FORWARD 40 RIGHT 60
] FILL RIGHT 60
END

TO cube
colors = [“GOLD”, “TEAL”, “TOMATO”]
REPEAT 3 [ 
    PENCOLOR colors[REPCOUNT-1]
    FILLCOLOR colors[REPCOUNT-1]
    tile
    RIGHT 120
]
END

PICTURE “Reutersvärd triangle.svg” [
HIDETURTLE PENSIZE 0.1 RIGHT 30
REPEAT 3 [
    REPEAT 3 [
        PENUP FORWARD 60 PENDOWN
        d = HEADING
        HEADING 30
        cube
        HEADING d
    ]
    RIGHT 120
]
]

Note: Using narrow outlines (instead of “invisible” PENCOLOR) limits the SVG rendering problems in low resolution.

Flag of Europe

eu_minta

Cyprus, the Czech Republic, Estonia, Hungary, Latvia, Lithuania, Malta, Poland, Slovakia, and Slovenia joined the European Union on 1 May 2004. The picture of the week is related to the 10th anniversary (and the upcoming Europe Day), also because LibreLogo is a development of the Hungarian E-Governmental Free Software Competence Centre, too, a project that has been supported by the European Union.

The flag of the European Union was part of the Wikipedia, but its official variants, the blue (1), and black monochrome (2), moreover the white-bordered versions of the three printing variants (3, 4, 5) were created recently by LibreLogo. Continue reading

Workshop in Brazil

SENID 2014 (Digital Inclusion National Seminar) at Passo Fundo University, Brazil, organized also a 4-hour LibreLogo workshop, during the 3-day conference at end of the April. Gilvan Vilarim, lecturer of the workshop, reported that the event had 15 participants, including teachers and some students (one of them was deaf, and she used the assistance of a Libras interpreter – Libras is the Brazilian version of the sign language for deaf people). The participants found the workshop to be very interesting, and they planned to continue using LibreLogo. (Thanks to Gilvan for the pictures, too.)
SENID_montage

Hungarian and Norwegian educational materials

LibreLogo textbook (made in LibreOffice and LibreLogo)
LibreLogo textbook (made in LibreOffice and LibreLogo)

E-Governmental Free Software Competence Centre of Hungary has published a free LibreLogo textbook (PDF, 6 MB) for primary and secondary schools of Hungary. The book is based on the teaching experiences of the author, Viktória Lakó, and according to its subtitle (“from turtle graphics to the graduation in programming”), it covers a wide area from turtle graphics to the secondary school-level introduction of algorithms and data structures.

Kolbjørn Stuestøl, author of the Norwegian localization of LibreLogo, has introduced on the user support list of LibreOffice a Norwegian LibreLogo tutorial with nice examples and illustrations. The English translation of the tutorial is under development.

Turtle vector graphics of LibreOffice