Program that creates a series of random 2d objects

Assignment Help Programming Languages
Reference no: EM13946477

Part 1: Create a program (OpenGL, or DirectX) that creates a series of random 2D objects, (or 3D objects that only move in 2D), about 25 is probably good but you may need more or less and has them move around on the screen, they should wrap around the edges of the screen (both top and bottom).

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.

Note: Do this on a black or white background, don't try and handle collisions between objects. In theory it would  make sense to use a (very) simply application of the painters algorithm and only draw the top one if there is a collision, but that's not very complicated for this, and doesn't add much.

Part 2: Write a program to properly compute Bresenham's line 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. You can assume input values are integers from 0 to 255 inclusive, in the form x, y, z.

Part 4. Write a program where you import a 2D image (you get to pick the image) and you can move the image around the screen with your mouse. I suggest you use same language you used in Part 1.

Part 5: 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: EM13946477

Questions Cloud

How tesco managed the project as part of its is strategy : To what extent do you think the success of this infrastructure project reflects a sound approach to IS strategy development within Tesco? Use the case to demonstrate how Tesco managed this project as part of its IS strategy.
Discuss the impact of computers on business and society : Discuss the impact of computers on business and society. Written in APA format, Four pages in total with the fourth page being the reference page
Determine the ratio of plastic to metal tube : Determine the ratio of plastic to metal tube surface areas needed to transfer the same amount of heat. Determine the ratio of plastic to metal mass associ- ated with the two heat exchanger designs.
What order-up-to level should citw use : If all orders are backlogged and the cost of lost customer goodwill from carrying a single chair on backorder is $20, what order-up-to (base stock) level should CITW use - what order-up-to level should CITW use?
Program that creates a series of random 2d objects : Create a program (OpenGL, or DirectX) that creates a series of random 2D objects, (or 3D objects that only move in 2D), about 25 is probably good but you may need more or less and has them move around on the screen, they should wrap around the edg..
How much interest will be paid under each scenario : How much interest (total) will be paid under each scenario, and should the company borrow now or 1 year from now? Assume the total amount due will be paid when the loan is due in either case.
Previous, or potential future work environment : Prepare an 8-page paper (not including the title and reference pages) that assesses a legal/ethical issue or situation relating to a current, previous, or potential future work environment. Use at least 10 scholarly sources that are suitable for r..
What are real world problems : Roach (2007) asserts that IT departments must work more closely with workers on the factory floor, breaking down barriers that have traditionally divided the two groups. The author suggests ways to do this. Discuss a potential challenge that this ..
Determine the steady-state ball and oil temperatures : Determine the steady-state ball and oil temperatures, and the time needed for the balls to reach a temperature of Th, f 500 K.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write script to get gross sales for each employee by xhtml

Use a one-dimensional array to solve the folloing problem: Write a script (using an array of counters) that obtains the gross sales for each employee through an XHTML form and determines how many of the salespeople earned salaries

  Write css rule to gives all h elements padding

Write down CSS rule which gives all h1 and h2 elements padding of 0.5 ems, grooved border style and margin of 0.5ems. Prepare a layout template which contains header and two columns.

  Calculate the amount of profit and loss

Calculate the amount of profit and loss. Also if Profit then display the smiley face, if loss then display sad face and if break even then confused face.

  Create program to calculate and display number of miles

Create a program to calculate and displays the number of miles per hour over the speed limit that a speeding driver was doing. The program should ask for the speed limit and the drivers speed.

  Give the pseudocode for the enqueue

Show how to implement a queue using two stacks S1 and S2 so that the amortized cost of each operation on the queue is O(1).

  You will have to override some of the step-by-step procedure

Actually the author has not asked you to develop any new page here except that you will need to apply your external style sheet in your Index and Yurts pages done in Assignment 1A.

  Program to compute person earns in a month

Write a program that calculates how much a person earns in a month if the salary is one penny the first day, two pennies the second day, four pennies the third day.

  Identify at least two advantages to using oop

Use the Internet to research the advantages, features, and common examples of OOP and EDP. Note: You may use the Association for Computing Machinery (ACM) Digital Library to support research on the above topics.

  Design electronic submission of assignments from students

This system must manage electronic submission of assignments from students to instructors. It must keep track of which students have submitted assignments and must allow instructors to manage the grading.

  A text string using prompt

A text string, using prompt, either"valid name" or "invalid name",depending on whether the input names fit the required format, which is Last name, first name, middle initial

  Program read weight of package of breakfast cereal in ounces

Write a program which will read the weight of package of a breakfast cereal in ounces and output weight in metric tons as well as number of boxes

  Designing the site links

Company needs to be able to schedule the time of day when the connections are available for replication. Replication should not occur during peak business hours. When designing the site links, which of the following options should you use?

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