User Tools

Site Tools


haas:fall2020:unix:projects:icp0

Corning Community College

CSCS1730 UNIX/Linux Fundamentals

Project: IN-CLASS PROJECT (icp0)

Errata

  • any bugfixes or project updates will be posted here

Objective

Ideally, in a demonstration of productive collaboration (ie in a group), devise a solution that automates an indicated process.

Automated Drawing

This project will have you controlling the mouse pointer from a shell script to draw simple shapes and scenes in a paint program.

Tools

The following are tools (or at least manual pages) you may want to ensure familiarity with:

  • xwit(1)
  • xte(1)
  • mtpaint(1)
  • xwininfo(1)
  • xautomation(1)

NOTE: These manual pages are found exclusively on the individual pod machines; lab46 does not have these tools installed.

Ingredients

You will need:

  • two terminals open on the pod machine you are on
  • write the scripts to do the tasks as indicated

Allowances

For this project, you may work individually, or in groups of up to 4 people.

If you choose to perform this project in a group environment, each member needs to play an equal role in accomplishing the required tasks. You may delegate tasks to certain group members, but you need to be able to demonstrate equal participation (and comprehension) by all: each group member should be able to explain with detail any aspect of this project when asked.

Please list all group members at the top of your script.

Background

A big piece inherent to dealing with many resources within a complex computing environment is the automation of tasks.

Requirements

For this project I would like for you to write a series of evolving scripts. The requirements will therefore start at the core and progressively get more involved.

  • Throughout and for this entire project:
    • Be sure to document your steps taken (comments are good)
      • Demonstrate algorithm and logic decisions (why are you doing what you are doing?)
    • Make and have functioning backups of each script, NOT just the final product
  • For starters, write a script that:
    • using xwit(1) and tools from the xautomation(1) suite on the pod systems:
      • moves the mouse pointer to designated locations on the screen
      • issues functional mouse “clicks”
      • put this in a functional script (icp0-0.sh)
  • Once you have that down:
    • using xwininfo(1), incorporate screen size awareness logic
      • obtain the screen width and height to use in your script(s)
    • in a smooth but moderate motion, cause the mouse pointer to move
      • in arbitrary lines from and to different places on the screen
      • to the 4 corners of the screen (a square)
      • a square in the opposite direction
    • put this in a functional script (icp0-1.sh)
  • As we move along:
    • have your script open mtpaint(1)
    • get the program to occupy (as much as opssible), a full screen (one of your two available monitors).
    • using your logic this far, have the mouse cursor
      • “draw” a square
      • “draw” another square, within the first, which is in a different color
    • put this in a functional script (icp0-2.sh)
  • Now to make things more interesting:
    • draw me a circle approximately in the middle of the mtpaint canvas
      • the circle must be drawn as individual points (you cannot use any existing circle/arc/ellipse functionality)
    • “fill” the circle with some color (different from circle circumference color)
    • put this in a functional script (icp0-3.sh)
  • Finally, we're at the last phase of this project. Please have your script:
    • draw me a picture/scene on the screen
    • this picture/scene is subject to your creativity, but it must contain at least:
      • at least three mathematically significant shapes (circles, ellipses, arcs)
      • at least one of some not-made-up-of-purely-90 degree angles shape (triangle, trapezoid, parallelogram)
      • utilize a minimum of four different colors (or shades of color)
      • uses at least three different mtpaint functions in the composition (fill, gradient, erase, etc.)
    • the picture must have a theme or message or depict something
      • a wintry scene, a garage door opener
      • a house, or insane asylum
      • a clown, a vending machine of pre-moistened towelettes
      • a school of fish, a posse of turkeys
      • pot of gold at the end of a rainbow
    • put this in a functional script (icp0-4.sh)

References

Submission

By successfully performing this project, you should have a set of functional icp0-X.sh scripts, each one accomplishing the specified task. Even if you are working in a group, each group member needs to be:

  • listed as a group member in the script
  • submit a copy of all the scripts

To submit this project to me using the submit tool, run the following command at your lab46 prompt:

$ submit unix icp0 icp0-?.sh
Submitting unix project "icp0":
    -> icp0-0.sh(OK)
    -> icp0-1.sh(OK)
    -> icp0-2.sh(OK)
    -> icp0-3.sh(OK)
    -> icp0-4.sh(OK)

SUCCESSFULLY SUBMITTED

You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches.

haas/fall2020/unix/projects/icp0.txt · Last modified: 2018/04/09 13:32 by 127.0.0.1