Question

In: Computer Science

Using any existing 2D or 3D graphics library ( Java 2D, Java 3D, draw a scene...

Using any existing 2D or 3D graphics library ( Java 2D, Java 3D, draw a scene within one of the following categories:

  1. Satire or humor
  2. Promote a cause

You are free to create whatever you choose but it must conform to the following guidelines.  

  • Show evidence of at least four colors.
  • Have a textual composition on the finished product.
  • Imagery or images
  • Scene composition of at least six (6) elements
  • One of the following 1) Shadows or Glows.
  • May be of cartoon type or more polished composition.
  • Duplication of at least one element coming from an existing class.

You are submitting a ZIP file only name CPTR485_PROJECT1_YourName.zip containing your original project folder, a compiled *.exe file and your documentation.

Your documentation should 1) describe the project 2) how you approached it, 3) challenges that you faced and conquered.

Solutions

Expert Solution

public class Main{

public static void main(String[] args) {

new MyFrame();

}

}

import javax.swing.*;

public class MyFrame extends JFrame{

MyPanel panel;

MyFrame(){

panel = new MyPanel();

this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

this.add(panel);

this.pack();

this.setLocationRelativeTo(null);

this.setVisible(true);

}

}

import java.awt.*;

import javax.swing.*;

public class MyPanel extends JPanel{

//Image image;

MyPanel(){

//image = new ImageIcon("sky.png").getImage();

this.setPreferredSize(new Dimension(500,500));

}

public void paint(Graphics g) {

Graphics2D g2D = (Graphics2D) g;

//g2D.drawImage(image, 0, 0, null);

g2D.setPaint(Color.blue);

g2D.setStroke(new BasicStroke(5));

g2D.drawLine(0, 0, 500, 500);

//g2D.setPaint(Color.pink);

//g2D.drawRect(0, 0, 100, 200);

//g2D.fillRect(0, 0, 100, 200);

//g2D.setPaint(Color.orange);

//g2D.drawOval(0, 0, 100, 100);

//g2D.fillOval(0, 0, 100, 100);

//g2D.setPaint(Color.red);

//g2D.drawArc(0, 0, 100, 100, 0, 180);

//g2D.fillArc(0, 0, 100, 100, 0, 180);

//g2D.setPaint(Color.white);

//g2D.fillArc(0, 0, 100, 100, 180, 180);

//int[] xPoints = {150,250,350};

//int[] yPoints = {300,150,300};

//g2D.setPaint(Color.yellow);

//g2D.drawPolygon(xPoints, yPoints, 3);

//g2D.fillPolygon(xPoints, yPoints, 3);

//g2D.setPaint(Color.magenta);

//g2D.setFont(new Font("Ink Free",Font.BOLD,50));

//g2D.drawString("U R A WINNER! :D", 50, 50);

}

}


Related Solutions

Interactive computer graphics course. by java language, no need to explain. Q1: Draw a line between...
Interactive computer graphics course. by java language, no need to explain. Q1: Draw a line between P0 and Pe P0= (x,y)=(2,5) Pe=(xe,ye)=(7,9) Q2: P=(3,5) Scale P by (5,7) and then sheer by -3 along y-axis
Draw the 3d Structure and isomers (if any), find the molecular structure, polarity, and hybridization of...
Draw the 3d Structure and isomers (if any), find the molecular structure, polarity, and hybridization of the following: C3H6Br2, N3-, ClO4-, SeCl2, ClO3-, SCl2, N2O4, C2H3F.
Write a java program of a multiplication table of binary numbers using a 2D array of...
Write a java program of a multiplication table of binary numbers using a 2D array of integers.
Write a program in JAVA using the BigInteger library that can be used to check a...
Write a program in JAVA using the BigInteger library that can be used to check a RSA signature, based on the signer's RSA public key pair. To test your program, take the following information about a message Alice signed and use the verify signature to reproduce the message Alice signed and convert it back to String format. n = 68236588817658935156357212288430888402056854883696767622850112840388111129987 e = 65537 signature = 46612763171375975923246342580942010388414761162366281695045830390867474569531
Using the Library link or any biology websites to find an enzyme that is related to...
Using the Library link or any biology websites to find an enzyme that is related to either a disease or a condition (human, animal or plant) and place a summarizing paragraph on the thread below. Consider including: 1 point description of disease or condition 1 point for a brief description of the symptoms of the disease or expression in plants 1 point for description of the protein involved 1 point for anecdote(story) related to the disease or interesting information about...
Develop a Java application using Parboiled library to write aparser for a customer form. Your...
Develop a Java application using Parboiled library to write a parser for a customer form. Your program should include a grammar for the parser and display the parse tree with no errors.The customer form should include the following structure:First name, middle name (optional), last nameStreet address, city, state (or province), countryPhone numberRules• First name, middle name and last name should start with an uppercase letter followed by lower case letters. Middle name is an optional input meaning such an input...
Using existing Stack Java Collection Framework, write Java Code segment to do the following.   You may...
Using existing Stack Java Collection Framework, write Java Code segment to do the following.   You may write this in jGrasp Create a Stack of String called, myStacks Read input from keyboard, 10 names and then add to myStacks As you remove each name out, you will print the name in uppercase along with a number of characters the name has in parenthesis. (one name per line).   e.g.     Kennedy (7) Using existing Stack Java Collection Framework, write Java Code segment to...
Create a program using Java. Create two different 3D arrays with random numbers. (lets name them...
Create a program using Java. Create two different 3D arrays with random numbers. (lets name them array1 and array 2) Add the two 3Darrays together and then get the average. Save the average on a separate 3D array.(lets name it array3) Then add array1 and array3 then get the average Save the average on a separate 3Darray(lets name it array 4) Then add array2 and array3 then get the average Save the average on a separate 3Darray (lets name it...
Assignment Write a program using turtle graphics which writes your initials, or any other three unique...
Assignment Write a program using turtle graphics which writes your initials, or any other three unique letters, to the display. Look to your program for lab 1 for reminders of how to use turtle graphics. Functions that must be written: def drawLetter (x, y, letterColor): Write three functions, one for three unique letters. Personally, I would write drawA, drawR, and drawS. Each function must draw that letter to the screen. The x and y values determine the upper left-hand location...
This is a straightforward program that will "draw" a rectangle using any character selected by the...
This is a straightforward program that will "draw" a rectangle using any character selected by the user. The user will also provide the width and height of the final rectangle. Use a nested for loop structure to create the output. Input: This program will draw a rectangle using your character of choice. Enter any character: [user types: *] Enter the width of your rectangle: [user types: 20] Enter the height of your rectangle: [user types: 5] Output: ******************** ******************** ********************...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT