Skip to content

Instantly share code, notes, and snippets.

@Observatorio-de-Matematica
Last active January 8, 2024 18:38
Show Gist options
  • Save Observatorio-de-Matematica/3f2d8910fb25ae8453cee3a5d4f745bd to your computer and use it in GitHub Desktop.
Save Observatorio-de-Matematica/3f2d8910fb25ae8453cee3a5d4f745bd to your computer and use it in GitHub Desktop.
/* [wxMaxima batch file version 1] [ DO NOT EDIT BY HAND! ]*/
/* [ Created with wxMaxima version 22.04.0 ] */
/* [wxMaxima: input start ] */
/* Felix as a binary image */
felix:matrix(
[1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1],
[1,1,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1],
[1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1],
[1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,1,1,0,0,1,1,1,1,1],
[1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,0,0,1,1,1,1],
[1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,0,0,1,1,1],
[1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,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1,1,1,1,0,0,0,0,0,0,0,0],
[1,1,1,1,0,0,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1],
[1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,0,1],
[1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,1,1,0,1,1],
[1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1],
[1,1,1,1,1,1,1,0,0,1,1,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,1,1,1],
[1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,0,0,1,0,0,1,1,1,1],
[1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,0,1,0,0,1,1,1,1,1],
[1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1]
)$
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
wxplot_size:[350,350]$
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
wxdraw2d( palette=gray,colorbox=false,proportional_axes=xy,
image(felix,0,0,34,34) );
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
/* Flipping image to the left */
flipfelix:genmatrix(lambda([i,j],felix[i,35-(j-1)]),35,35)$
wxdraw2d( palette=gray,colorbox=false,proportional_axes=xy,
image(flipfelix,0,0,34,34) );
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
/* Transposing the image */
wxdraw2d(palette=gray,colorbox=false,proportional_axes=xy,
image(transpose(felix),0,0,34,34));
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
/* Negative image */
unos:genmatrix(lambda([i,j],1),35,35)$
felixneg:mod(felix+unos,2)$
wxdraw2d( palette=gray,colorbox=false,proportional_axes=xy,
image(felixneg,0,0,34,34) );
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
/* Here a rectangular portion of the image is preserved while the rest is blackened */
Z:zeromatrix(35,35)$
for i:3 thru 12 do (for j:3 thru 30 do (Z[i,j]:1))$
ventana:Z$
felixfiltro:felix * ventana$
wxdraw2d( palette=gray,colorbox=false,proportional_axes=xy,
image(felixfiltro,0,0,34,34) );
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
kitty:matrix(
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1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,0,0,34,34) );
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
/* Dissolve effect as a convex combination */
wxanimate_draw(t,20,
image((1-t/20)*felix + (t/20)*kitty,0,0,34,34),
palette=gray,colorbox=false,proportional_axes=xy),
wxanimate_framerate=5;
/* [wxMaxima: input end ] */
/* Old versions of Maxima abort on loading files that end in a comment. */
"Created with wxMaxima 22.04.0"$
@Observatorio-de-Matematica
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment