C++ Programming
Create a vector of Point structs. The vector should contain all the points from (1,1) to the bounds... ie (1,1) (1,2) (2,1)...
INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS
perlin noise is a technique to generate textures (and landscapes) using gradient noise. The textures will be "random" but pixel values change in a gradient manor. Ken Perlin won an Academy Award for his algorithm.
The dcurses library gives us the ability to draw colors to the screen and Perlin noise gives us texture information! We will display a Perlin noise image in the terminal using the 24 colors of grayscale in the ANSI pallet (colors 232-255).
In order to speed up our computation time we will use threads to calculate different parts of the texture in parallel.
Your README should include an analysis of how the number of threads increases or decreases the runtime. Is there a point where more threads runs slower? List out multiple trials (runs) for different numbers of threads.
Implementation
The easiest path to getting the most points might be:
- Create a vectorof Point structs. The vector should contain all the points from (1,1) to the bounds... ie (1,1) (1,2) (2,1)...
- Randomly shuffle the vector
- Loop through the vector and print out all of the points (Are they in random order?)
- Change your loop to generate a Perlin noise value for each point
- Print out the noise value as a color (noise*23+232)
- Get the current time in milliseconds at the start of main
- Get the time after the loop (How much time has elapsed?)
- Process a command line argument for the Perlin seed
- Convert your code to work with a single thread generating all the noise values (Do you need a join?)
- Convert your code to have two threads share the work of generating the noise values (Do you need a mutex?)
- Process a command line argument for the number of threads
- Does the processing time change with the number of threads? Start a README.txt
- Get dcurses.c to compile with your C++ code
- Use the example code to have the threads draw to the screen
- Get an A
Related Questions
. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java
CS 340 Milestone One Guidelines and Rubric
Overview: For this assignment, you will implement the fundamental operations of create, read, update,
. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class
Retail Transaction Programming Project
Project Requirements:
Develop a program to emulate a purchase transaction at a retail store. This
. The following program contains five errors. Identify the errors and fix them
7COM1028
Secure Systems Programming
Referral Coursework: Secure
. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer
CS 340 Final Project Guidelines and Rubric
Overview The final project will encompass developing a web service using a software stack and impleme