Develop an animated application

Assignment Help Computer Graphics
Reference no: EM13333349

In this assignment you will develop an animated application that uses linked lists as the basis of the implementation. This application builds on the application that you worked with for tutorial 3.

Go to Stream and download the files

caterpillar.py

my_catclass.py

Set up a new project in Eclipse and add these files to it.

caterpillar.py is a program that implements the beginnings of a simple graphical animation. When you run this program, you will see a screen, 1000 pixels wide by 400 pixels high, displaying a basic background scene with a 'caterpillar' anchored at random location. To begin with, the caterpillar just has a face, no body parts.

Similar to the application that you worked with in tutorial 3, on each iteration of the main program loop we check to see if the user wants to quit, or if he has pressed the spacebar, or one of the 'm', 'd' or 's' keys, each of which initiates a different response (full functionality is described later.) After that, we update the screen by redrawing the background scene and the caterpillar. The drawing methods for the background and the caterpillar have been provided for you.

The module my_catclass.py, which is imported into caterpillar.py, implements a linked list based implementation for a caterpillar object. The caterpillar class is expanded from the class used in the tutorial.

Now, a caterpillar consists of the following components:

  1. face_xcoord and face_ycoord - horizontal and vertical coordinates for the face. These coordinates are used by the draw_face(screen) method to give the location of the top left boundary of the graphic that represents the caterpillar's face.
  2. body - a reference to a segment_queue object. A segment_queue is a linked list of body_segment nodes that makes up the caterpillar's body. A segment_queue has head and last references, just like the Improved linked Queue class shown in lectures. A body_segment(x, y) object consists of x and y coordinates, giving the location of the top left boundary of the graphic representing the segment; and a reference to the next body_segment in the list.
  3. travel_direction - a string representing the current direction of travel for the caterpillar, either 'left' or 'right'.
  4. food - a reference to a food_list object. A food_list is a linked list of food_item nodes that makes up the caterpillar's food. A food_item(x, y, kind) object consists of a string representing the foodtype, either 'nice' or 'nasty'; x and y coordinates, giving the location of the top left boundary of the graphic representing the item; and a reference to the next fooditem in the list.

Reference no: EM13333349

Questions Cloud

Compute the ratio of income taxes to income earnings : Which is the largest expense for each company in the most recent year? What is its dollar amount? Is it logical that this would be the largest expense given the nature of each company's business? Explain your answer.
Determine what is the break-even quantity per unit : Shapland Inc. has fixed operating costs of $350,000 and variable costs of $60 per unit. If it sells the product for $70 per unit, what is the break-even quantity
Explain how reported accounting numbers might affect : Explain how reported accounting numbers might affect an individual's perceptions and actions. Cite two examples.
Develop an animated application : In this assignment you will develop an animated application that uses linked lists as the basis of the implementation. This application builds on the application that you worked with for tutorial 3.
What would be the total increase in the gdp : Given an increase in spending of $1,000, and a Marginal Propensity to Consume of 80% (8/1 0), what would be the total increase in the GDP (as a result of the Multiplier?) What would the Multiplier be? Show your work.
Determine what is the companys cost of equity capital : David Ortiz Motors has a target capital structure of 45% debt and 55% equity. The yield to maturity on the company's outstanding bonds is 9%, and the company's tax rate is 40%.
Divorce case knowledge that the wife is pregnant : Under our statue requiring that a petition disclose whether there are any children under ages of 16, making it obligatory upon the court to make such orders respecting custody and support as is best for the child or children, is an attorney guilty of..
Financial reporting environment for the quarter : Prepare a 2 page newsletter that identifies and summarises developments and changes in the financial reporting environment for the quarter from January to March 2013.

Reviews

Write a Review

Computer Graphics Questions & Answers

  Potential multimedia presentation

Create a short description of a potential multimedia presentation that could be implemented across the WWW for a particular subject of interest to you.

  Organized to focus more on organizational

As you probably have noted, this course is organized to focus more on organizational and enterprise level issues than on individual or group behavior. There are other courses in the program that allow you the opportunity to reflect on lower le..

  Write a class that models a girl scout cookie seller

Starting with the program below, you are going to fill in the student class so that it can be reused in a GUI later. Complete, this and then create a Frame, that adds a Panel which should contain three text fields, a button and a label.

  Relative positioning and interactive positioning

Relative Positioning and Interactive Positioning by Dragging and Clicking and some Simple Animation

  Question about troubleshooting problem

Consider the most difficult troubleshooting problem you have encountered in your recent experience- one where the solutions was not straightforward

  Discuss website design basics

Juan arrived the end of his online course program. His family was so proud of him. Juan's wife wish to throw a party to celebrate Juan's online graduation together with all of his family, and started planning the special event.

  Find spanning tree of g with maximum number of vertices

Given an undirected graph G = (V, E). Find a spanning tree of G with the maximum number of vertices that have degree 1. Show that this problem is NP-complete.

  Show the matrix and the starting points

you do not need to show matrix math calculations, but you should show the matrix and the starting points and the results for each geometric transformation.

  Opengl assignment using c++

This is an OpenGL assignment using C++. Work on a particle and mesh visualization tool. Data: Consider a point cloud as input data. Every point is described by a position p = (x, y, z) and a data value d = (d0,d1,d2).

  Is lesson age-appropriate

Using the Technology Integration Matrix, or theArizona Technology Integration Matrixchoose two different lessons for the grade level (K-5, 6-8, 9-12) you are becoming certified in.

  Ethernet equipment to modernize the network

An older network using ten baseT technology needs an upgrade. The network haves a total of 220 workstations and ten servers and has a network diameter of three-hundred meters.

  Network design based question

Suggest a network design for a customer that has fifty remote locations in addition to a central headquarters. Half of the remote locations are needed to connect or stay on line with central headquarters.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd