1 package sample;
2
3 import java.awt.Color;
4
5 import fi.jyu.mit.graphics.*;
6 import static java.lang.Math.PI;
7
8
9
14 public class FunctionSample {
15
16
19 public static void main(String[] args) {
20 EasyWindow window = new EasyWindow();
21 window.scale(-7,-2,8,7);
22 window.addAxis(13, 100, 10);
23 window.add(new FunctionMapRR(SinFun.sin,-2*PI,2*PI,0));
24 window.add(new FunctionMapRR(new Polynom(1,0,0),-4,4,0)).setColor(Color.RED);
25 window.add(new FunctionMapRR(new Polynom(1,3,0,0),-4,4,0)).setColor(Color.GREEN);
26 window.add(new FunctionMapRR(new Polynom(0.5,2,1,-1,-1),-4,4,0)).setColor(Color.ORANGE);
27 window.showWindow();
28
29 }
30
31 }
32