Skip to content

bozkaya6/logo_printer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

logo_printer

In this homework you will develop a system in Python that helps controlling a laser logo printermachine (you can also see it as a part of 3D printer). The machine can be used to engrave somefigures (logos) on a metal or wood surface. The system controls the machine’s laser head.The surface has a grid layout and its size is fized. There are 11x11 dots. Below is an emptysurface with the grid dots.

The laser head can move one grid unit up, down, left and right. By controlling these movementsthe machine can actually engrave a logo on the surface.Your system must implement 3 main user commands. It must accept commands from thestandard inputand write all the output to thestandard output. LOGO logo1 DDRRUL TheLOGOcommand tells the system what movements of the laser head comprises a logo. AfterkeywordLOGOthe user needs to enter a name of the logo as a string with no spaces (in the aboveexample it islogo1) and then the ordered movements of the laser head. To this end, charactersD,U,L, andRare used for down, up, left, and right movements, respectively. For the aboveexample, the head moves down, down, right, right, up and then left. The user may enter asmany logo definitions as needed using theLOGOcommand. You can assume that the user doesnot use any logo name twice. The aboveLOGOcommand outputs the following message

logo1 defined

ENGRAVE logo1 3 8TheENGRAVEcommand controls the laser head to engrave a logo. It expects first the name ofthe logo. This logo must be defined earlier viaLOGOcommand. Next, it expects the x and y-coordinates of the grid dot where the laser head should start engraving. While the first numberis the x-coordinate that designates the row of the grid dot, the second one is the y-coordinatedesignating the column of the dot. The top left-most grid dot is (1,1) and the bottom right-most one is (11,11). For example, the above command engraves the logologo1starting fromthe (3,8) dot on the surface. After theENGRAVEcommand, the system must output the textualrepresentation of the grid surface that shows the engraved logo. Below are the engraved logologo1and its textual representation as the output of above command. Note that in the output,you must use the-character for horizontal engraved lines,|character for vertical engraved lines,and . character for grid dots. The symbolis used to designate the space character.

SAME logo1 logo2 TheSAMEcommand checks whether two logos have the same shape irrespective of their orien-tation. It expects the names of two logos that have been defined earlier viaLOGOcommand.When comparing two logos we are just considering their shapes neither their absolute positionson the surface nor their orientation, i.e., we may turn a logo engraved surface 90◦, 180◦, and 270◦clockwise (or counter-clockwise) when comparing with another logo. The command outputsYesif the two logos match orNootherwise

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages