This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hw; | |
import java.awt.*; | |
import javax.swing.JPanel; | |
import javax.swing.JFrame; | |
public class ReflectionX13 extends JPanel { | |
int x1=100,y1=100,x2=290,y2=280,px1,px2,py1,py2; | |
public ReflectionX13() { | |
px1=y1; | |
px2=y2; | |
py1=x1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hw; | |
import java.applet.Applet; | |
import java.awt.Color; | |
import java.awt.Graphics; | |
import javax.swing.JFrame; | |
public class ReflectionY13 extends Applet{ | |
int x1 = 50; | |
int y1 = 50; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hw; | |
import java.awt.*; | |
import javax.swing.JPanel; | |
import javax.swing.JFrame; | |
public class ReflectionOrigin13 extends JPanel { | |
int x1=10,y1=10,x2=70,y2=70,px1,px2,py1,py2; | |
public ReflectionOrigin13() { | |
px1= -x1+360; | |
px2= -x2+360; | |
py1= -y1+360; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hw; | |
import java.awt.Color; | |
import java.awt.EventQueue; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
class Rotation extends JPanel { | |
private void doDrawing(Graphics g) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hw; | |
import java.awt.*; | |
import javax.swing.*; | |
import javax.swing.JFrame; | |
public class RotationNegativeAboutOrigin13 extends JFrame{ | |
int xPoly[]= {30,65,86,100,145,95,60}; | |
int yPoly[]= {30,20,36,56,75,105,60}; | |
int i; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hw; | |
import java.awt.Graphics; | |
import java.util.Scanner; | |
import javax.swing.JFrame; | |
public class ShearingY13 extends JFrame { | |
static int x1, y1, x2, y2, x3, y3, x4, y4, shy; | |
int py1,py2,py3,py4; | |
public ShearingY13(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hw; | |
import java.awt.*; | |
import javax.swing.JPanel; | |
import javax.swing.JFrame; | |
public class ShearingXY13 extends JPanel{ | |
int x1=60 ,y1=60, x2=70,y2=70, shx=1, shy=3, a,b,c,d; | |
public ShearingXY13() { | |
a=x1+shx*y1; | |
b=y1+shy*x1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hw; | |
import java.awt.*; | |
import java.awt.event.*; | |
import java.awt.image.BufferedImage; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
public class FloodFill13 extends JPanel { | |
private BufferedImage image; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hw; | |
import java.awt.Color; | |
import java.awt.Dimension; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.event.MouseEvent; | |
import java.awt.event.MouseListener; | |
import java.awt.image.BufferedImage; | |
import javax.swing.JFrame; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hw; | |
import java.applet.*; | |
import java.awt.*; | |
import java.util.*; | |
public class LineClipping13 extends Applet { | |
int xmax=60, ymax=60, xmin=10, ymin=5; | |
public int[] set(int x,int y){ | |
int arr[]=new int[4]; | |
if(x < xmin) { |