infovis.visualization.magicLens
Class DefaultFisheye

java.lang.Object
  extended by infovis.visualization.magicLens.DefaultMagicLens
      extended by infovis.visualization.magicLens.DefaultFisheye
All Implemented Interfaces:
MagicLens, Fisheye

public class DefaultFisheye
extends DefaultMagicLens
implements Fisheye

Fisheyes manage space deformation to maintain focus+context views by applying a space deformation. See Sheelagh Carpendale's PhD for full details.

Version:
$Revision: 1.3 $
Author:
Jean-Daniel Fekete

Nested Class Summary
static interface DefaultFisheye.LensProfile
           
static interface DefaultFisheye.Metric
           
static class DefaultFisheye.ProfileCos
           
 
Field Summary
static short DISTANCE_L1
          constant value for setDistanceMetric to use a L1 distance
static short DISTANCE_L2
          constant value for setDistanceMetric to use a L2 distance
static short DISTANCE_LINF
          constant value for setDistanceMetric to use a L infinity distance
static float DISTANCE_VIEW_PLANE
          The virtual viewplane is located at this distance from the camera
static short LENS_COSINE
          constant value for setLensType to use a cosine lens types
static short LENS_GAUSSIAN
          constant value for setLensType to use a gaussian lens types
static short LENS_HEMISPHERE
          constant value for setLensType to use a hemisphere lens types
static short LENS_INVERSE_COSINE
          constant value for setLensType to use an inverse cosine lens types
static short LENS_LINEAR
          constant value for setLensType to use a linear lens types
static String PROPERTY_DISTANCE
           
static String PROPERTY_FOCUS_RADIUS
           
static String PROPERTY_LENS_SHAPE
           
static String PROPERTY_METRIC
           
static String PROPERTY_TOLERANCE
           
static String PROPERTY_TRANSFORMING_X
           
static String PROPERTY_TRANSFORMING_Y
           
static float REFERENCE_HEIGHT
          The virtual camera height is 10.0f
 
Fields inherited from interface infovis.visualization.magicLens.Fisheye
PROPERTY_FOCUS_HEIGHT
 
Fields inherited from interface infovis.visualization.MagicLens
PROPERTY_ENABLED, PROPERTY_LENS_POSITION_X, PROPERTY_LENS_POSITION_Y, PROPERTY_LENS_RADIUS
 
Constructor Summary
DefaultFisheye()
          Constructor for Fisheyes.
DefaultFisheye(float lensRadius, float focusRadius, float focalHeight)
          Creates a new Fisheye object.
 
Method Summary
 float distance(float x, float y)
          Returns the distance of the specified point from the focus.
 short getDistanceMetric()
          Returns the distanceMetric.
 float getFocusHeight()
          Returns the focal height.
 float getFocusRadius()
          Returns the focusRadius.
 short getLensType()
          Returns the lensType.
 float getMaximumScale()
          Returns the maximum scale
 float getScale(float x, float y)
          DOCUMENT ME!
 float getTolerance()
          Returns the tolerance.
 float height(float dist)
          Returns the height at the specified distance from the focus
 boolean isTransformed(double x, double y)
          Returns true of point is transformed.
 boolean isTransformed(float x, float y)
          Returns true of point is transformed.
 boolean isTransformed(Point2D p)
          Returns true of point is transformed.
 boolean isTransformed(Rectangle2D bounds)
          DOCUMENT ME!
 boolean isTransformed(Shape s)
          DOCUMENT ME!
 boolean isTransformingX()
           
 boolean isTransformingY()
           
 float lens(float t)
          Returns the height at the specified normalized distance from the focus
 float pointHeight(float x, float y)
          Returns the height of a specified point.
 void setDistanceMetric(short distanceMetrics)
          Sets the distanceMetric.
 void setFocusHeight(float focalHeight)
          Sets the focal height.
 void setFocusRadius(float radius)
          Sets the focusRadius.
 void setLensType(short lensType)
          Sets the lensType.
 void setLensX(float x)
          Sets the lensX.
 void setLensY(float y)
          Sets the lens Y.
 void setMaximumScale(float scale)
          Change the maximum scale
 void setRadii(float focus, float lens)
          DOCUMENT ME!
 void setTolerance(float tolerance)
          Sets the tolerance.
 void setTransformingX(boolean transformingX)
           
 void setTransformingY(boolean transformingY)
           
 void subdivide(float x1, float y1, float x2, float y2, GeneralPath p)
          Subdivide a line segment.
 void subdivideSegment(float x1, float y1, float tx1, float ty1, float x2, float y2, float tx2, float ty2, GeneralPath p, int depth)
          Subdivide a line segment already clipped.
 void transform(float[] coords, int npoints)
          DOCUMENT ME!
 Point2D transform(Point2D src)
           
 void transform(Point2D src, Point2D dst)
          DOCUMENT ME!
 Shape transform(Shape s)
          DOCUMENT ME!
 float transformX(float x, float scale)
          DOCUMENT ME!
 float transformY(float y, float scale)
          DOCUMENT ME!
 
Methods inherited from class infovis.visualization.magicLens.DefaultMagicLens
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBounds, getLensRadius, getLensX, getLensY, isEnabled, removePropertyChangeListener, removePropertyChangeListener, setEnabled, setLens, setLensRadius
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface infovis.visualization.MagicLens
addPropertyChangeListener, addPropertyChangeListener, getBounds, getLensRadius, getLensX, getLensY, isEnabled, removePropertyChangeListener, removePropertyChangeListener, setEnabled, setLens, setLensRadius
 

Field Detail

PROPERTY_DISTANCE

public static final String PROPERTY_DISTANCE
See Also:
Constant Field Values

PROPERTY_METRIC

public static final String PROPERTY_METRIC
See Also:
Constant Field Values

PROPERTY_LENS_SHAPE

public static final String PROPERTY_LENS_SHAPE
See Also:
Constant Field Values

PROPERTY_FOCUS_RADIUS

public static final String PROPERTY_FOCUS_RADIUS
See Also:
Constant Field Values

PROPERTY_TOLERANCE

public static final String PROPERTY_TOLERANCE
See Also:
Constant Field Values

PROPERTY_TRANSFORMING_X

public static final String PROPERTY_TRANSFORMING_X
See Also:
Constant Field Values

PROPERTY_TRANSFORMING_Y

public static final String PROPERTY_TRANSFORMING_Y
See Also:
Constant Field Values

DISTANCE_L1

public static final short DISTANCE_L1
constant value for setDistanceMetric to use a L1 distance

See Also:
Constant Field Values

DISTANCE_L2

public static final short DISTANCE_L2
constant value for setDistanceMetric to use a L2 distance

See Also:
Constant Field Values

DISTANCE_LINF

public static final short DISTANCE_LINF
constant value for setDistanceMetric to use a L infinity distance

See Also:
Constant Field Values

LENS_GAUSSIAN

public static final short LENS_GAUSSIAN
constant value for setLensType to use a gaussian lens types

See Also:
Constant Field Values

LENS_COSINE

public static final short LENS_COSINE
constant value for setLensType to use a cosine lens types

See Also:
Constant Field Values

LENS_HEMISPHERE

public static final short LENS_HEMISPHERE
constant value for setLensType to use a hemisphere lens types

See Also:
Constant Field Values

LENS_LINEAR

public static final short LENS_LINEAR
constant value for setLensType to use a linear lens types

See Also:
Constant Field Values

LENS_INVERSE_COSINE

public static final short LENS_INVERSE_COSINE
constant value for setLensType to use an inverse cosine lens types

See Also:
Constant Field Values

REFERENCE_HEIGHT

public static final float REFERENCE_HEIGHT
The virtual camera height is 10.0f

See Also:
Constant Field Values

DISTANCE_VIEW_PLANE

public static final float DISTANCE_VIEW_PLANE
The virtual viewplane is located at this distance from the camera

See Also:
Constant Field Values
Constructor Detail

DefaultFisheye

public DefaultFisheye()
Constructor for Fisheyes.


DefaultFisheye

public DefaultFisheye(float lensRadius,
                      float focusRadius,
                      float focalHeight)
Creates a new Fisheye object.

Parameters:
lensRadius - the lens radius.
focusRadius - the focus radios
focalHeight - the focal heigt (0 <= 9)
Method Detail

isTransformed

public boolean isTransformed(float x,
                             float y)
Returns true of point is transformed.

Parameters:
x - X coordinate
y - Y coordinate
Returns:
true of point is transformed.

isTransformed

public boolean isTransformed(double x,
                             double y)
Returns true of point is transformed.

Parameters:
x - X coordinate
y - Y coordinate
Returns:
true of point is transformed.

isTransformed

public boolean isTransformed(Point2D p)
Returns true of point is transformed.

Parameters:
p - the point
Returns:
true of point is transformed.

isTransformed

public boolean isTransformed(Rectangle2D bounds)
DOCUMENT ME!

Parameters:
bounds - DOCUMENT ME!
Returns:
DOCUMENT ME!

isTransformed

public boolean isTransformed(Shape s)
DOCUMENT ME!

Parameters:
s - DOCUMENT ME!
Returns:
DOCUMENT ME!

transform

public Shape transform(Shape s)
DOCUMENT ME!

Specified by:
transform in interface Fisheye
Parameters:
s - DOCUMENT ME!
Returns:
DOCUMENT ME!

subdivideSegment

public void subdivideSegment(float x1,
                             float y1,
                             float tx1,
                             float ty1,
                             float x2,
                             float y2,
                             float tx2,
                             float ty2,
                             GeneralPath p,
                             int depth)
Subdivide a line segment already clipped.

Parameters:
x1 - X coordinate of first point
y1 - Y coordinate of first point
x2 - X coordinate of second point
y2 - Y coordinate of second point
p - GeneralPath to fill

subdivide

public void subdivide(float x1,
                      float y1,
                      float x2,
                      float y2,
                      GeneralPath p)
Subdivide a line segment.

Parameters:
x1 - X coordinate of first point
y1 - Y coordinate of first point
x2 - X coordinate of second point
y2 - Y coordinate of second point
p - GeneralPath to fill

pointHeight

public float pointHeight(float x,
                         float y)
Returns the height of a specified point.

Parameters:
x - X coordinate of the point
y - Y coordinate of the point
Returns:
the height of the specified point.

distance

public float distance(float x,
                      float y)
Returns the distance of the specified point from the focus.

Parameters:
x - X coordinate of the point
y - Y coordinate of the point
Returns:
the distance of the specified point from the focus.

height

public float height(float dist)
Returns the height at the specified distance from the focus

Parameters:
dist - the distance
Returns:
the height at the specified distance from the focus

lens

public float lens(float t)
Returns the height at the specified normalized distance from the focus

Parameters:
t - the normalized distance from the focus
Returns:
the height at the specified normalized distance from the focus

getFocusRadius

public float getFocusRadius()
Returns the focusRadius.

Returns:
float

setLensX

public void setLensX(float x)
Description copied from interface: MagicLens
Sets the lensX.

Specified by:
setLensX in interface MagicLens
Overrides:
setLensX in class DefaultMagicLens
Parameters:
x - The lest X to set

setLensY

public void setLensY(float y)
Sets the lens Y.

Specified by:
setLensY in interface MagicLens
Overrides:
setLensY in class DefaultMagicLens
Parameters:
y - The lensY to set

setFocusRadius

public void setFocusRadius(float radius)
Sets the focusRadius.

Parameters:
radius - The focusRadius to set

setRadii

public void setRadii(float focus,
                     float lens)
DOCUMENT ME!

Parameters:
focus - DOCUMENT ME!
lens - DOCUMENT ME!

getFocusHeight

public float getFocusHeight()
Returns the focal height.

Specified by:
getFocusHeight in interface Fisheye
Returns:
float

setFocusHeight

public void setFocusHeight(float focalHeight)
Sets the focal height.

Specified by:
setFocusHeight in interface Fisheye
Parameters:
focalHeight - The focal height to set

setMaximumScale

public void setMaximumScale(float scale)
Change the maximum scale

Parameters:
scale - the new maximum scale

getMaximumScale

public float getMaximumScale()
Returns the maximum scale

Returns:
the maximum scale

getScale

public float getScale(float x,
                      float y)
DOCUMENT ME!

Parameters:
x - DOCUMENT ME!
y - DOCUMENT ME!
Returns:
DOCUMENT ME!

transformX

public float transformX(float x,
                        float scale)
DOCUMENT ME!

Parameters:
x - DOCUMENT ME!
scale - DOCUMENT ME!
Returns:
DOCUMENT ME!

transformY

public float transformY(float y,
                        float scale)
DOCUMENT ME!

Parameters:
y - DOCUMENT ME!
scale - DOCUMENT ME!
Returns:
DOCUMENT ME!

transform

public void transform(float[] coords,
                      int npoints)
DOCUMENT ME!

Specified by:
transform in interface Fisheye
Parameters:
coords - DOCUMENT ME!

transform

public void transform(Point2D src,
                      Point2D dst)
DOCUMENT ME!

Specified by:
transform in interface Fisheye
Parameters:
src - DOCUMENT ME!
dst - DOCUMENT ME!

transform

public Point2D transform(Point2D src)
Specified by:
transform in interface Fisheye

getDistanceMetric

public short getDistanceMetric()
Returns the distanceMetric.

Returns:
short the distanceMetric

getLensType

public short getLensType()
Returns the lensType.

Returns:
short

setDistanceMetric

public void setDistanceMetric(short distanceMetrics)
Sets the distanceMetric.

Parameters:
distanceMetrics - The distanceMetric to set

setLensType

public void setLensType(short lensType)
Sets the lensType.

Parameters:
lensType - The lensType to set

getTolerance

public float getTolerance()
Returns the tolerance.

Returns:
float

setTolerance

public void setTolerance(float tolerance)
Sets the tolerance.

Parameters:
tolerance - The tolerance to set

isTransformingX

public boolean isTransformingX()

setTransformingX

public void setTransformingX(boolean transformingX)

isTransformingY

public boolean isTransformingY()

setTransformingY

public void setTransformingY(boolean transformingY)


Copyright © 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.