Skip to content

Instantly share code, notes, and snippets.

@dohyunkim
Created September 2, 2026 00:55
Show Gist options
  • Select an option

  • Save dohyunkim/515870a1f987b820b19e376c4678f337 to your computer and use it in GitHub Desktop.

Select an option

Save dohyunkim/515870a1f987b820b19e376c4678f337 to your computer and use it in GitHub Desktop.
matrix transformation of shading in luamplib
\documentclass{article}
\usepackage{luamplib}
\pagestyle{empty}
\begin{document}
\mpfig
filldraw fullcircle scaled 100 shifted (100,50)
withshadingmethod "linear"
withshadingcolors (red, blue)
withshadingmatrix "shifted (-100,-50) rotated 45 shifted (100,50)"
;
\endmpfig
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment