Write a program that opens a plotting grid window

Assignment Help Computer Engineering
Reference no: EM132210432

Question :

Write a program that opens a plotting grid window (labeled Lake Matlab) with its axis set to [-11 11 11 11 and the plots a circle of radius 10 with a black point style line.

This will represent the lake in which the boats can move about. Generate randomly (and save the coordinates of eight boats within this lake Repeatedly do the following 40 times:

1. Plot the boats (as diamond points with the following color requirements:

a) A boat whose distance is more than the square root of two from all other boats and whose distance is more than one from all lake boundary (shore) is Green

b) A boat whose distance is more than the square root of two from all other boats but whose distance is one or less from the lake boundary (shore is Magenta

c) A boat whose distance is exactly the square root of two or one from any other boat is Yellow

d) A boat whose distance is exactly zero from any other boat is Red (collision)

2. Delay for 0.5 second.

3. Move each boat on the lake by repeatedly modifying both the x-coord and y-coord by adding a randomly generated Integer in the range [-1, ij, until you have new values for x-coord and y- coord that does not put the boat on the shore.

Reference no: EM132210432

Questions Cloud

What amenities and facilities are important to include : What amenities and facilities are important to include? What considerations need to be attended to as the suburbs grow? (should suburbs even be encouraged)
Write a critical evaluation of the article : Using the University Digital Library or the Google scholar website, locate a peer reviewed article about privacy. Write a critical evaluation of the article.
Which aspects of the roman built environment were borrowed : What is the relationship between ancient Roman architecture and ancient Greek architecture? Using at least three buildings explain which aspects.
Write a program in the language of your choice : Write a program in the language of your choice (prefer C or Java) that will simulate process scheduling
Write a program that opens a plotting grid window : Write a program that opens a plotting grid window (labeled Lake Matlab) with its axis set to [-11 11 11 11 and the plots a circle of radius.
What step can leadership team take to ensure full compliance : You all work in or know of people who work in enterprise IT environments Maintaining the enterprise security posture, legal risk, and security is constantly.
Collect a message from the user and writes it out again : Write a main function (Method,Procedure) that collects a message from the user and writes it out again.
Describe the printmaking method used : Both Albrecht Durer and Rembrandt made numerous prints. See if you can find 3 different PRINT made by one of these artists on the web and upload the jpg image.
Write a program to model a simple calculator : Write a program to model a simple calculator. Each data line should consist of the next operation to be preformed from the list below and the right operand.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Declare numeric subtype that made up of single-digit numbers

Declare a subtype called Item_String that holds 25 characters. Declare a numeric subtype that is made up of the single-digit numbers.

  Make table to be a pointer to pointer of type double

make table to be a pointer to pointer of type double.

  How many independent memory channels should be provided

how many independent memory channels should be provided so the system is not limited by memory bandwidth if the bandwidth required is sometimes twice the average?

  Create a class named order that performs order processing

Create a class named Order that performs order processing of a single item that sells for $19.99 each.

  Difference between x and &x

Suppose x is defined as int x = 5; Explain in your own words what the difference between x and &x.

  Write a program to evaluate polynomials using homers method

Write a program to evaluate polynomials using Homer's method, where the polynomials are represented with linked lists.

  Discuss what are the new innovation today in this area

Virtual Machines: Discuss what are the new innovation today in this area and what effect this area have on the computer field.

  How are network computers different from personal computers

How are network computers different from traditional personal computers? Describe some usage scenarios in which it is advantageous to use network computers.

  Discuss mathematical operators and multiple operations

Write a program which will accept any monthly savings amount, any yearly interest rate and then calculates the balance

  Analyze the characteristics of elastic traffic

Analyze the characteristics of elastic traffic to determine why this is used on the Internet. Provide three examples of inelastic traffic not discussed.

  Create eleven football players using an array

Displays all the information about a team including: name team color, and information on each player in the team and assigns a random score to each team.

  Write the c function itox to convert integer to a hex string

Write the C function itox() to convert an integer to a hex string. Its prototype is described in the header file xbits.h in this directory.

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