Programming Language Proposal

Similar documents
Language Reference Manual

egrapher Language Reference Manual

CISC 1600 Lecture 3.1 Introduction to Processing

Blis: Better Language for Image Stuff Project Proposal Programming Languages and Translators, Spring 2017

Blender Animation Editors

How shapes are represented in 3D Graphics. Aims and objectives By the end of the lecture you will be able to describe

Mirage. Language Reference Manual. Image drawn using Mirage 1.1. Columbia University COMS W4115 Programming Languages and Translators Fall 2006

c.def (pronounced SEE-def) Language Reference Manual

+ Inheritance. Sometimes we need to create new more specialized types that are similar to types we have already created.

2. The object-oriented paradigm!

Outline. Properties of Piecewise Linear Interpolations. The de Casteljau Algorithm. Recall: Linear Interpolation

easel Manager Danielle Crosswell dac2182 Language Guru Tyrus Cukavac thc2125 System Architect Yuan-Chao Chou yc3211 Tester Xiaofei Chen xc2364

PYTHON. Values and Variables

Outline. What is semantics? Denotational semantics. Semantics of naming. What is semantics? 2 / 21

Nature of Code. Patrick Dwyer Fall 2005 Week 4 - September 27 th

Solution Notes. COMP 151: Terms Test

LECTURE 4. Announcements

Marking Period 1. Marking Period 2

Defining Classes and Methods

Language Proposal: Mandala


CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 10: OCT. 6TH INSTRUCTOR: JIAYIN WANG

GRAPHICS & INTERACTIVE PROGRAMMING. Lecture 1 Introduction to Processing

WELCOME! (download slides and.py files and follow along!) LECTURE 1

Generating Vectors Overview

Goals: Course Unit: Describing Moving Objects Different Ways of Representing Functions Vector-valued Functions, or Parametric Curves

Then you can create an object like a sphere or a box. A sphere is easy: And here s what you see:

Math 5BI: Problem Set 2 The Chain Rule

The Warhol Language Reference Manual

SCoLang - Language Reference Manual

Laboratory 2: Programming Basics and Variables. Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information

S206E Lecture 22, 5/26/2016, Python and Rhino interface

Programming in the Simple Raster Graphics Package (SRGP)

Ninth Annual University of Oregon Programming Competition

append() function, 66 appending, 65, 97, 296 applications (apps; programs), defined, 2, 296

Pick a number. Conditionals. Boolean Logic Relational Expressions Logical Operators Numerical Representation Binary. CS Conditionals 1

Introduction to Programming Using Java (98-388)

CS 112 Introduction to Programming

Admin. CS 112 Introduction to Programming. Recap: Java Static Methods. Recap: Decomposition Example. Recap: Static Method Example

PhysEx. A scripting language for fast prototyping and minimal effort physics engine development.

Programming revision. Revision tip: Focus on the things you find difficult first.

Reducing Points In a Handwritten Curve (Improvement in a Note-taking Tool)

Three-Dimensional Figures

CPS122 Lecture: From Python to Java last revised January 4, Objectives:

Using Inheritance to Share Implementations

Programmable GPUs Outline

Shadows in the graphics pipeline

Array Basics: Outline. Creating and Accessing Arrays. Creating and Accessing Arrays. Arrays (Savitch, Chapter 7)

B.V. Patel Institute of Business Management, Computer & Information Technology, Uka Tarsadia University

0. Introduction: What is Computer Graphics? 1. Basics of scan conversion (line drawing) 2. Representing 2D curves

PROGRAMMING IN C AND C++:

PART 1 PROGRAMMING WITH MATHLAB

COS 126 Midterm 1 Written Exam Fall 2011

1. Write two major differences between Object-oriented programming and procedural programming?

3D Graphics Programming Mira Costa High School - Class Syllabus,

Goals: Define the syntax of a simple imperative language Define a semantics using natural deduction 1

easel LANGUAGE REFERENCE MANUAL

Outline. The de Casteljau Algorithm. Properties of Piecewise Linear Interpolations. Recall: Linear Interpolation

Grade 6 Math Circles October 16 & Non-Euclidean Geometry and the Globe

Strux. Sophie Stadler srs2231 Manager Millie Yang my2440 Tester. 26 September 2017

Introduction to Concepts in Functional Programming. CS16: Introduction to Data Structures & Algorithms Spring 2017

CSE P 501 Exam 8/5/04

ECE 2400 Computer Systems Programming Fall 2018 Topic 2: C Recursion

CS313D: ADVANCED PROGRAMMING LANGUAGE. Lecture 3: C# language basics II

Outline. Program development cycle. Algorithms development and representation. Examples.

Webtorial: 2-Point Tracking

OPENGL AND GLSL. Computer Graphics

CHIL CSS HTML Integrated Language

[CHAPTER] 1 INTRODUCTION 1

Darrell Bethea May 25, 2011

1 Getting started with Processing

Sprite an animation manipulation language Language Reference Manual

The Drone War. Motivation and Introduction: Project Proposal

COMP Summer 2015 (A01) Jim (James) Young jimyoung.ca

Computer Programming IA

Chapter 19- Object Physics

CISC-124. This week we continued to look at some aspects of Java and how they relate to building reliable software.

Processing/Java Syntax. Classes, objects, arrays, and ArrayLists

Chapter 9 Animation System

The course introduces many of the techniques and technologies employed by modern desktop and enterprise applications, including:

DATA STRUCTURES CHAPTER 1

Object Oriented Programming #10

pygame Lecture #2 (Examples: movingellipse, bouncingball, planets, bouncingballgravity)

Course Description. Audience. Module Title : 20483B: Programming in C# Duration : 5 days. Course Outline :: 20483B ::

- HALF YEARLY EXAM ANSWER KEY DEC-2016 COMPUTER SCIENCE ENGLISH MEDIUM

CS 251 Intermediate Programming Methods and Classes

22c:111 Programming Language Concepts. Fall Types I

Animations involving numbers

Circle inversion fractals are based on the geometric operation of inversion of a point with respect to a circle, shown schematically in Fig. 1.

SCHOOL OF COMPUTING, ENGINEERING AND MATHEMATICS SEMESTER 1 EXAMINATIONS 2015/2016 CI101 / CI177. Programming

VALLIAMMAI ENGINEERING COLLEGE

2/3/2018 CS313D: ADVANCED PROGRAMMING LANGUAGE. Lecture 3: C# language basics II. Lecture Contents. C# basics. Methods Arrays. Dr. Amal Khalifa, Spr17

CS 381: Programming Language Fundamentals

COP 1220 Introduction to Programming in C++ Course Justification

OBJECT ORIENTED SIMULATION LANGUAGE. OOSimL Reference Manual - Part 1

Chapter - 2: Geometry and Line Generations


Grade 6 Math Circles October 16 & Non-Euclidean Geometry and the Globe

College Board. AP CS A Labs Magpie, Elevens, and Picture Lab. New York: College Entrance Examination Board, 2013.

Unit E Step-by-Step: Programming with Python

Transcription:

ART: Animation Rendering Tool Brett Jervey Gedion Metaferia Natan Kibret Soul Joshi baj2125 gym2103 nfk2105 srj2120 COMS W4115 Programming Languages and Translators Programming Language Proposal September 28, 2016 Overview of ART Animation Rendering Tool (ART) is an imperative static programming language that allows the creation of 2D animations. ART will use either OpenGL-OCaml bindings or OCaml s built-in graphics library in order to render and update the visual representations of objects. ART will have, at least, limited object orientation support. We plan to design the syntax of ART to be simple and light, similar to C syntax. The proposal below outlines how we envision ART will function; these plans are open to change. What sorts of Programs are meant to be written in ART? We envision 2D animation programs to be written using ART. Developers utilizing ART will control where objects are drawn and how their movements are simulated(updated). Below are some examples of how ART can be used. 1. To model the planetary system: with the help of ART, a developer can simulate the solar system as well as any hypothetical situation where the physical properties of the sun and the planets (such as mass) are different.

2 2. As an interface to simulate properties of physics: If we consider a physics professor that is trying to simulate the motion of a free falling ball with given mass and gravitational pull, said professor can use ART to simulate the motion of the ball so their students can see the laws of physics in action. The Parts [and what they do] 1. Abstraction: a. Naming via variables: Developer can name values and objects using strings, such as x=1, panda = Circle [size], etc. b. User-defined shape types: Developer can create new types of shapes by defining the number of edges and vectors as well as the arrangement. They can then create objects using their defined shape. However, the will be an existing library of basic shapes. 2. Common Patterns: a. Shapes: Shapes will be defined as object types.there will be a library of predefined shapes.user can create new shapes. 3. Control Structures: a. Loops: i. General Purpose Loops: Support for at least one general purpose looping structure, such as a for loop, or while loop. ii. Specialized Animation Loops: ART will provide animation-specific loops, such as a Time Loop (or Update Loop ), which simulates the passing of units of time in the animation, and updates all the objects in the program at the end of each iteration of the loop. Such specialized loops are designed to allow users to create animations in a simple and efficient manner. b. Conditionals: i. If Else: ART supports If.. Else conditionals similar to C.

3 4. Functions: ART supports C style user-defined functions. These functions will have user-defined return types. ART also supports functions with no return value ( void return type). Users specify the the arguments, including their type, on function declaration. 5. Operators: ART will support the standard arithmetic operators(+, - *, /) for its math types with no overloading. For the unique vector type we plan to support standard vector functions like dot product, magnitude using operator signs we have not decided on yet. Our shape functions are only going to have an operator to allow for linear transformation. The math and vector types will have standard comparison operators like >, <, >= and ==. Shapes will only have an equality operator for comparison because the user will be able to make more meaningful comparisons by comparing the shape s internal variables. 6. Primitives: The primitives of our language can be separated into math types and shape objects. Our math types would include integers, floats and a unique integer or double tuple which we call a vector. These form the backbone of the more arithmetic operations of our language. The shape primitives would be shapes such as lines, points, circles, triangles etc which would form the base for user created shape objects or stand on their own. All shape objects will have their own variables which, at creation, would be their coordinates and variables pertaining to their drawing (color, size, etc) with more specific fields for some shapes(ex. radius for a circle ). The user will have the ability to add their own custom variables into the shape object like mass or velocity which would be one of the inbuilt math types. We would also have a builtin list data structure with a possibility of others data structures as the languages evolves.

4 7. Syntax: The ART language syntax draws from the imperative tradition of C and related languages. An imperative coding style is necessary for writing animations in which the programmer has fine tuned control over the components within. ART also contains some object oriented features to allow the definition of user defined shapes. The constructs for function definition, variable declaration, etc. closely mirror that of C. However, in situations where more convenient and intuitive syntax can be applied, we have dropped the C equivalent. For instance, vector norms, tuple assignments etc follow a more pythonic coding style (See Example). There also special naming conventions for core functions that come with the language. 8. User Inputs: The core language doesn t provide facilities for accepting user inputs as programs written in ART are intended to run mathematically modelled simulations. If time permits however, we hope to add extensions for file IO and keyboard access. The file extension would allow programs to read definitions of shapes specified in configuration files. And Keyboard access would allow users to control and tweak the properties of shapes being animated. This is also enables users to write basic 2D games. Sample Source Code Below is a source code that we think will resemble ART s syntax and functionalities. We have also included an example of how the rendered animation will look like. =========================================================================== = void mystepper(shape obj, Vector acc, double dt): obj.x += obj.v*dt obj.v += acc*dt double grav_acc(vector loc1, Vector loc2):

5 main: return G/ loc2 loc1 **2 Disc earth = {r = 1, color=blue} Disc sun = {r = 3, color=yellow, fixed="true"} $background_color = black sun.loc = (0,0) earth.loc = (10,0) earth.v = (0,2) timeloop t = 0; t < 40s; dt = 0.01: acc = grav_acc(sun.loc, earth.loc) $updateall(mystepper,acc,dt) # Apply mystepper to all objects =========================================================================== Figure 1 - shows the visual rendition of Earth (Disc earth) and Sun (Disc sun) before the motion begins.