-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraphingParabolas.java
More file actions
77 lines (67 loc) · 1.46 KB
/
Copy pathGraphingParabolas.java
File metadata and controls
77 lines (67 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package assignment_10528808;
/**
*
* @author Mawutor
*/
import java.awt.Color;
public class GraphingParabolas
{
public static void main( String[] args )
{
double y;
double a, h, k;
GraphPaper gp1 = new GraphPaper(10,10);
for ( double x = -10; x<=10; x+=0.01 )
{
a = 1;
h = 0; k = 0;
y = a*Math.pow(x-h,2) + k;
gp1.drawPoint(x,y);
}
GraphPaper gp2 = new GraphPaper(320,10);
for ( double x = -10; x<=10; x+=0.01 )
{
a = 1;
h = 0; k = 0;
y = a*Math.pow(x-h,2) + k;
gp2.drawPoint(x,y);
}
GraphPaper gp3 = new GraphPaper(630,10);
for ( double x = -10; x<=10; x+=0.01 )
{
a = 1;
h = 0; k = 0;
y = a*Math.pow(x-h,2) + k;
gp3.drawPoint(x,y);
}
GraphPaper gp4 = new GraphPaper(10,320);
for ( double x = -10; x<=10; x+=0.01 )
{
a = 1;
h = 0; k = 0;
y = a*Math.pow(x-h,2) + k;
gp4.drawPoint(x,y);
}
GraphPaper gp5 = new GraphPaper(320,320);
for ( double x = -10; x<=10; x+=0.01 )
{
a = 1;
h = 0; k = 0;
y = a*Math.pow(x-h,2) + k;
gp5.drawPoint(x,y);
}
GraphPaper gp6 = new GraphPaper(630,320);
for ( double x = -10; x<=10; x+=0.01 )
{
a = 1;
h = 0; k = 0;
y = a*Math.pow(x-h,2) + k;
gp6.drawPoint(x,y);
}
}
}