当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
AniFrame: A Programming Language for 2D Drawing and Frame-Based Animation
arXiv - CS - Programming Languages Pub Date : 2024-04-16 , DOI: arxiv-2404.10250
Mark Edward M. Gonzales, Hans Oswald A. Ibrahim, Elyssia Barrie H. Ong, Ryan Austin Fernandez

Creative coding is an experimentation-heavy activity that requires translating high-level visual ideas into code. However, most languages and libraries for creative coding may not be adequately intuitive for beginners. In this paper, we present AniFrame, a domain-specific language for drawing and animation. Designed for novice programmers, it (i) features animation-specific data types, operations, and built-in functions to simplify the creation and animation of composite objects, (ii) allows for fine-grained control over animation sequences through explicit specification of the target object and the start and end frames, (iii) reduces the learning curve through a Python-like syntax, type inferencing, and a minimal set of control structures and keywords that map closely to their semantic intent, and (iv) promotes computational expressivity through support for common mathematical operations, built-in trigonometric functions, and user-defined recursion. Our usability test demonstrates AniFrame's potential to enhance readability and writability for multiple creative coding use cases. AniFrame is open-source, and its implementation and reference are available at https://github.com/memgonzales/aniframe-language.

中文翻译:

AniFrame:用于 2D 绘图和基于帧的动画的编程语言

创意编码是一项实验性很强的活动,需要将高级视觉创意转化为代码。然而,大多数用于创意编码的语言和库对于初学者来说可能不够直观。在本文中,我们提出了 AniFrame,一种用于绘图和动画的领域特定语言。它专为新手程序员设计,(i) 具有动画特定的数据类型、操作和内置函数,以简化复合对象的创建和动画,(ii) 允许通过明确指定动画序列来对动画序列进行细粒度控制。目标对象以及开始和结束帧,(iii) 通过类似 Python 的语法、类型推断以及与其语义意图紧密映射的最小控制结构和关键字集来缩短学习曲线,以及 (iv) 提高计算表达能力通过支持常见的数学运算、内置三角函数和用户定义的递归。我们的可用性测试证明了 AniFrame 在增强多个创意编码用例的可读性和可写性方面的潜力。 AniFrame 是开源的,其实现和参考可在 https://github.com/memgonzales/aniframe-language 上找到。
更新日期:2024-04-17
down
wechat
bug