GIMP Script-fu

Artifact [0397a96961]
Login

Artifact 0397a969617abbf89e3811647c3289d941b10ede:

Wiki page [sg-platonic-calendar] by saulgoode 2015-04-03 07:07:29.
D 2015-04-03T07:07:29.452
L sg-platonic-calendar
P 536cc2e0cc0dced4e2bd56673aedbe963effef7f
U saulgoode
W 3775
<dl>
<dt><b>Command:</b> <dd>Platonic calendar</dd></dt>
<dt><b>Menu:</b> <dd>"<Image>/File/Create/Platonic calendar"</dd></dt>
<dt><b>PDB Name:</b> <dd>script-fu-sg-platonic-calendar</dd></dt>
<dt><b>Download:</b> <dd>[http://chiselapp.com/user/saulgoode/repository/script-fu/artifact/15f94d71ce76d82e|sg-platonic-calendar.scm] (after the page appears, click on the "Download" command) </dd><dd>Note: this script depends upon the [sg-calendar] script.</dd></dt>
<dt><b>License:</b> <dd>[copyright|GPLv2+]</dd></dt>

<dt><b>Description:</b> <dd>
This script was inspired by the images on [http://cursorlibre.com/2011/01/arma-tu-calendario-de-ubuntu/comment-page-1/|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). <b>The script depends upon my [sg-calendar|Calendar script] also being installed</b>. 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.

<center><img src="http://barn.kerosenecow.net/mgoblin_media/media_entries/53/YM-layout.png" alt="Broken Link"></center>

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.)

<center><img src="http://barn.kerosenecow.net/mgoblin_media/media_entries/55/platonic-02.jpg" alt="Broken Link"></center>

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

<center><img src="http://barn.kerosenecow.net/mgoblin_media/media_entries/54/mahvin-photo.jpg" alt="Broken Link"></center>

A special thanks to the Usual Suspects over at [http://gimpchat.com/viewtopic.php?f=9&t=1003|GIMPchat.com] who've helped with debugging and suggesting improvements to this script.
</dd></dt>
</dl>

Z 757b45f5b14d4203f977c7ec25d2616f