User Tools

Site Tools


haas:spring2011:hpc0:projects:automated_drawing

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.

Prerequisites

There are no prerequisites for this project. You can just get started.

Ingredients

You will need:

  • Working Linux Desktop (classroom student machines will do)
  • Access to a dual-screen workstation
  • Access to a video wall

Allowances

For this project, you may work individually, or in groups of up to 2 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 by all, and each group member should be able to explain with detail any aspect of this project when asked.

You will need to let me know the group members before embarking on this project, so that I can enable wiki permissions.

Background

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

In UNIX/Linux Fundamentals, we spent a considerable amount of time on Shell Scripting, automating simple and more involved tasks.

Here we will be extending that concept one step further.

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
    • Illustrate algorithm and logic decisions in the accomplish of each script
    • Make and have functioning backups of each script, NOT just the final product
    • display the scripts in-line in your wiki documentation
    • adequately document each script to explain what is going on
  • For starters, write a script that:
    • using xwit and tools from the xautomation suite on the LAIR student systems
    • moves the mouse pointer to designated locations on the screen
    • issues functional mouse “clicks”
    • show me the working script
    • show me the wiki documentation illustrating how to do this
  • Once you have that down
    • using xwininfo, incorporate screen size awareness logic
    • 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
    • show me the working script
    • show me the wiki documentation illustrating how you accomplished this step
  • As we move along
    • have your script open xpaint
    • place the toolbox in the top left of the screen
    • open a new canvas covering the rest of the screen
    • using your logic this far, have the mouse cursor
      • “draw” a square
      • “draw” another square, within the first, which is in a different color
    • show me your working script
    • show me the wiki documentation illustrating how you accomplished this step
  • Now to make things more interesting
    • draw me a circle approximately in the middle of the screen
    • “fill” the circle with some color
    • test your screen dimension auto-detect logic by trying it:
      • on a dual-head system
      • on a video wall (either the LAIRwall or one of the project video walls)
    • show me your working script on two different dimensioned screens
    • show me the wiki documentation illustrating how you accomplished this step
  • 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:
      • 3 mathematically significant shapes (circles, ellipses, arcs)
      • use some not-made-up-of-purely-90 degree angles (triangle, trapezoid, parallelogram)
      • utilize a minimum of 4 different colors (or shades of color)
      • uses 3 xpaint functions in the composition (fill, gradient, erase, etc.)
    • the picture must have a theme or message or depict something
    • test your composition drawing script on:
      • 2 different screen dimensions
    • show me your finished script on two different dimensioned screens
    • show me the finished wiki documentation for this entire project

References

haas/spring2011/hpc0/projects/automated_drawing.txt · Last modified: 2011/01/24 01:58 by 127.0.0.1