/*Siddhartha Kasivajhula * Georgia Institute of Technology * c/o Predrag Cvitanovic * Advisor: Rytis Paskauskas * Fall 2005 */ import java.awt.*; import java.util.Calendar; import java.util.GregorianCalendar; //! @brief Contains all AFM constants and initial panel values. /// The behavior and "look and feel" of the applet is controlled by the values in this class. /// You can choose the colors used in the applet here. This is useful, for example, if you want to print the display, /// and want to use a white background rather than a black one. public class AFMConstants { //### some simulator constants ###// public static final int DURATION = 1000; //!< this isn't used anywhere, as far as I remember. scheduled for removal public static final int SAMPLES = 1000; //!< sets the number of 'samples' taken per period of the surface //###// //### surface constants ###// public static final double SURF_LENGTH = 1; //< length of surface ("period") public static final double SURF_AMPLITUDE = 1; //< CHANGEME. Amplitude of surface public static final double SURF_PHASE = 1; //< CHANGEME Phase of surface //###// //### Default initial parameters, conditions ###// // default public static final double default_a = 0.8, //!< default co-efficient of restitution default_t = 0, //!< simulation start time default_x = 0.018038552741981575050571488355, //!< Default x coordinate. This is a coordinate of an actual unstable periodic orbit for resitution parameter a=0.9 default_y = 0.5985119378367934, //!< Default y coordinate. This is a coordinate of an actual unstable periodic orbit for resitution parameter a=0.9 default_px = 0.004445733640121142, //!< Default y coordinate. This is a coordinate of an actual unstable periodic orbit for resitution parameter a=0.9 default_py = 0.045538494373958266, //!< Default y coordinate. This is a coordinate of an actual unstable periodic orbit for resitution parameter a=0.9 default_y0 = 0, //!< Default 'vertical equilibrium position' parameter. default_V = 0.025836841411021969, //!< Default surface horizontal velocity. This parameter value represents an actual unstable periodic orbit for resitution parameter a=0.9 default_e = 0.0791855; //!< Default spring ratio (vertical / horizontal) // periodic public static final double periodic_a = 0.9, //!< co-efficient of restitution for a periodic trajectory periodic_t = 0, //!< simulation start time periodic_x = 0.018038552741981575050571488355, //!< initial position: x periodic_y = 0.5985119378367934, //!< initial position: y periodic_px = 0.004445733640121142, //!< initial momentum in the x-direction periodic_py = 0.045538494373958266, //!< initial momentum in the y-direction periodic_y0 = 0, //!< 'equilibrium position' for vertical AFM motion periodic_V = 0.025836841411021969, //!< horizontal velocity of AFM apparatus (or surface) periodic_e = 0.0791855; //!< spring constant ratio -- vertical / horizontal //###// // "Look and Feel" constants (colors) // all the colors used in the applet. You can change the look and feel of the applet from here public static Color BG_color = Color.black, //!< background color in all windows text_color = Color.white, //!< text color (used for window names surface_color = Color.blue, //!< surface color AFMspring_color = Color.gray, //!< AFM cantilever color axes_color = Color.gray, //!< Color used for axes in 'Measure' window mapPoints_color = Color.yellow, //!< Color of points in Poincare' section / stroboscopic map mapMarker_color = Color.blue, //!< Color used to mark initial point on map probeText_color = Color.orange, //!< Color used to indicate if map is probing or recording info_color = Color.red, //!< Time, mouse pointer location, presented in this color terminal_color = Color.green, //!< "Measure" window presents numerics in this color poincare_color = Color.cyan, //!< Currently not used. Plan was to color Poincare' and Stroboscopic differently mapType_color = Color.lightGray; //!< Shows "Poincare'" or "Stroboscopic" at bottom right of Map window in this color // note: these default values (above) are currently read from AFMSimulator // and from AFMApplet. Remove from those classes, use these. ///File I/O constants //! @bug We need to find out how to specify relative paths to file IO. public static String path = "/home/rytis/projects/repos/Kasivajhula/dat/"; //!< location of file to store recorded data //public static String fileName = "afm_" + Long.toString(new java.util.Date().getTime()) + ".dat"; public static String fileName = "afm_" + new GregorianCalendar().get(Calendar.YEAR) + + new GregorianCalendar().get(Calendar.MONTH) + new GregorianCalendar().get(Calendar.DATE) + "_" + new GregorianCalendar().get(Calendar.HOUR_OF_DAY) + new GregorianCalendar().get(Calendar.MINUTE) + new GregorianCalendar().get(Calendar.SECOND) + ".dat"; //!< Filename. Uses timestamp: afm_yearMonthDateHourMinSec.dat }// end AFMConstants