GIMP Script-fu

Update of "sg-platonic-calendar"
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: c2d44b3b9570b08d1e41e898af5aa49d21f5d654
Page Name:sg-platonic-calendar
Date: 2015-04-03 07:42:43
Original User: saulgoode
Parent: 0397a969617abbf89e3811647c3289d941b10ede
Content
Command:
Platonic calendar
Menu:
"<Image>/File/Create/Platonic calendar"
PDB Name:
script-fu-sg-platonic-calendar
Download:
sg-platonic-calendar.scm (after the page appears, click on the "Download" command)
Note: this script depends upon the sg-calendar script.
License:
GPLv2+

Description:

This script was inspired by the images on this Spanish website.

The "Platonic calendar" command will render a calendar shaped such that it can be printed, cut, and folded into a dodecahedron (a twelve-sided platonic solid). The script depends upon my Calendar script also being installed. It shares many of the same configuration options and supports the same languages (currently English, German, Spanish, Italian, French, Hungarian, Polish, Russian, Serbian latin, Serbian cyrilic, Croatian, Slovenian, Macedonian, Swedish, and Catalan).

The default edge-length of "400" should produce an image suitable for printing on either a letter-size or DIN A4 sheet of paper at 300DPI.

The options for the year and month banner placement (the "Banner format" dropdown) is summarized in the following graphic.

Broken Link

The facet image can be a single layer or multiple layers. If the facet image has twelve layers then each layer will appear on a different face of the dodecahedron (bottom layer is January, top layer is December). Fewer than twelve layers will result in the layers being repeated to produce the twelve faces (e.g., four layers would be "cycled through" three times). If more than twelve layers are present in the facet image then only the bottom twelve are used.

The facet layers will be centered and scaled (up or down) to completely fill the facet. If a facet layer is linked then the layer will not be scaled (I don't know if this will be that useful but the idea was to facilitate placement of a small "icon" at a fixed location on a facet).

The script generates three layers: a "Folds" layer which contains all of the lines which indicate either folds or cuts, a text layer containing all of the text (on a transparent background), and a background layer (filled with the active background color). If a facet image was specified, a fourth layer containing all of the facets will also be produced.

Also, all of the paths for the individual facets and tabs are available in the Paths Dialog. These paths can be used to select individual facets or text should you wish to later apply some processing to them individually.

Here is an example output using an edge-length of "120" and various GIMP splash screens as the facet image -- you can use "File->Open As Layers" to easily create a multilayer facet image. (I also used the alpha of the text layers as a selection mask to Value Invert the colors in the facets.)

Broken Link

Here is a photo of a calendar created by Mahvin (http://www.mahvin.com/).

Broken Link

A special thanks to the Usual Suspects over at GIMPchat.com who've helped with debugging and suggesting improvements to this script.