Write a program to properly compute bresenhamsline

Assignment Help Programming Languages
Reference no: EM131372803

Assignment 1. Total 10 marks. Questions are deliberately not weighted, because I want to see how well people do with them and I'll adjust weighting based on that.

For all parts you should use screenshots and provide a text description of your testing and tell me what you think works. If I cannot run things at home you may need to show me your program running in my office on a laptop or provide a video.

Part 1: Largely based on lab1. Create a program (WebGL, OpenGL, or DirectX) that creates a series of random 2D or 3D objects about 5-10 is probably good but you may need more or less to see what you're doing, they should wrap around the edges of the screen (both top and bottom and sides).

Objects should randomly translate, scale, rotate, and shear (though not all at once generally) and preserve this state as they move around. Don't pick values that are so crazy you can't see any of this happening on screen. Randomly colour them as well. Shear doesn't really do anything visible to certain shapes (basically anything sphereish).

Note: Don't try and handle collisions between objects. The hard part is making them wrap.

Part 2: Write a program to properly compute Bresenham'sline drawing algorithm for a 3D line projected onto any of the 4 possible parts of a grid. Format for this question. Assume the input line starts at the origin, and that the grid is no more than from the range (-10: +10) in both X and Y. The user should be able to input a 3D coordinate of form x, y, z, and the program should output which cells will be solid as a list of the form.

(x1, y1)

(x2, y2)

Etc.

This is a math question where you're writing a program to solve it. You can use any programming language you want.

Part 3. Write a program in any language of your choosing that will convert coordinates from Cartesian to barycentric, or barycentric to Cartesian. Assume that you are given A, B, C and P, in one case, or that A, is 0,10, B (0,0) and C (10,0) in the other.

Part 4: This will be based on lab 2. Write a program that creates a fairly large square (say the size of the screen or when in doubt 1920x 1080). Map a 2D image onto that square in 4 different ways. First, centred (leaving a border). Second tiled (basically repeat the mapped image on a grid until it fills up), and lastly stretched or shrunk (e.g. take a 100x100 image and blow it up to full size, or take a really big image and shrink it down). I fully expect that the stretched/shrunk image might look like crap. I don't really care what image you use. I will test it with my own images (and no I won't tell you the dimensions).

Reference no: EM131372803

Questions Cloud

How the get exit string method shown in code 6.7 works : Implement an extension that allows a player to pick up one single item. This includes implementing two new commands: take and drop.
Calculate the revenue-maximizing price-output combination : Calculate the revenue-maximizing price-output combination.  How much are these maximum revenues?  If marginal cost is $30 per hour, calculate prifits at this activity level, assuming TC = MC * Q.Calculate the profit-maximizing price-output combina..
Design a java application to help the management to : TCS is a full time courier and cargo dispatch agency for corporate companies around the world. It mainly deals with delivering and tracking the package delivered. TCS has its annual budget session during the end of year. With all the information prov..
First set of behavioral ideas : You have now been exposed to a first set of "behavioral ideas" and how they differ from standard theory. Think about one behavior (or choice) that you encounter in day-to-day life that seems at odds with your understanding of Neoclassical economic..
Write a program to properly compute bresenhamsline : Write a program in any language of your choosing that will convert coordinates from Cartesian to barycentric, or barycentric to Cartesian. Assume that you are given A, B, C and P, in one case, or that A, is 0,10, B (0,0) and C (10,0) in the other.
Fundamental principles on which the study of economic : In Week 1, students are introduced to the ten fundamental principles on which the study of economics is based. Throughout this course, the students will use these ten principles to better develop their understanding of economics and how society ma..
Describe how security guards should have handled situation : Describe how the security guards and Denny's management should have handled the situation.Explain why the security guards' daytime occupation influenced the decision in the case.Justify the court's decision to neglect this as a case of discrimination..
Refactor your project to introduce a separate player class : Refactor your project to introduce a separate Player class. A Player object should store at least the current room of the player, but you may also like to store the player's name or other information.
Guarantee the reduction of poverty : In defining development to include more than just the growth of per capita income, there is an implicit assumption that such growth alone is not sufficient to guarantee the reduction of poverty and the growth of self-esteem. Is it possible for per..

Reviews

len1372803

1/27/2017 3:40:27 AM

Total 10 marks. Questions are deliberately not weighted, because I want to see how well people do with them and I’ll adjust weighting based on that. For all parts you should use screenshots and provide a text description of your testing and tell me what you think works. If I cannot run things at home you may need to show me your program running in my office on a laptop or provide a video.

Write a Review

Programming Languages Questions & Answers

  Program to compute unit price of items sold

Manager of a Supermarket would like to be able to calculate the unit price of items sold there. To do this the program should input the name and the price of the item.

  Creating message box to display member name

Ddefine for your class is a method to design a message box to display member name, car year and model, and year member joined club.

  Create a very basic calculator map out the numeric keypad

Create a very basic calculator, map out the numeric keypad (17 buttons) and an EditText view. If text is given, prompt the user with a message that complains about the error.

  London underground fire at the kings cross underground

london underground fire at the kings cross underground station on 18 november 1987 a wooden escalator caught fire

  Develop a domain-specific language within ruby

Develop a domain-specific language within Ruby, such as for manipulating files in a directory system, editing files, generating quizzes, describing graphical or geographical scenes, and adding and viewing entries in a calendar.

  Write a program that reads a number in feet

Write a program that reads a number in feet, converts it to meters, and displays the result. One foot is 0.305 meters.

  Write the constructor function makestk

Write the constructor function makestk, predicate function emptystk and mutator functions pushstk and popstk

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Write program which prompts user to enter length in feet

Create and execute the program for this exercise. Write down the program which prompts user to enter length in feet and inches and outputs equivalent length in centimeters.

  Define a class called revenue that has 2 private members

Use public functions of the class in a program that computes RevenueValue and displays RevenueValue when demand is 2000 and price is 2.

  Write program which takes as input arithmetic expression

Write program which takes as input an arithmetic expression. The program outputs whether expression contains matching grouping symbols.

  English sentences into statements of predicate calculus

Translate the following English sentences into statements of predicate calculus. All programmers enjoy discrete mathematics. Some integers are not odd

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