/Users/lyon/j4p/src/bookExamples/ch26Graphics/SineCircleFcn.java
|
1 package bookExamples.ch26Graphics;
2
3 import java.awt.geom.Point2D;
4
5 /**
6 * DocJava, Inc.
7 * http://www.docjava.com
8 * Programmer: dlyon
9 * Date: Oct 20, 2004
10 * Time: 7:16:00 PM
11 */
12 public class SineCircleFcn implements Fcn1 {
13 CircleFcn cf = null;
14 SineFcn sf = new SineFcn();
15 SineCircleFcn(double x1, double y1, double radius) {
16 cf = new CircleFcn(x1,y1,radius);
17
18 }
19 public Point2D getPoint(double t){
20 Point2D point = sf.getPoint(t);
21 Point2D cp = cf.getPoint(t);
22 cp.setLocation(point.getX()+cp.getX(),point.getY()+cp.getY());
23 return cp;
24 }
25
26 }
27