001 /* 002 * Accelerator.java 003 * Part of the Spirograph problem set. 004 * 005 * Developed for "Rethinking CS101", a project of Lynn Andrea Stein's Computers 006 * and Cognition Group. For more information, see 007 * <a href="http://www.cognition.olin.edu/projects/cs101/">the 008 * CS101 homepage</a> or email <las@olin.edu>. 009 * 010 * Copyright (C) 1998 Massachusetts Institute of Technology. 011 * Copyright (C) 2003 Franklin W. Olin College of Engineering. 012 * Please do not redistribute without obtaining permission. 013 */ 014 015 package spirograph; 016 017 /** This class has probably drifted from it's intent, and might be better named 018 * Mover. Objects implementing this interface can receive position and velocity 019 * information and generate a <code>double</code>. This value is usually 020 * inserted into the next iteration of a motion equations. 021 * 022 * <P>Copyright (C) 1998 Massachusetts Institute of Technology.<br /> 023 * Copyright © 2002-2003 Franklin W. Olin College of Engineering.</p> 024 * 025 * @author Luis Sarmenta, lfgs@cag.lcs.mit.edu 026 * @author Henry Wong, henryw@mit.edu 027 * @author Patrick G Heck, gus.heck@olin.edu 028 * @version $Id: Accelerator.java,v 1.3 2004/02/09 20:55:03 gus Exp $ 029 */ 030 public interface Accelerator { 031 032 /** 033 * Calculate a new motion related value from position and velocity information. 034 * Usually this value represents, position, acceleration, or velocity. 035 * 036 * @param pos Current position on this axis 037 * @param vel Current velocity on this axis 038 * @param otherPos Current position on the other axis 039 * @param otherVel Current Velocity on the other axis 040 * @param maxPos The maximum position on this axis (+ or -) 041 * @return The new value 042 */ 043 public double act(double pos, double vel, 044 double otherPos, double otherVel, double maxPos); 045 046 } 047 048 /* 049 * $Log: Accelerator.java,v $ 050 * Revision 1.3 2004/02/09 20:55:03 gus 051 * javadoc fixes 052 * 053 * Revision 1.2 2003/01/10 22:19:18 gus 054 * Complete and update the javadocs 055 * 056 */