|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttoxi.sim.grayscott.GrayScott
public class GrayScott
Implementation of the Gray-Scott reaction diffusion model described in detail on the links below:
Field Summary | |
---|---|
float[] |
u
|
float[] |
v
|
Constructor Summary | |
---|---|
GrayScott(int width,
int height,
boolean wrap)
|
Method Summary | |
---|---|
float |
getCurrentUAt(int x,
int y)
Convenience method to access U array using 2D coordinates. |
float |
getCurrentVAt(int x,
int y)
Convenience method to access V array using 2D coordinates. |
float |
getDiffuseU()
|
float |
getDiffuseV()
|
float |
getF()
|
float |
getFCoeffAt(int x,
int y)
Extension point for subclasses to modulate the F coefficient of the reaction diffusion, based on spatial (or other) parameters. |
float |
getK()
|
float |
getKCoeffAt(int x,
int y)
Extension point for subclasses to modulate the K coefficient of the reaction diffusion, based on spatial (or other) parameters. |
boolean |
isTiling()
|
void |
reset()
Resets the simulation matrix to an initial, clean state. |
void |
seedImage(int[] pixels,
int imgWidth,
int imgHeight)
|
void |
setCoefficients(float f,
float k,
float dU,
float dV)
|
void |
setDiffuseU(float dU)
|
void |
setDiffuseV(float dV)
|
void |
setF(float f)
|
void |
setK(float k)
|
void |
setRect(int x,
int y,
int w,
int h)
|
void |
setRect(toxi.geom.Rect r)
|
void |
setTiling(boolean isTiling)
|
void |
update(float t)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public float[] u
public float[] v
Constructor Detail |
---|
public GrayScott(int width, int height, boolean wrap)
Method Detail |
---|
public float getCurrentUAt(int x, int y)
x
- y
-
public float getCurrentVAt(int x, int y)
x
- y
-
public float getDiffuseU()
public float getDiffuseV()
public float getF()
public float getFCoeffAt(int x, int y)
update(float)
cycle and can be used to create parameter
gradients, animations and other spatial or temporal modulations.
x
- y
-
public float getK()
public float getKCoeffAt(int x, int y)
x
- y
-
public boolean isTiling()
public void reset()
public void seedImage(int[] pixels, int imgWidth, int imgHeight)
public void setCoefficients(float f, float k, float dU, float dV)
public void setDiffuseU(float dU)
dU
- the diffuse U coefficient to setpublic void setDiffuseV(float dV)
dV
- the diffuse V coefficient to setpublic void setF(float f)
f
- the F coefficient to setpublic void setK(float k)
k
- the K coefficient to setpublic void setRect(int x, int y, int w, int h)
x
- y
- w
- h
- public void setRect(toxi.geom.Rect r)
public void setTiling(boolean isTiling)
isTiling
- the isTiling to setpublic void update(float t)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |