QuestionQuestion

Overview
In this project you will create 3 simple, images or your choice and use Java 2D graphic methods to rotate, scale and translate each of the images.

Requirements:
1. Using Netbeans or Eclipse, develop a Java 2D graphics application that creates 3 images. The images should have the following specifications:
a. Size: minimum 25x25 pixels, larger images are Okay
b. Type: Color (consists of two or more colors)
c. Simple form or shape (Hint: consider a letter or number, or even simple shapes such as crossing lines, rectangles, or circles
d. You should generate the image inside of separate methods and store them as 2D arrays.
2. Use Java 2D graphics to display your original images.
3. For each image use the existing Java 2D graphics transformation methods to translate, rotate and scale each object. You should perform the following transformations on each image:
a. Translate -5 in x direction, Translate +7 in the y direction.
b. Rotate 45° counter clockwise.
c. Rotate 90° clockwise
d. Scale 2 times for the x component, scale 0.5 times for the y component
e. Each of these transformations should be displayed in sequence with the images always starting from the previous transformation as opposed to the original image.
f. Use Java 2D graphics to display each transformation for each image. (Hint: review the Project 1 template for a good start for this project.)
4. All Java source code should be written using Google Java style guide.
5. Prepare, conduct and document a test plan verifying your application is working as expected. This plan should include a test matrix listing each method you tested, how you tested it, and the results of testing.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

class Surface extends JPanel {

    BufferedImage[] images;

    public Surface() {
       // Creates Simple, minimum 25x25 binary 3 images (5 points)
       // Stores images as 2D arrays. (3 points)
       images = new BufferedImage[3];
      
       // read image from disk
       try {
            images[0] = ImageIO.read(new File("img1.png"));
            images[1] = ImageIO.read(new File("img2.png"));
            images[2] = ImageIO.read(new File("img3.png"));
       } catch (IOException e) {
            System.err.println(e.getMessage());
            System.exit(0);
       }
    }

    @Override
    public void paint(Graphics g) {
       super.paint(g);
       Graphics2D g2d = (Graphics2D) g;
       int x = 100, y = 150;...

By purchasing this solution you'll be able to access the following files:
Solution.zip.

50% discount

Hours
Minutes
Seconds
$50.00 $25.00
for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available 3D Graphics Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats