1 package org.catacomb.graph.gui;
2
3 import org.catacomb.datalish.Box;
4
5
6
7 public class Demo1 implements PaintInstructor {
8
9
10 double[] xdat;
11 double[] ydat;
12
13 public Demo1() {
14
15 int n = 1000;
16 xdat = new double[n];
17 ydat = new double[n];
18 for (int i = 0; i < n; i++) {
19 xdat[i] = (10. * i) / n;
20 ydat[i] = 10. * Math.cos(2. * xdat[i]);
21 }
22
23 }
24
25
26
27 public void instruct(Painter p) {
28 p.drawWhiteLine(3., xdat, ydat);
29 }
30
31
32
33 public boolean antialias() {
34 return true;
35 }
36
37
38
39 public Box getLimitBox() {
40
41 return null;
42 }
43
44
45 }