JIAYIN (KAY) LU 卢嘉茵
Applied Mathematician & Computational Artist & Freelance Photographer
Developing New Course for UCLA Mathematics, to be offered in 2026:
Math + Code + Art
Co-developers (mentees): Shanmei Wanyan, Hanyin Coco Zhang, Juhao Jia, Weimo Zhu, Tucker Nielson
Co-Faculty Advisors: Dr. Ying Jiang, Prof. Michael Andrews

Figure: Materials developed by my mentees for the new Math + Code + Art course, to be offered in 2026 at the UCLA Department of Mathematics.
(1) Spirograph generation, by Junhao Jia.
(2) Music spectrogram to color mapping, by Coco Hanyin Zhang.
(3) Neural network producing artistic effects on an image based on music, by Shanmei Wanyan.
(4) Style transfer optimization, by Weimo Zhu.
At UCLA, I am currently mentoring undergraduate students in developing a new interdisciplinary
course for the Department of Mathematics, Math + Code + Art, to be offered in 2026. The course aims
to inspire students to appreciate the beauty of mathematics and the power of computation through the
lens of art.
The figure above shows several of the topics we are developing. Students will first learn to write Python classes that generate Spirograph patterns (plot (a)). They will then take a piece of music as input, extract and analyze its frequency and intensity time-series data, and experiment with mathematical functions that map the music to RGB colors (plot (b)). As the music plays, students can generate dynamic paintings
where the brushstrokes follow the Spirograph trajectory and the colors evolve in time with the sound.
After exploring these classical algorithms and data analysis components, students will move on to
applying machine learning techniques to artistic creation. As illustrated in plot (c), they will build
a simple neural network from scratch, train it to generate artistic effects guided by music, and create
animations that dynamically respond to musical input. This trained network replaces direct color-mapping functions and introduces a learning-based approach to translating music into color and visual form.
Finally, students will implement their own style-transfer pipeline (plot (d)) to apply artistic textures and
visual styles to the completed music paintings.
By introducing these topics, I want students to see how ideas from different approaches—classical,
data-driven, and learning-based—can come together to create art.