Createaprogramopenglordirectxthatcreatesaseriesofrandom


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).

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Createaprogramopenglordirectxthatcreatesaseriesofrandom
Reference No:- TGS01255773

Expected delivery within 24 Hours