utils
Class MitchellNetravaliPixelFilter
java.lang.Object
utils.MitchellNetravaliPixelFilter
- All Implemented Interfaces:
- IPixelFilter
public class MitchellNetravaliPixelFilter
- extends java.lang.Object
- implements IPixelFilter
the Mitchell Netravali pixel filter uses random numbers to produce
a 4x4 square with evenly distributed pixels and gives
them a weight comparable to the sinc function
Method Summary |
double |
getFilterHeight()
|
double |
getFilterWidth()
|
double |
warp(Point2D canonical,
Point2D warped)
warps a point from a canonical random point [0,1]x[0,1]
to a range [-0.5*width,0.5*width]x[-0.5*height,0.5*height]
(0,0) is the mid of the pixel which is calculated |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MitchellNetravaliPixelFilter
public MitchellNetravaliPixelFilter(double b,
double c)
- constructor
- Parameters:
b
- c
-
warp
public double warp(Point2D canonical,
Point2D warped)
- Description copied from interface:
IPixelFilter
- warps a point from a canonical random point [0,1]x[0,1]
to a range [-0.5*width,0.5*width]x[-0.5*height,0.5*height]
(0,0) is the mid of the pixel which is calculated
- Specified by:
warp
in interface IPixelFilter
- Parameters:
canonical
- [in] canonical random pointwarped
- [out] the warped point
- Returns:
- the warped point of a canonical random point and its weight
getFilterHeight
public double getFilterHeight()
- Specified by:
getFilterHeight
in interface IPixelFilter
- Returns:
- the height of the filter kernel
getFilterWidth
public double getFilterWidth()
- Specified by:
getFilterWidth
in interface IPixelFilter
- Returns:
- the width of the filter kernel