Class SphericalPlot3D

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class SphericalPlot3D extends Plot3D
Plot3D which works with spherical polar coordinates.
Since:
23 Mar 2007
Author:
Mark Taylor
See Also:
  • Constructor Details

    • SphericalPlot3D

      public SphericalPlot3D()
      Constructor.
  • Method Details

    • configureRanges

      protected Plot3D.RangeChecker configureRanges(Plot3DState state)
      Description copied from class: Plot3D
      Provides notification that the range constraints are now as described in a supplied state object. A suitable Plot3D.RangeChecker object should be returned, but the implementation should take care of any other updates to its internal state which are required as well.
      Specified by:
      configureRanges in class Plot3D
      Parameters:
      state - plot state
      Returns:
      a range checker appropriate to state's range constraints
    • getPadding

      protected double getPadding(Plot3DState state, Graphics g, int[] padBorders)
      Description copied from class: Plot3D
      Works out padding factors to be used for the plot volume. The return value is the padFactor; the amount of space outside the unit cube in both dimensions. 1 means no extra space. The padBorders array is a 4-element array whose values on entry are ignored; on exit it should contain space, additional to padFactor, to be left around the edges of the plot. The order is (left,right,bottom,top).
      Specified by:
      getPadding in class Plot3D
      Parameters:
      state - plot state
      g - graphics context
      padBorders - 4-element array, filled on return
      Returns:
      pad factor (>=1)
      See Also:
    • calculateBounds

      public DataBounds calculateBounds(PlotData data, PlotState state)
      Data bounds include one range for the radial coordinate; ranges on the other axes aren't much use. The radial one will just be between [0..1] if no radial coordinate has been chosen. Ranges for any auxiliary axes are also added.
      Overrides:
      calculateBounds in class TablePlot
      Parameters:
      data - plot data
      state - plot state
      Returns:
      data bounds object
    • frontOnly

      protected boolean frontOnly(Plot3DState state)
      Description copied from class: Plot3D
      Indicates whether only the front part of the plot should be plotted.
      Specified by:
      frontOnly in class Plot3D
      Parameters:
      state - plot state
      Returns:
      true iff parts of the plot behind the centre of the Z axis should be ignored
    • get3DLogFlags

      protected boolean[] get3DLogFlags()
      Description copied from class: Plot3D
      Returns an array of 3 flags which indicate whether logarithmic scaling is in force on the X, Y and Z axes respectively.
      Specified by:
      get3DLogFlags in class Plot3D
      Returns:
      3-element array of Cartesian axis log scaling flags
    • plotAxes

      protected void plotAxes(Plot3DState state, Graphics g, Plot3D.Transformer3D trans, PlotVolume vol, boolean front)
      Description copied from class: Plot3D
      Draws grid lines which contain all the known points. According to the value of the front parameter, either the lines which are behind all the data points, or the lines which are in front of all the data points are drawn. Thus, the routine needs to be called twice to plot all the lines. The graphics context has had all the customisation it needs.
      Specified by:
      plotAxes in class Plot3D
      Parameters:
      state - plot state
      g - graphics context
      trans - transformer which maps data space to 3d graphics space
      vol - the plotting volume onto which the plot is done
      front - true for lines in front of data, false for lines behind