/Users/lyon/j4p/src/bookExamples/ch26Graphics/SineFcn.java

1    /** 
2     * Created by IntelliJ IDEA. 
3     * User: dlyon 
4     * Date: Feb 2, 2004 
5     * Time: 3:55:54 PM 
6     * To change this template use Options | File Templates. 
7     */ 
8    package bookExamples.ch26Graphics; 
9     
10   import java.awt.geom.Point2D; 
11    
12   public class SineFcn implements Fcn1 { 
13       public Point2D getPoint(double t) { 
14           t = 2 * Math.PI * t; 
15           float x = (float) t * 100; 
16           float y = (float) (100 * Math.sin(t) + 100); 
17           return new Point2D.Float(x, y); 
18       } 
19   } 
20