public abstract class PiImageSource extends PsObject
HAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGS
Constructor and Description |
---|
PiImageSource()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
compute()
Compute an image in the complex plane and update the corresponding images.
|
void |
computeColors()
Compute colors based on a previously computed function values.
|
java.awt.Image |
createImage(java.awt.Component comp,
int width,
int height)
Set size of image and, if changed, create an new image.
|
int |
getBlockSize()
Get block size of image which determines a square block of equally rendered pixels.
|
PdVector |
getDomainBounds()
Set the domain of the image in the Euclidean plane.
|
PdVector |
getDomainPosition(java.awt.Point loc)
Converts a point (u,v) in the complex plane to its position in the image.
|
java.awt.Image |
getImage()
Get image of this object, will automatically be updated whenever computeColors() is called.
|
int |
getImagePosition(double u,
double v)
Converts a point (u,v) in the plane to its position in the image.
|
void |
init()
Initialization.
|
void |
setBlockSize(int blockSize)
Set block size of image which determines a square block of equally rendered pixels.
|
void |
setDomainBounds(double[] bounds)
Set the domain of the image in the Euclidean plane.
|
void |
setDomainBounds(double xMin,
double yMin,
double xMax,
double yMax)
Set the domain of the image in the Euclidean plane.
|
void |
setDomainBounds(PdVector bounds)
Set the domain of the image in the Euclidean plane.
|
boolean |
update(java.lang.Object event)
Update the class whenever a child has changed.
|
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanels
public boolean update(java.lang.Object event)
update
in interface PsUpdateIf
update
in class PsObject
event
- carries a lot of informationPsObject.setParent(PsUpdateIf)
,
PsObject.getFather()
,
PsObject.addUpdateListener(PsUpdateIf)
public java.awt.Image getImage()
public java.awt.Image createImage(java.awt.Component comp, int width, int height)
public abstract void compute()
public void computeColors()
public int getImagePosition(double u, double v)
u
- real value of complex positionv
- imaginary value of complex positionpublic PdVector getDomainPosition(java.awt.Point loc)
loc
- Integer location in imagepublic PdVector getDomainBounds()
Parameters determine a rectangle in the complex plane in which the Mandelbrot set is computed.
public void setDomainBounds(PdVector bounds)
Parameters determine a rectangle in the complex plane in which the Mandelbrot set is computed.
public void setDomainBounds(double[] bounds)
Parameters determine a rectangle in the complex plane in which the Mandelbrot set is computed.
public void setDomainBounds(double xMin, double yMin, double xMax, double yMax)
Parameters determine a rectangle in the complex plane in which the Mandelbrot set is computed.
public int getBlockSize()
public void setBlockSize(int blockSize)
"