private static final double scale = 50d;
- private static Graph getCosineGraph(final Point3D location)
- throws IOException {
+ private static Graph getCosineGraph(final Point3D location) {
final List<Point2D> data = new ArrayList<>();
for (double x = 0; x < 20; x += 0.25) {
final double y = Math.cos(x);
return new Graph(scale, data, "Cosine", location);
}
- private static Graph getFormula1Graph(final Point3D location)
- throws IOException {
+ private static Graph getFormula1Graph(final Point3D location) {
final List<Point2D> data = new ArrayList<>();
for (double x = 0; x < 20; x += 0.25) {
final double y = Math.sin(Math.tan(x));
return new Graph(scale, data, "y = ( (10-x)^2 ) / 30", location);
}
- private static Graph getFormula3Graph(final Point3D location)
- throws IOException {
+ private static Graph getFormula3Graph(final Point3D location) {
final List<Point2D> data = new ArrayList<>();
for (double x = 0; x < 20; x += 0.25) {
final double y = Math.sin(x / 2) + Math.sin(x / 1.26);
return new Graph(scale, data, "y = sin(x/2) + sin(x/1.26)", location);
}
- private static Graph getSineGraph(final Point3D location)
- throws IOException {
+ private static Graph getSineGraph(final Point3D location) {
final List<Point2D> data = new ArrayList<>();
for (double x = 0; x < 20; x += 0.25) {
final double y = Math.sin(x);
return new Graph(scale, data, "Sine", location);
}
- private static Graph getTangentGraph(final Point3D location)
- throws IOException {
+ private static Graph getTangentGraph(final Point3D location) {
final List<Point2D> data = new ArrayList<>();
for (double x = 0; x < 20; x += 0.25) {
double y = Math.tan(x);