Animate

Animate is a programing language that allows users to doodle and create drawings through the use of basic commands that present shapes , colors and movement.

Download as .zip Download as .tar.gz View on GitHub

Motivation

Drawing has been a pastime for people throughout decades, it being a doodle on a notepad or a masterpiece presented on a canvas. Some with more talent or creativity than others but all with the ability to portray some type of feeling or thought. “Animate” is a programing language that allows even the most inexperienced artist to doodle and create their drawings easily as well as make animated mock up stages and scenarios through the use of basic commands that present shapes and colors. Not only can a combination of commands translate to a drawing but movement can be incorporated to objects within the drawing creating a dynamic amination.

“Animate” like any programing language is composed of fundamental aspects such as syntax, semantics, statements and variable components. Designed in a simple non complicated manner that allows all types of people to be able to use it. Users will write their drawing commands in a text editor therefore creating scripts what will later on be parsed and translated to Python code to be compiled and ran, presenting the drawing animation to the user as a final product.

How to use Animate (Video)

Click the image bellow to get a full tutorial on how to use Animate:

Language Reference Manual

The following are the commands and instructions used in “Animate” programming language:

Frame: createFrame(width,height)

*Note: All animation should begin with the creation of a frame. Once frame is created user will receive the following message: “Frame Created”. If frame has not been created and user tries to create a shape the following error message will be presented: "A frame has not been create".

Shapes: Color Identifier Rectangle(x0,y0,x1,y1)

Color Identifier Circle(x0,y0,radius)

Color Identifier Triangle(x0,y0,x1,y1,x2,y2)

Movement: Animate (deltaX,deltaY,iterations, sec)

Image: Image(x0,y0,imageName)

Available colors:

*Note: Shape will be set to white as default if user sets a color that is not stated above and the following message will be presented: "Color is not available, setting color to white".

Reserved Words:

Approach

Translator Architecture:

Animate is composed of 3 main modules; Animate_lex, Animate_parser and Window Creator. Animate parser being the main focus of the programming language since within this module the main program is ran, and the user input commands are received. User input is then parsed by Yacc using the PLY library which uses python functions stated by the developer. These functions define grammar characteristics of the language. Yacc parser must match the functions found in Animate_parser module with the code entered by the user through the consideration of specific tokens defined in the Animate_Lex module. These tokens are composed of token name and regular expression needed to match and compare user input within the Animate language. Finally the WindowsCreater module is called to execute input instruction using specific python functions.

In addition to the three main modules, “Animate” language uses the following libraries, packages and modules:

PLY- is a parsing tool written purely in Python which re-implements the Lex and Yacc originally found in C language. It provides excellent debugging and error reporting facilities and it uses LR parsing to incorporate large grammars. Both Animate_lex and Animate_Parser use this library.

Tkinter - is a Graphical User Interface (GUI) package for python used in the WindowCreater module to provide user with a visual element.

Time - is a module that provides various functions that deal with time and dates within a day. This module is specifically used to support the animate command.

Documentation

Animate FinalReport

Authors and Contributors