top of page

Developing New Course for UCLA Mathematics, to be offered in 2026:
Math + Code + Art

github_icon.png

Co-developers (mentees): Shanmei Wanyan, Hanyin Coco Zhang, Juhao Jia, Weimo Zhu, Tucker Nielson, Meichen Wan, Dengyuhan Dai

Co-Faculty Advisors: Dr. Ying Jiang, Prof. Chenfanfu Jiang, Prof. Michael Andrews

Spirograph music drawing generation, by Junhao Jia.

Spirograph music drawing generation, with dynamics and collision detection, by Junhao Jia.

Neural network producing artistic effects on an image based on music, by Shanmei Wanyan.

Visualizing music with random walk and neural networks, by Shanmei Wanyan and Coco Hanyin Zhang.

all.png

Figure: Materials developed by my mentees for the new Math + Code + Art course, to be offered in 2026 at the UCLA Department of Mathematics.

     (a) Spirograph generation, by Junhao Jia.

     (b) Music spectrogram to color mapping, by Coco Hanyin Zhang.

     (c) Neural network producing artistic effects on an image based on music, by Shanmei Wanyan.

     (d) Style transfer optimization, by Weimo Zhu.

     (e) Voronoi mosaic art, by Tucker Nielson.

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.

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.

Some other topics that will be included are: 

   -  Style-transfer (plot (d)) to apply artistic textures and visual styles to an image.

   -  Voronoi mosaic art (plot (e))

   -  Photo collage from a dataset of photos

   -  Traveling salesman point art

bottom of page