English

fog: Expressing Motion and Emotion through Function Composition of AI-Generated Code

Human-Computer Interaction 2026-07-08 v1 Computation and Language

Abstract

Motion and emotion are core parts of intelligent, expressive behavior. In this paper, we introduce fog, a function composition framework for implementing and compose motion functions. We demonstrate how fog can be used to express motion and emotion in Heider-Simmel style animations. This code generation framework can help users generate functions for verbs, adverbs, gestures, and emotions to create an open-ended motion vocabulary. It is complemented by an animation editor that helps users refine motion through direct manipulation and dynamically generated UI. We evaluate our approach with a perceptual evaluation, where we test 452 fog-generated animations to see if people can recognize the semantic meaning of the motion. We find that fog's motion functions can be recognized at 68% accuracy, a 2.68x improvement over a chance baseline. In a mixed-methods user study with professionals and novices, we show that fog in interface form can support users with more rapid iteration, exploration, and control.

Cite

@article{arxiv.2607.07952,
  title  = {fog: Expressing Motion and Emotion through Function Composition of AI-Generated Code},
  author = {Vivian Liu and Lydia Chilton},
  journal= {arXiv preprint arXiv:2607.07952},
  year   = {2026}
}