| Title: | Generation of Different Animated Christmas Cards |
|---|---|
| Description: | Generation of different Christmas cards, most of them animated, one for each year since 2008 except 2020. Most of the cards can be generated in three languages (English, Catalan and Spanish). Each card was created at Christmas to greet the coming New Year. From 2008 to 2018, the cards were shared by e-mail with colleagues, friends and students. Encouraged by some of them, the author gathered the whole collection into this package, first released on CRAN in 2019, and new cards have been added since then. |
| Authors: | Jose Barrera-Gomez [aut, cre] (ORCID: <https://orcid.org/0000-0002-2688-6036>) |
| Maintainer: | Jose Barrera-Gomez <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 1.4.2 |
| Built: | 2026-11-28 22:15:39 UTC |
| Source: | https://github.com/cran/christmas |
A Catalan 'caganer' (created in 2009). Caganer is a figurine depicted in the act of defecation appearing in nativity scenes in Catalonia and neighbouring areas with Catalan culture such as Andorra, Valencia, and Northern Catalonia (in southern France). It is most popular and widespread in these areas, but can also be found in other areas of Spain (Murcia), Portugal, and southern Italy (Naples). Further details can be found at https://en.wikipedia.org/wiki/Caganer. This caganer won the annual contest of sustainable caganers at CREAL (now ISGlobal, https://www.isglobal.org/en/) in 2009.
xmascaganer( year = 2010, language = c("english", "spanish", "catalan"), seed = NULL )xmascaganer( year = 2010, language = c("english", "spanish", "catalan"), seed = NULL )
year |
Year to be printed. Default is |
language |
Language to be used in the card. One of |
seed |
Seed for reproducibility of the card. Default is |
A Christmas card plot with a caganer.
Jose Barrera-Gomez.
xmascaganer()xmascaganer()
Christmas cradle (created in 2026). Approximation to a Newton's cradle with three pendulums.
xmascradle( year = 2027, language = c("english", "spanish", "catalan"), restitution_coef = 0.6, motion = c("harmonic", "linear"), col_card = "palegoldenrod", col_rest = "red", col_moving = "darkturquoise", col_final = "forestgreen", col_mess = c("yellow", "red", "cyan", "violet", "white"), seed = NULL )xmascradle( year = 2027, language = c("english", "spanish", "catalan"), restitution_coef = 0.6, motion = c("harmonic", "linear"), col_card = "palegoldenrod", col_rest = "red", col_moving = "darkturquoise", col_final = "forestgreen", col_mess = c("yellow", "red", "cyan", "violet", "white"), seed = NULL )
year |
Year to be printed. Default is |
language |
Language to be used in the card. One of
|
restitution_coef |
Numeric value in the open interval (0, 1) indicating
the fraction of amplitude retained after each collision to simulate energy
loss. Default is |
motion |
Type of motion of the pendulums. One of
|
col_card |
Background color of the card (the graphics window). It must
be opaque (no transparency), because the pendulums are erased by drawing
over them with this color. The colors of the balls and of their wires are
drawn over it. Default is |
col_rest |
Color of a ball while it is at rest during the motion of
the system. Default is |
col_moving |
Color of a ball while it is moving (and of the left ball
at the beginning, when it is about to fall). Default is
|
col_final |
Color of the three balls when the system stops. Default is
|
col_mess |
Vector of at least three colors from which the colors of the
three pieces of the message are randomly chosen (without replacement). The
message is written on the balls once they have turned |
seed |
Seed for reproducibility of the card. Default is |
A Christmas card plot including an approximation to a Newton's cradle animation.
The animation was improved with the assistance of Claude Sonnet 5.5
(Anthropic): the flickering was removed by erasing the previous position
and drawing the next one between dev.hold() and dev.flush(),
and the balls are drawn in plot coordinates, so they scale with the plot.
Jose Barrera-Gomez.
xmascradle() xmascradle(year = 2027, language = "catalan")xmascradle() xmascradle(year = 2027, language = "catalan")
A statistical/epidemiological Christmas tree (created in 2016). This tree is built using a random subset of statistical and epidemiological words.
xmasepitree(year = 2017, seed = NULL)xmasepitree(year = 2017, seed = NULL)
year |
Year to be printed. Default is |
seed |
Seed for reproducibility of the card. Default is |
A Christmas card plot including a tree made of nice words.
Jose Barrera-Gomez.
xmasepitree()xmasepitree()
Christmas flag (created in 2015). A flag with a Christmas message.
xmasflag( year = 2016, language = c("english", "spanish", "catalan"), seed = NULL )xmasflag( year = 2016, language = c("english", "spanish", "catalan"), seed = NULL )
year |
Year to be printed. Default is |
language |
Language to be used in the card. One of |
seed |
Seed for reproducibility of the card. Default is |
A Christmas card plot including a message in a flag.
Jose Barrera-Gomez.
xmasflag(year = 2020, language = "catalan")xmasflag(year = 2020, language = "catalan")
The tree (created in 2024) fractal structure was adapted from (https://blogs.sas.com/content/iml/2012/12/14/a-fractal-christmas-tree.html). A preliminary translation to R was written by Alejandra Cabana (UAB).
xmasfractaltree(year = 2025, language = c("english", "spanish", "catalan"))xmasfractaltree(year = 2025, language = c("english", "spanish", "catalan"))
year |
Year to be printed. Default is |
language |
Language to be used in the card. One of |
A Christmas card plot including a fractal Christmas tree.
Jose Barrera-Gomez.
xmasfractaltree()xmasfractaltree()
Christmas Galton (created in 2018). A Christmas tree in the
Galton board. This is an adaptation of quincunx() in package
animation, which simulates the Galton board
(https://en.wikipedia.org/wiki/Bean_machine).
xmasgalton( year = 2019, language = c("english", "spanish", "catalan"), balls = 240, layers = 15, onlyBoard = FALSE, treeballs = 15, time = 0.02, seed = NULL )xmasgalton( year = 2019, language = c("english", "spanish", "catalan"), balls = 240, layers = 15, onlyBoard = FALSE, treeballs = 15, time = 0.02, seed = NULL )
year |
Year to be printed. Default is |
language |
Language to be used in the card. One of |
balls |
The number of balls in the board. Default is 240. |
layers |
The number of layers in the board. Default is 15. |
onlyBoard |
Logical. If |
treeballs |
The number of balls to be added to the Christmas normal tree. Default is 15. |
time |
Elapsed time, in seconds, between two consecutive balls in the board. Default is 0.02. |
seed |
Seed for reproducibility of the card. Default is |
A Christmas tree in a Galton board.
Jose Barrera-Gomez.
# more balls, less layers: xmasgalton(balls = 300, layers = 9, time = 0.01) # no balls in the gaussian christmas tree: xmasgalton(balls = 400, layers = 11, time = 0.005, treeballs = 0)# more balls, less layers: xmasgalton(balls = 300, layers = 9, time = 0.01) # no balls in the gaussian christmas tree: xmasgalton(balls = 400, layers = 11, time = 0.005, treeballs = 0)
Christmas risks (created in 2011). Some epidemiological jokes about potential effects of Christmas on health.
xmashealth(year = 2012, seed = NULL)xmashealth(year = 2012, seed = NULL)
year |
Year to be printed. Default is |
seed |
Seed for reproducibility of the card. Default is |
A Christmas card plot including boxplots and OR estimates.
Jose Barrera-Gomez.
xmashealth()xmashealth()
Christmas helix (created in 2023). A helix with a Christmas message.
xmashelix( year = 2024, language = c("english", "spanish", "catalan"), totalsecs = NULL, seed = NULL )xmashelix( year = 2024, language = c("english", "spanish", "catalan"), totalsecs = NULL, seed = NULL )
year |
Year to be printed. Default is |
language |
Language to be used in the card. One of |
totalsecs |
Approximate total time, in seconds, to create the card.
Default is |
seed |
Seed for reproducibility of the card. Default is |
A Christmas card plot including a message in a helix.
Jose Barrera-Gomez.
xmashelix(year = 2024, language = "catalan", totalsecs = 1)xmashelix(year = 2024, language = "catalan", totalsecs = 1)
Christmas card using a neon sign (created in 2013 for New Year 2014).
xmasneon( language = c("english", "spanish", "catalan"), nflash = 30, pause = 0.1, seed = NULL )xmasneon( language = c("english", "spanish", "catalan"), nflash = 30, pause = 0.1, seed = NULL )
language |
Language to be used in the card. One of |
nflash |
Number of flashes shown in the neon sign. Default is 30. |
pause |
Pause, in seconds, between two consecutive flashes shown in the neon sign. Default is 0.1. |
seed |
Seed for reproducibility of the card. Default is |
A Christmas card plot including a message and then a simulations of a neon sign.
Jose Barrera-Gomez.
xmasneon() xmasneon(language = "catalan", nflash = 10, pause = 0.05) xmasneon(nflash = 100, pause = 0.01)xmasneon() xmasneon(language = "catalan", nflash = 10, pause = 0.05) xmasneon(nflash = 100, pause = 0.01)
Christmas card (created in 2025) including a tree Christmas tree whose leaves are created with the word "peace" in 32 languages. This is the first card in this collection created by interacting with AI (Gemini Flash 2.5).
xmaspeace( year = 2026, language = c("english", "spanish", "catalan"), seed = NULL )xmaspeace( year = 2026, language = c("english", "spanish", "catalan"), seed = NULL )
year |
Year to be printed. Default is |
language |
Language to be used in the card. One of |
seed |
Seed for reproducibility of the card. Default is |
A Christmas card plot including a tree and wishing a peaceful year.
Jose Barrera-Gomez.
xmaspeace()xmaspeace()
Approximation to Picasso's pigeon (created in 2022).
xmaspicasso( year = 2023, language = c("english", "spanish", "catalan"), seed = NULL )xmaspicasso( year = 2023, language = c("english", "spanish", "catalan"), seed = NULL )
year |
Year to be printed. Default is |
language |
Language to be used in the card. One of |
seed |
Seed for reproducibility of the card. Default is |
A Christmas card plot including an approximation to Picasso's pigeon.
Jose Barrera-Gomez.
xmaspicasso() xmaspicasso(year = 2023, language = "catalan")xmaspicasso() xmaspicasso(year = 2023, language = "catalan")
A plot of the Christmas regression model (created in 2019).
xmasregression( year = 2020, language = c("english", "spanish", "catalan"), time = 4, seed = NULL )xmasregression( year = 2020, language = c("english", "spanish", "catalan"), time = 4, seed = NULL )
year |
Year to be printed. Default is |
language |
Language to be used in the card. One of |
time |
Total time, in seconds, for the card generation. Default is 12. |
seed |
Seed for reproducibility of the card. Default is |
An illustration of the Christmas regression model.
Jose Barrera-Gomez.
xmasregression() xmasregression(year = 2021, language = "catalan", time = 2)xmasregression() xmasregression(year = 2021, language = "catalan", time = 2)
Koch snowflakes (created in 2012). Koch snowflakes (https://en.wikipedia.org/wiki/Koch_snowflake) are used to print the Christmas message in three languages (English, Catalan and Spanish).
xmassnowkoch(year = 2013, seed = NULL)xmassnowkoch(year = 2013, seed = NULL)
year |
Year to be printed. Default is |
seed |
Seed for reproducibility of the card. Default is |
A Christmas card plot including Koch snowflakes.
Jose Barrera-Gomez.
xmassnowkoch()xmassnowkoch()
Christmas snowman (created in 2014).
xmassnowman( year = 2015, language = c("english", "spanish", "catalan"), seed = NULL )xmassnowman( year = 2015, language = c("english", "spanish", "catalan"), seed = NULL )
year |
Year to be printed. Default is |
language |
Language to be used in the card. One of |
seed |
Seed for reproducibility of the card. Default is |
A Christmas card plot including a snowman.
Jose Barrera-Gomez.
xmassnowman(year = 2015, language = "catalan")xmassnowman(year = 2015, language = "catalan")
A random repetition of a message (created in 2010). Random allocation of repetitions of the Christmas message.
xmastext( year = 2011, language = c("english", "spanish", "catalan"), seed = NULL )xmastext( year = 2011, language = c("english", "spanish", "catalan"), seed = NULL )
year |
Year to be printed. Default is |
language |
Language to be used in the card. One of |
seed |
Seed for reproducibility of the card. Default is |
A Christmas card plot including the repetition of the same message randomly allocated.
Jose Barrera-Gomez.
xmastext(year = 2011, language = "spanish", seed = 666)xmastext(year = 2011, language = "spanish", seed = 666)
A random naive Christmas tree (created in 2008).
xmastree( year = 2009, language = c("english", "spanish", "catalan"), seed = NULL )xmastree( year = 2009, language = c("english", "spanish", "catalan"), seed = NULL )
year |
Year to be printed. Default is |
language |
Language to be used in the card. One of |
seed |
Seed for reproducibility of the card. Default is |
A Christmas card plot including a random tree.
Jose Barrera-Gomez.
xmastree(year = 2020, language = "catalan", seed = 666)xmastree(year = 2020, language = "catalan", seed = 666)
Christmas trees (created in 2017) with different shapes.
xmastreeshape( year = 2018, language = c("english", "spanish", "catalan"), shape = c("piramidal", "oval", "vshaped", "round", "columnar"), nballs = 15, ballscolor = NULL, seed = NULL )xmastreeshape( year = 2018, language = c("english", "spanish", "catalan"), shape = c("piramidal", "oval", "vshaped", "round", "columnar"), nballs = 15, ballscolor = NULL, seed = NULL )
year |
Year to be printed. Default is |
language |
Language to be used in the card. One of |
shape |
The shape of the tree. One of |
nballs |
The number of balls in the tree. Default is 15. |
ballscolor |
The colors to be used for the balls in the tree. It must be
a vector with names of colors included in |
seed |
Seed for reproducibility of the card. Default is |
A Christmas card plot including a christmas tree.
Jose Barrera-Gomez.
xmastreeshape(shape = "oval", language = "catalan", ballscolor = "blue") xmastreeshape(shape = "vshaped", nballs = 15, ballscolor = c("sienna2", "yellow2", "tomato"), seed = 1111) xmastreeshape(shape = "columnar", nballs = 20, ballscolor = "red")xmastreeshape(shape = "oval", language = "catalan", ballscolor = "blue") xmastreeshape(shape = "vshaped", nballs = 15, ballscolor = c("sienna2", "yellow2", "tomato"), seed = 1111) xmastreeshape(shape = "columnar", nballs = 20, ballscolor = "red")
A random wire Christmas tree (created in 2021).
xmastreewire( year = 2022, language = c("english", "spanish", "catalan"), seed = NULL )xmastreewire( year = 2022, language = c("english", "spanish", "catalan"), seed = NULL )
year |
Year to be printed. Default is |
language |
Language to be used in the card. One of |
seed |
Seed for reproducibility of the card. Default is |
A Christmas card plot including a random wire tree.
Jose Barrera-Gomez.
xmastreewire(year = 2020, language = "catalan", seed = 666)xmastreewire(year = 2020, language = "catalan", seed = 666)