Class ConformalMap
- java.lang.Object
-
- vmm3d.core.Exhibit
-
- vmm3d.core3D.Exhibit3D
-
- vmm3d.conformalmap.ConformalMap
-
- All Implemented Interfaces:
- java.util.EventListener, javax.swing.event.ChangeListener, Decorateable, Parameterizable
- Direct Known Subclasses:
- CubicPolynomial, Exponentialfct, HyperbolicIsometry, Inverse, NonConformal, Sine, Squaring, UserConformalMap, Weierstrass_p, ZedPlus1OverZed
public abstract class ConformalMap extends Exhibit3D
This class represents a map from a region in the complex plane to the complex plane. (Note: For most of the subclasses of this map, the map is conformal, but that is not in fact true in every case.)Note that a ConformalMap by default uses a mouse task that lets the user switch between a view of the domain and a view of the image by shift-right-clicking. Ordinarily, the image is shown. The domain is shown when the user shift-right-clicks until the mouse is released.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classConformalMap.ConformalMapViewA class that defines the default view for a ConformalMap.
-
Field Summary
Fields Modifier and Type Field and Description static intCARTESIANCode for using a cartesian grid on the domain of the function.static intFRACTIONALCode for the function (1-z)/(1+z) as one of the possible functions that can be precomposed or postcomposed with a map.static intIDENTITYCode for the identity function as one of the possible functions that can be precomposed or postcomposed with a map.static intINVERSIONCode for the function 1/z as one of the possible functions that can be precomposed or postcomposed with a map.static intPOLARCode for using a polar grid on the domain of the function.static intPOLARCONFORMALCode for using a conformal polar grid on the domain of the function.static intSQRROOTCode for the square root function as one of the possible functions that can be precomposed or postcomposed with a map.
-
Constructor Summary
Constructors Constructor and Description ConformalMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddExtraXML(org.w3c.dom.Document containingDocument, org.w3c.dom.Element exhibitElement)This method is called when an XML representation of this exhibit is being constructed by theSaveAndRestoreclass to give the exhibit a chance to write any extra infomation that is not saved by default.ActionListgetActionsForView(View view)This method returns a list ofActionItemthat can be applied to a View that contains this Exhibit.AnimationgetCreateAnimation(View view)Returns an animation that shows the domain grid for a short time, then switches to the image.ViewgetDefaultView()Overridden to return a view of type ConformalMapView, defined by a nested class in this class.double[]getDefaultWindow2D()Returns an array of four numbers representing the default 2D window.intgetGridType()Gets the code number for the type of grid that is used on the domain of the function.intgetPostCompFunction()Gets the code number for the function that is postcomposed with the basic map.intgetPreCompFunction()Gets the code number for the function that is precomposed with the basic map.voidreadExtraXML(org.w3c.dom.Element exhibitInfo)This method is called when this exhibit is being reconstructed from an XML representation by theSaveAndRestoreclass.voidsetDefaultWindow2D(double[] defaultWindow2D)Sets the default 2D window for this exhibit.voidsetDefaultWindow2D(double xmin, double xmax, double ymin, double ymax)Sets the default 2D window for this exhibit.voidsetGridType(int gridType)Sets the type of grid that is used on the domain of the map.voidsetPostCompFunction(int postCompFunction)Sets the function that is postcomposed with the basic map.voidsetPreCompFunction(int preCompFunction)Sets the function that is precomposed with the basic map.-
Methods inherited from class vmm3d.core3D.Exhibit3D
getDefaultTransform, getDefaultViewpoint, getDefaultViewUp, setDefaultViewpoint, setDefaultViewUp
-
Methods inherited from class vmm3d.core.Exhibit
addChangeListener, addDecoration, addView, clearDecorations, forceRedraw, getAdditionalAnimationsForView, getAlternativeViews, getBuildAnimation, getDecorations, getDefaultBackground, getDefaultForeground, getDefaultWindow, getFramesForMorphing, getMorphingAnimation, getName, getParameterByName, getParameters, getSettingsCommandsForView, getTitle, getUseFilmstripForMorphing, getViews, parameterChanged, removeChangeListener, removeDecoration, removeView, render, setDefaultBackground, setDefaultForeground, setDefaultWindow, setDefaultWindow, setFramesForMorphing, setName, setUseFilmstripForMorphing, stateChanged
-
-
-
-
Field Detail
-
IDENTITY
public static final int IDENTITY
Code for the identity function as one of the possible functions that can be precomposed or postcomposed with a map.- See Also:
- Constant Field Values
-
INVERSION
public static final int INVERSION
Code for the function 1/z as one of the possible functions that can be precomposed or postcomposed with a map.- See Also:
- Constant Field Values
-
FRACTIONAL
public static final int FRACTIONAL
Code for the function (1-z)/(1+z) as one of the possible functions that can be precomposed or postcomposed with a map.- See Also:
- Constant Field Values
-
SQRROOT
public static final int SQRROOT
Code for the square root function as one of the possible functions that can be precomposed or postcomposed with a map.- See Also:
- Constant Field Values
-
CARTESIAN
public static final int CARTESIAN
Code for using a cartesian grid on the domain of the function.- See Also:
- Constant Field Values
-
POLAR
public static final int POLAR
Code for using a polar grid on the domain of the function.- See Also:
- Constant Field Values
-
POLARCONFORMAL
public static final int POLARCONFORMAL
Code for using a conformal polar grid on the domain of the function.- See Also:
- Constant Field Values
-
-
Method Detail
-
getPostCompFunction
public int getPostCompFunction()
Gets the code number for the function that is postcomposed with the basic map.- See Also:
setPostCompFunction(int)
-
setPostCompFunction
public void setPostCompFunction(int postCompFunction)
Sets the function that is postcomposed with the basic map. The value should be one of the constants IDENTITY, INVERSION, FRACTIONAL, or SQRROOT. The default is IDENTITY. (This property is managed by an ActionRadioGroup, although it could also be set directly.)
-
getPreCompFunction
public int getPreCompFunction()
Gets the code number for the function that is precomposed with the basic map.- See Also:
setPreCompFunction(int)
-
setPreCompFunction
public void setPreCompFunction(int preCompFunction)
Sets the function that is precomposed with the basic map. The value should be one of the constants IDENTITY, INVERSION, FRACTIONAL, or SQRROOT. The default is IDENTITY. (This property is managed by an ActionRadioGroup, although it could also be set directly.)
-
getGridType
public int getGridType()
Gets the code number for the type of grid that is used on the domain of the function.- See Also:
setGridType(int)
-
setGridType
public void setGridType(int gridType)
Sets the type of grid that is used on the domain of the map. The value should be one of the constants CARTESIAN, POLAR, or POLARCONFORMAL; other values are ignored. The default is CARTESIAN. (This property is managed by an ActionRadioGroup, although it could also be set directly.) This method changes the values of umin, umax, vmin, vmax, ures, and vres to match the new grid type. Separate values for each grid type are stored for these parameters. When this method is used to change the grid type, the values of the paramters are set to the values saved for that grid type.
-
getDefaultWindow2D
public double[] getDefaultWindow2D()
Returns an array of four numbers representing the default 2D window.- See Also:
setDefaultWindow2D(double[])
-
setDefaultWindow2D
public void setDefaultWindow2D(double[] defaultWindow2D)
Sets the default 2D window for this exhibit. This is the window that is used when the view is in 2D mode, that is, when the domain is displayed or when the image is displayed in the complex plane. It is not used when the image is displayed on the Riemann Sphere.- Parameters:
defaultWindow2D- an array containing the default window, xmin, xmax, ymin, and ymax. If this parameter is null, nothing is done. If the array has fewer than four elements, an IllegalArgumentException is thrown.
-
setDefaultWindow2D
public void setDefaultWindow2D(double xmin, double xmax, double ymin, double ymax)Sets the default 2D window for this exhibit. This is the window that is used when the view is in 2D mode, that is, when the domain is displayed or when the image is displayed in the complex plane. It is not used when the image is displayed on the Riemann Sphere. This convenience method just callssetDefaultWindow2D(double[]).
-
getCreateAnimation
public Animation getCreateAnimation(View view)
Returns an animation that shows the domain grid for a short time, then switches to the image. (However, no create animation is shown in "stereograph" views, since it would involve changing the window size back and forth.)- Overrides:
getCreateAnimationin classExhibit- Parameters:
view- A View that is displaying this Exhibit. The animation, if any, that is returned by this method will be installed in the View's display. If the view is null, than a creation animation that can run independently of a view could be returned.- Returns:
- A creation animation for the given View of this Exhibit. The return value can be null to indicate that no creation animation is to be run.
-
getDefaultView
public View getDefaultView()
Overridden to return a view of type ConformalMapView, defined by a nested class in this class.- Overrides:
getDefaultViewin classExhibit3D
-
getActionsForView
public ActionList getActionsForView(View view)
Description copied from class:ExhibitThis method returns a list ofActionItemthat can be applied to a View that contains this Exhibit. If the view parameter is null, it should return actions that are appropriate in any View. View is presumably one that is displaying this Exhibit.The items in the returned list must implement the ActionItem interface and generally belong to one of the classes
AbstractActionVMM,ToggleAction,ActionRadioGroup, orActionList. Null items represent separators.In this top-level Exhibit class, the return value is a list that contains one object of type
AbstractActionVMM. The action represents the "Create" command, which is meant to run the "create animation" of the Exhibit.In general, when overriding this method, subclasses should call "super.getActionsForView()" to obtain a list of actions from the superclass. It can then add additional actions or remove or disable actions that are in the list from the superclass.
- Overrides:
getActionsForViewin classExhibit
-
addExtraXML
public void addExtraXML(org.w3c.dom.Document containingDocument, org.w3c.dom.Element exhibitElement)Description copied from class:ExhibitThis method is called when an XML representation of this exhibit is being constructed by theSaveAndRestoreclass to give the exhibit a chance to write any extra infomation that is not saved by default. Any Parameters associated with the exhibit are saved automatically. Note that Decorations associated with the exhibit are NOT saved automatically UNLESS the decoration class is marked with aVMMSaveannotation. Property variables will also be saved automatically IF they are marked withVMMSaveannotations.The method in this top level class does nothing.
When a subclass overrides this method, it should ordinarily start by calling super.addExtraXML(containingDocument,exhibitElement) to make sure that information from the superclass is saved.
- Overrides:
addExtraXMLin classExhibit- Parameters:
containingDocument- The overall XML document that contains the exhibit Element that is being created. This parameter is necessary because it is needed to create any nested subelements that are to be added to the exhibit element.exhibitElement- The XML element that is being constructed. This element already exists; the purpose of this method to add any extra information that would be needed to reconstruct this exhibit object from the XML represenation.- See Also:
Exhibit.readExtraXML(Element)
-
readExtraXML
public void readExtraXML(org.w3c.dom.Element exhibitInfo) throws java.io.IOExceptionDescription copied from class:ExhibitThis method is called when this exhibit is being reconstructed from an XML representation by theSaveAndRestoreclass. The Exhibit object has already been created, and default information (parameters and decorations) have been retrieved. This method is responsible for retrieving any data that was written byExhibit.addExtraXML(Document, Element), except that properties written withSaveAndRestore.addProperty(Object, String, Document, Element)are retrieved automatically, and decorations saved withSaveAndRestore.addDecorationElement(Document, Element, Decoration)are retrieved automatically. The method in this top-level Exhibit class does nothing.In general, when a subclass overrides this method, it should be sure to call super.readExtraXML(exhibitInfo).
- Overrides:
readExtraXMLin classExhibit- Parameters:
exhibitInfo- The <exhibit> element from the XML file that contains the information about this exhibit. Some methods from theSaveAndRestoreclass might be useful for getting the data.- Throws:
java.io.IOException- If an error is found, an exception of type IOException should be thrown. This will abort the whole processing of the XML file.- See Also:
Exhibit.addExtraXML(Document, Element)
-
-
DMelt 3.0 © DataMelt by jWork.ORG