Presentation is loading. Please wait.

Presentation is loading. Please wait.

-1- Programming Project #1 (Moldels of Computation, Spring, 2001) Due: Section 1: March 1 (Thursday) Section 2 : March 2 (Friday) We know that formal languages.

Similar presentations


Presentation on theme: "-1- Programming Project #1 (Moldels of Computation, Spring, 2001) Due: Section 1: March 1 (Thursday) Section 2 : March 2 (Friday) We know that formal languages."— Presentation transcript:

1 -1- Programming Project #1 (Moldels of Computation, Spring, 2001) Due: Section 1: March 1 (Thursday) Section 2 : March 2 (Friday) We know that formal languages (and their grammars) are directly related to the programming languages. It is well known that some formal languages can be translated into interesting two or three-dimensional fractal figures. In this semester we will implement, so called, L-system simulator (shortly, LSS), which given an L-system grammar, generates a string of the grammar and translate the string into a plant. LSS will be implemented in two parts; part I and part II. This programming assignment is for part I. In this project we develop and implement a software tool that will be used in part II. You should do this project strictly following the guide lines given below. Programs to be implemented: Write a program for each of the following 1 through 4, and keep it in a file. 1. A program which, given a current position P, direction D and length L, draw a straight line of length L from P to direction D. All dimensions are in pixels. 2. A program which, given P, D, and L as above and thickness T and color C, draw a straight line of length L with thickness T and color C from P to direction D. 3. A program which given a number k and the L-system(i.e., the set of rewriting rules) in the handout under the title of "Drawing Plants Using Lindenmayer System“ in a file, generates a string by applying the rewriting rules k times and stores it in an array. 4. A program which, given a string generated by the program that you have developed in part 3 above, draw a tree similar to the one shown in the handout. (You don’t have to draw the numbers on the tree!) Notice that to draw a branch (i.e., a line), you need current position, direction, thickness, and color of the branch. Let penInfo be the set of these data. While drawing a branch if it requires to generate a new branch you store current penInfo in a stack such that you can use it later to complete the old branch by popping it off from the stack when you finish drawing the new branch. (This idea will be explained in more detail in the class.) ** If you need any assumptions, restrictions, etc. that do not contradict to the above guide lines, you may use them for your project, and should clearly describe them in your project report.

2 -2- Programming Project #1 (cont’d) Notice: (a) You may use any programming language (Visual C++ or Java is strongly recommended) that can be compiled in a platform available in RPI campus or on your laptop. You should keep the 4 programs that you have implemented according to the guide lines (1) – (4) above. (b) You should keep in mind that to complete LSS in Project #2 you are supposed to extend the program that you will develop in part 4 above. You should seriously think about the extendibility of your programs when you implement them in this project. (c) Your project will be evaluated by demo. As soon as you complete your project, make an appointment with your instructor for your demo evaluation. Project grade will be based on the following policy: - Completeness (40%), Comprehension (50%), Program documentation(10%). - For every day late, 20% of the maximum grade will be deducted. (d) Only the students who have completed Project #1 will be eligible to do Project #2. (e) This is individual (i.e., not group) project. Hence, it is illegal to make a copy of other student's program. Similar programming projects were given for the last semester class. So there is the possibility that some of the programs float around the campus. Please resist the temptation of making a copy of such programs. To support this policy, sign the attached "Proclamation of Conscience“ and hand in when you do your demo.

3 -3- Proclamation of Conscience March _______, 2001 I firmly proclaim with my conscience that all the programs in my programming project have been implemented by myself. Id__________ Name(print)_______________ (sign)__________


Download ppt "-1- Programming Project #1 (Moldels of Computation, Spring, 2001) Due: Section 1: March 1 (Thursday) Section 2 : March 2 (Friday) We know that formal languages."

Similar presentations


Ads by Google