[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-85033-en":3,"doc-seo-85033-105":29,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":13,"seo_description":14,"update_tm":27,"read_time":28},85033,1374391975076,"Riley","https://ap-avatar.wpscdn.com/avatar/14000253ca4ec9f6853?x-image-process=image/resize,m_fixed,w_180,h_180&k=1783305029341752051",6,"Technology","Fog: Expressing Motion and Emotion through Function Composition of AI-Generated Code","Motion and emotion form essential components of intelligent, expressive behavior. The paper introduces fog, a function-composition framework for implementing and composing motion functions that represent verbs, adverbs, gestures, and emotions. fog enables motion and emotion expression in Heider-Simmel style animations and supports open-ended motion vocabulary creation. An accompanying animation editor supports direct manipulation and dynamically generated UI. Perceptual evaluation of 452 animations shows 68% semantic recognition accuracy, and a mixed-methods study indicates faster iteration and control.","fog: Expressing Motion and Emotion through Function Composition of AI-Generated Code  \nVivian Liu  \nColumbia University New York, USA [vivian@cs.columbia.edu](vivian@cs.columbia.edu)  \nLydia Chilton  \nColumbia University New York, USA [chilton@cs.columbia.edu](chilton@cs.columbia.edu)  \narXiv :2607 .07952v 1 [ cs .HC] 8 Jul 2026  \nFigure 1: Infog, users utilize LLMs to generate motion and emotion functions by implementing class definitions for verbs, adverbs, emotions, and gestures. These functions can compose with each other and act over an entity’s internal and external state (energy, velocity, collision, paths) to show behavior. The examples show social motion (chase), motion decoration (aggression), and emotionally-expressive motion (anger), and social dynamics (loneliness and belonging).  \nAbstract  \nMotion 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  \nPermission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission [and/or a fee. Request permissions from permissions@acm.org](and/or a fee. Request permissions from permissions@acm.org).  \nUnder Submission, New York, NY  \n© 2026 Copyright held by the owner/author(s) . Publication rights licensed to ACM. ACM ISBN 978-1-4503-XXXX-X/2018/06  \n[https://doi.org/XXXXXXX.XXXXXXX](https://doi.org/XXXXXXX.XXXXXXX)  \ncan be recognized at 68% accuracy, a 2.68x improvement over a chance baseline. In a mixed-methods user study with professionalsand novices, we show that fog in interface form can support users with more rapid iteration, exploration, and control.  \nCCS Concepts  \n• Human-centered computing → Natural language interfaces; User interface programming; • Applied computing → Media arts; Psychology.  \nKeywords  \nmotion, emotion, animation, function composition, generative AI, code generation, human-AI interaction, Heider-Simmel, generative user interfaces  \nACM Reference Format:  \nVivian Liu and Lydia Chilton. 2026. fog: Expressing Motion and Emotion through Function Composition of AI-Generated Code. In Proceedings of (Under Submission). ACM, New York, NY, USA, 9 pages. [https://doi.org/](https://doi.org/)[ ](https://doi.org/)XXXXXXX.XXXXXXX  \n1 Introduction  \nMotion is emotion without the ‘e’. As people, we tend to interpret meaning, intentionality, and animacy from things that move. This has been well established in cognitive science. In 1944, Heider and Simmel [9] ran a famous psychology experiment using an animation where three shapes played out a series of events. They found that even when the animation ran without sound or words, participants still described a story of love, joy, fight, and chase. This experiment showed that motion alone can narratively express emotions and social dynamics.  \nHowever, it ishard to animate emotion and social dynamics. Even simple moments are hard to get right. How do you make something ","cbCairABDZ5Watj0","https://ap.wps.com/l/cbCairABDZ5Watj0","pdf",1506127,1,9,"English","en",105,"# Introduction\n## Background: Heider-Simmel and motion as narrative\n## Challenge: Controlling emotion and social dynamics in animation\n## Goal and approach: Bridging symbolic storytelling with motion semantics\n## Framework overview: fog and function composition","[{\"question\":\"What is the fog framework proposed in the paper?\",\"answer\":\"fog is a function-composition framework for implementing and composing motion functions that encode semantic meanings for verbs, adverbs, gestures, and emotions.\"},{\"question\":\"How does the paper evaluate whether people can understand fog-generated animations?\",\"answer\":\"The paper runs a perceptual evaluation on 452 fog-generated animations and measures whether participants can recognize the semantic meaning of the motion.\"},{\"question\":\"What user-study findings support the usefulness of fog beyond recognition accuracy?\",\"answer\":\"A mixed-methods study with professionals and novices shows that providing fog through an interface helps users iterate, explore, and control motion more rapidly.\"}]",1784200516,23,{"code":4,"msg":30,"data":31},"ok",{"site_id":24,"language":23,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":27},"fog-expressing-motion-and-emotion-through-function-composition-of-ai-generated-code","",{"@graph":35,"@context":85},[36,53,68],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,50],{"item":40,"name":41,"@type":42,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":49},"https://docshare.wps.com/document/technology/",3,{"item":51,"name":13,"@type":42,"position":52},"https://docshare.wps.com/document/fog-expressing-motion-and-emotion-through-function-composition-of-ai-generated-code/85033/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":40,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-17","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What is the fog framework proposed in the paper?","Question",{"text":75,"@type":76},"fog is a function-composition framework for implementing and composing motion functions that encode semantic meanings for verbs, adverbs, gestures, and emotions.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"How does the paper evaluate whether people can understand fog-generated animations?",{"text":80,"@type":76},"The paper runs a perceptual evaluation on 452 fog-generated animations and measures whether participants can recognize the semantic meaning of the motion.",{"name":82,"@type":73,"acceptedAnswer":83},"What user-study findings support the usefulness of fog beyond recognition accuracy?",{"text":84,"@type":76},"A mixed-methods study with professionals and novices shows that providing fog through an interface helps users iterate, explore, and control motion more rapidly.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,110,113,118,123,127,130,134],{"id":20,"doc_module":4,"doc_module_name":45,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":45,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":45,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":111,"slug":112},50,"technology",{"id":114,"doc_module":4,"doc_module_name":45,"category_name":115,"show_sort_weight":116,"slug":117},7,"Healthcare",40,"healthcare",{"id":119,"doc_module":4,"doc_module_name":45,"category_name":120,"show_sort_weight":121,"slug":122},8,"Research & Report",30,"research-report",{"id":21,"doc_module":4,"doc_module_name":45,"category_name":124,"show_sort_weight":125,"slug":126},"Religion & Spirituality",20,"religion-spirituality",{"id":125,"doc_module":4,"doc_module_name":45,"category_name":128,"show_sort_weight":125,"slug":129},"World Cup","world-cup",{"id":131,"doc_module":4,"doc_module_name":45,"category_name":132,"show_sort_weight":131,"slug":133},10,"Lifestyle","lifestyle",{"id":135,"doc_module":4,"doc_module_name":45,"category_name":136,"show_sort_weight":106,"slug":137},19,"General","general"]