AJYN Graphics Language PLT Project by Group JAYN Jared Kennedy Ananya Das Yaniv Schiller Neel Goyal May 13, 2003.

Slides:



Advertisements
Similar presentations
IT300: Introduction to Computer Graphics
Advertisements

Computer Graphics- SCC 342
Write a program step by step. Step 1: Problem definition. Given the coordinate of two points in 2-D space, compute and print their straight distance.
Working with images and scenes CS 5010 Program Design Paradigms “Bootcamp” Lesson 2.5 TexPoint fonts used in EMF. Read the TexPoint manual before you delete.
Processing Lecture. 1 What is processing?
Flash Animation Using Linear Transformations By Kevin Hunter Kevin Hunter Marcus Yu Marcus Yu.
Image Maps and Graphics Internet Basics and Far Beyond! Mrs. Wilson.
1 Computer Graphics Chapter 7 3D Object Modeling.
WPSM Programming Language A simple language that transform simple data structure into complex xML format Wai Y. Wong Peter Chen Seema Gupta Miqdad Mohammed.
Chapter 5 Sample Development DrawShapes. Sample Development: Drawing Shapes Write an application that simulates a screensaver by drawing various geometric.
Chapter 4 Digital Multimedia, 2nd edition Vector Graphics.
ENDS 375 Foundations of Visualization Geometric Representation 9/30/04.
Graphics Systems I-Chen Lin’s CG slides, Doug James’s CG slides Angel, Interactive Computer Graphics, Chap 1 Introduction to Graphics Pipeline.
Physical Simulation Language: PSL John Hamer John Rodriguez Danian Martinez Taino Ortiz hamer jr534 djm188 tjo22.
3D Rendering with JOGL Introduction to Java OpenGL Graphic Library By Ricardo Veguilla
CS324e - Elements of Graphics and Visualization Java2D Graphics.
1. 2  A computer is a device capable of storing data  in a format suited to the computer,  which is then processed by mathematical manipulation and.
Working with Graphics. Objectives Understand bitmap and vector graphics Place a graphic into a frame Work with the content indicator Transform frame contents.
Minard Saladino By:. Introduction: Illustrator is a vector-based imaging program. Unlike PhotoShop, which deals in pixels (raster images), this one deals.
Adobe InDesign CS5 – Illustrated Unit D: Working with Graphics.
V part 2 Obtained from a Guildford County workshop- Summer, 2014.
3D Concepts Coordinate Systems Coordinates specify points in space 3D coords commonly use X, Y, & Z A vertex is a 'corner' of an object Different coordinate.
1 CMT Fundamentals of Computer Graphics Revision Dr. Xiaohong Gao BG---Room 2C23 Week 11.
3D Objects Subject:T0934 / Multimedia Programming Foundation Session:12 Tahun:2009 Versi:1/0.
10/1/2015© Hal Perkins & UW CSEG-1 CSE P 501 – Compilers Intermediate Representations Hal Perkins Autumn 2009.
An Overview of ActionScript The Powerful Scripting Language of Macromedia Flash.
Week 2 - Wednesday CS361.
Chapter 10: Graphics MATLAB for Scientist and Engineers Using Symbolic Toolbox.
{ Graphite Grigory Arashkovich, Anuj Khanna, Anirban Gangopadhyay, Michael D’Egidio, Laura Willson.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 Going-through.
Tutorial 1 Introducing Adobe Flash CS3 Professional
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 7 The Game Loop and Animation Starting Out with Games & Graphics.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 2 Graphics Programming with C++ and the Dark GDK Library Starting.
Graphics. Graphic is the important media used to show the appearance of integrative media applications. According to DBP dictionary, graphics mean drawing.
Animation Basic Concepts.
Outline §Review of the last class l class variables and methods l method overloading and overriding §Inheritance and polymorphism l polymorphism l abstract.
SVG for Designers Tom Hoferek. Objectives Introduce SVG Illustrate its capabilities Demonstrate SVG in action Speculate, discuss, answer questions.
Introduction to Flash Animation CS 318. Topics Introduction to Flash and animation The Flash development environment Creating Flash animations  Layers.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
Vector Graphics Digital Multimedia Chap 이병희
COP 4620 / 5625 Programming Language Translation / Compiler Writing Fall 2003 Lecture 1, 08/28/03 Prof. Roy Levow.
Digital Media Dr. Jim Rowan ITEC So far… We have compared bitmapped graphics and vector graphics We have discussed bitmapped images, some file formats.
1 Compiler Design (40-414)  Main Text Book: Compilers: Principles, Techniques & Tools, 2 nd ed., Aho, Lam, Sethi, and Ullman, 2007  Evaluation:  Midterm.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
SVG and Geometry Education Xun Lai. SVG is XML SVG is an application language of XML; therefore, all general XML syntax rules apply to SVG documents.
Subject Name: Computer Graphics Subject Code: Textbook: “Computer Graphics”, C Version By Hearn and Baker Credits: 6 1.
1 A Basic Introduction to Flash. Outline What is a flash? Macromedia Flash MX 2004 Flash concepts Flash Demos Conclusion Additional help 2.
The Model of Compilation Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
CS COMPUTER GRAPHICS LABORATORY. LIST OF EXPERIMENTS 1.Implementation of Bresenhams Algorithm – Line, Circle, Ellipse. 2.Implementation of Line,
Handle By, S.JENILA AP/IT
CISC 110 Day 3 Introduction to Computer Graphics.
Creating Vectors – Part One 2.02 Understand Digital Vector Graphics.
C H A P T E R T W O Linking Syntax And Semantics Programming Languages – Principles and Paradigms by Allen Tucker, Robert Noonan.
Compiler Construction CPCS302 Dr. Manal Abdulaziz.
Mohammed AM Dwikat CIS Department Digital Image.
IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM D IGITAL S TILL I MAGES Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny Winter.
Chapter 7 Vector Editing © 2013 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website,
CPCS 391 Computer Graphics Lab One. Computer Graphics Using Java What is Computer Graphics: Computer graphics are graphics created using computers and,
Main characteristics of Vector graphics  Vector graphics provide an elegant way of constructing digital images (diagrams, technical illustration and.
Kapi’olani Community College Art 258 Interface Programming II In-class Presentation Week 1A.
Introducing Macromedia Flash 8
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
SMIL and SVG Digital Multimedia, 2nd edition
Chapter 7 Vector Editing
Digital Media Dr. Jim Rowan ITEC 2110.
Introduction to Computer Graphics
Creating Vectors – Part One
Compiler Construction
Creating Vectors – Part One
Presentation transcript:

AJYN Graphics Language PLT Project by Group JAYN Jared Kennedy Ananya Das Yaniv Schiller Neel Goyal May 13, 2003

AJYN Features A simple graphics language to model animations. Compilation outputs to swf format and plays using any Flash player. Simple model of computation allows for quick learning and easy use.

Basic Graphics Overview Graphics primitives: Points Lines Rectangles Ellipses Polygons Transformations: Translations Rotations Scales

Language Functionality Additional AJYN features: Grouping: Groups together various graphics primitives to be transformed and animated as a single unit. Hiding objects: By declaring a given object invisible over a set period of frames, it can be hidden temporarily from the scene without needing to instantiate a new object.

AJYN Syntax Initializing a program: Program name = screen width, screen height, total frames; Declaring objects: point id = x coordinate, y coordinate; line id = x1 coord, y1 coord, x2 coord, y2 coord; rect id = upper-left x, upper-left y, rect width, rect height; ellipse id = center x coord, center y coord, x radius, y radius; poly id = x1 coord, y1 coord, x2 coord, y2 coord, …; Grouping: group id = obj1, obj2, …objN, x coord, y coord;

AJYN Syntax cont… Transforming Objects: translate(id, new x pos, new y pos, start frame, stop frame); rotate(id, rotation degrees, start frame, stop frame); scale(id, scale size, start frame, stop frame); Hiding Objects: setInvisible(id, start frame, stop frame); Comments: AJYN only supports commenting of single lines Comments are denoted by //

Compilation Process Source ANTLR IR File Backend Application including Ming API SWF (“SWIFF”) Output

Abstract Syntax Tree The AST for out language is a linked list containing the elements that go into creating the animation. It has the follow structure: Program node Object node Groups node Functions node Visibility node Contains info declared in the Program command Contains a vector holding shapes with an ID number and other object parameters Contains a vector of nodes that contain group ID numbers along with a vector of object IDs Contains a vector of transformation nodes that act on objects referenced through their IDs Contains information about visibility of an object from frame to frame

Intermediate Representation Corresponding IR file: Example Code: Program Clock = 500, 500, 2160; ActiveColor = 0, 0, 255; line L1 = 250, 250, 250, 150; ActiveColor = 255, 255, 255; line L2 = 250, 250, ; ActiveColor = 0, 255, 0; line L3 = 250, 250, 250, 50; ActiveColor =255, 255, 255; line L4 = 250, 250, 250, 450; ActiveColor = 255, 0, 0; ellipse E1 = 250, 250, 200, 200; group hours = L1, L2, ; group minutes = L3, L4, 250, 250; rotate(minutes, 4320, 0, 2160); rotate(hours, 360, 0, 2160);

Backend Compilation Our point was not to reinvent the wheel, it was to make animations easy to use. Ming, an open source project located on Sourceforge, replaced Macromedia in creating an open source API for swf files. Ming, written in C, comes with extensions for Java, PHP and C++. AJYN uses this source to compile the actual animation file. Ming does not handle animations in a simple fashion. Objects must be placed on a frame by frame basis. The backend application accepts a file containing the intermediate representation and produces the animations without the complexities of Ming.

Backend Compilation cont… Basic backend algorithm: For each frame: Show the objects and groups that are visible If animations: Reposition/Resize the affected objects Backend complexities: Swf does not handle ellipses and circles. It only handles Bezier curves. Creating an ellipse requires the conversion from ellipse specifications to a group of curved lines. Issues in making objects disappear, even mid-animation, and then reappear in the correct location.

Sample Source Code //Test Code for a Simple Clock Program Clock = 500, 500, 2160; ActiveColor = 0, 0, 255; line L1 = 250, 250, 250, 150; ActiveColor = 255, 255, 255; line L2 = 250, 250, 250, 350; group hour = L1, L2, 250, 250; ActiveColor = 0, 255, 0; line L3 = 250, 250, 250, 50; //Test Code Continued…. ActiveColor =255, 255, 255; line L4 = 250, 250, 250, 450; group mins = L3, L4, 250, 250; ActiveColor = 255, 0, 0; ellipse E1 = 250, 250, 200, 200; rotate(mins, 4230, 0, 2160); rotate(hour, 360, 30, 2160);

Compiled SWF File The amazing clock