DOC PREVIEW
Columbia COMS W4115 - “Global Shapes” Proposal

This preview shows page 1 out of 4 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

“Global Shapes” Proposal COMS 4115 Programming Languages and Translators Global Shapes is a language that allows users to easily draw various shapes, square, circle, rectangle, ellipse, line, polyline, using latitude and longitude data. Andrew Willouer asw2126 6/3/2009“Global Shapes” Proposal Andrew Willouer asw2126 Jun. 3 2 Introduction Global Shapes is a simple programming language that allows users to easily draw the following two-dimensional shapes, square, circle, rectangle, ellipse, line and polyline, using the geographic coordinate system. The inclusion of polyline allows the use of any irregular shape. Geographic Coordinate System The user must specify the size of the output window. The output window is centered at latitude and longitude and has a height and width in miles. All shape locations are specified using latitude and longitude values which are converted to pixels and displayed in the correct location within the output window. Example, specify a latitude/longitude of 40.47 and 73.58 will draw a shape centered at New York City which will appear in the top left quadrant in the above picture using that was output window. Each shape has the following attributes: name, latitude, longitude, width, color and notes. The name attribute is required and cannot be changed once a shape is created. The latitude and longitude are required and are in the decimal format and control the location of the shape. The width, color and notes are not required. The width attribute controls the width of the line of the shape with default being 1. The color controls the color of the lines of the shape with the default being red. The notes“Global Shapes” Proposal Andrew Willouer asw2126 Jun. 3 3 attribute allows the user to enter a string of text that is associated and displayed next to the shape. Each shape then has some extra attributes such as radius, height, width which are in miles. The compiler will give a warning if a shape will not be displayed in the current output window. Example Code Outputwindow (40.47, 73.58, 200, 200); //Creates an output window centered around New York City //Format for a rectangle--rectangle(name, latitude, longitude, height, length) rectangle(rect1, 40.47, 73.58, 50, 50); rect1.width = 10; //In miles rect1.color = blue; rect1.notes = “This is rectangle around New York City”; //Format for a square--square(name, latitude, longitude, height) square(sqa1, 40.3, 73.5, 50); sqa1.width = 1; sqa1.color = orange; sqa1.notes=”This is a square around New York City”; //Format for a circle--circle(name, latitude, longitude, diameter) circle(cic1, 40, 73, 40); //just going to use the default values for width, color and no notes circle(cic2, 50, 80.88, 50); cic2.color = blue; //Format for a ellipse--ellipse(name, latitude, longitude, height, length) ellipse(ell1, 43.45, 50.43, 50,40); ell1.width = 5; //Format for a line – line(name, starting latitude, start longitude, ending latitude, ending longitude); line(line1, 40.44, 73.30, 44.44, 77.30); line1.color = black;“Global Shapes” Proposal Andrew Willouer asw2126 Jun. 3 4 //Format for a polyline(name, starting lat, start long, next lat, next long, ….. ending latitude, ending longitude); polyline(poly1, 40, 30, 41,31, 42,32, 44.43, 35.44); poly1.notes=”Flight plan for aircraft”; Keywords: square, rectangle, circle, ellipse, line, polyline, width, color, notes, the various colors (blue, red, black, orange etc) Sample Output (Not based on code


View Full Document

Columbia COMS W4115 - “Global Shapes” Proposal

Documents in this Course
YOLT

YOLT

13 pages

Lattakia

Lattakia

15 pages

EasyQL

EasyQL

14 pages

Photogram

Photogram

163 pages

Espresso

Espresso

27 pages

NumLang

NumLang

6 pages

EMPATH

EMPATH

14 pages

La Mesa

La Mesa

9 pages

JTemplate

JTemplate

238 pages

MATVEC

MATVEC

4 pages

TONEDEF

TONEDEF

14 pages

SASSi

SASSi

16 pages

JTemplate

JTemplate

39 pages

BATS

BATS

10 pages

Synapse

Synapse

11 pages

c.def

c.def

116 pages

TweaXML

TweaXML

108 pages

Load more
Download “Global Shapes” Proposal
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view “Global Shapes” Proposal and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view “Global Shapes” Proposal 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?