|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectprocessing.core.PApplet
generativedesign.Mesh
public class Mesh
Basic class for calculating and drawing a mesh. A mesh is a two dimensional grid (u/v-coordinates) which is deformed by using mathematical formulas resulting in three dimensional surfaces.
Field Summary | |
---|---|
static int |
ASTROIDALELLIPSOID
|
static int |
BOHEMIANDOME
|
static int |
BOW
|
static int |
CORKSCREW
|
int |
drawMode
|
static int |
ELLIPTICTORUS
|
static int |
FIGURE8TORUS
|
int |
form
|
static int |
HORN
|
static int |
KIDNEY
|
static int |
LEMNISCAPE
|
static int |
LIMPETTORUS
|
static int |
MAEDERSOWL
|
float |
maxBrightness
|
float |
maxHue
|
float |
maxSaturation
|
float |
meshAlpha
|
float |
meshDistortion
|
float |
minBrightness
|
float |
minHue
|
float |
minSaturation
|
static int |
PARABOLOID
|
float[] |
params
|
static int |
PLANE
|
static int |
SHELL
|
static int |
SINE
|
static int |
SPHERE
|
static int |
STEINBACHSCREW
|
static int |
SUPERFORMULA
|
static int |
TORUS
|
static int |
TRIANGULOID
|
static int |
TRIAXIALTRITORUS
|
static int |
TUBE
|
int |
uCount
|
float |
uMax
|
float |
uMin
|
int |
vCount
|
float |
vMax
|
float |
vMin
|
Fields inherited from class processing.core.PApplet |
---|
args, ARGS_DISPLAY, ARGS_EDITOR_LOCATION, ARGS_EXTERNAL, ARGS_HIDE_STOP, ARGS_LOCATION, ARGS_PRESENT, ARGS_SKETCH_FOLDER, ARGS_STOP_COLOR, ARGS_WINDOW_COLOR, DEFAULT_HEIGHT, DEFAULT_WIDTH, displayHeight, displayWidth, EXTERNAL_MOVE, EXTERNAL_STOP, finished, firstMouse, focused, frame, frameCount, frameRate, g, height, javaPlatform, javaVersion, javaVersionName, key, keyCode, keyEvent, keyPressed, mouseButton, mouseEvent, mousePressed, mouseX, mouseY, pixelDensity, pixelHeight, pixels, pixelWidth, platform, pmouseX, pmouseY, recorder, requestImageMax, useNativeSelect, width |
Constructor Summary | |
---|---|
Mesh(PApplet theParent)
Creates a mesh with default form and parameters. |
|
Mesh(PApplet theParent,
int theForm)
Creates a mesh with the given form and default parameters. |
|
Mesh(PApplet theParent,
int theForm,
float theUMin,
float theUMax,
float theVMin,
float theVMax)
|
|
Mesh(PApplet theParent,
int theForm,
int theUCount,
int theVCount)
|
|
Mesh(PApplet theParent,
int theForm,
int theUCount,
int theVCount,
float theUMin,
float theUMax,
float theVMin,
float theVMax)
|
Method Summary | |
---|---|
PVector |
calculateAstroidalEllipsoid(float u,
float v)
|
PVector |
calculateBohemianDome(float u,
float v)
|
PVector |
calculateBow(float u,
float v)
|
PVector |
calculateCorkscrew(float u,
float v)
|
PVector |
calculateEllipticTorus(float u,
float v)
|
PVector |
calculateFigure8Torus(float u,
float v)
|
PVector |
calculateHorn(float u,
float v)
|
PVector |
calculateKidney(float u,
float v)
|
PVector |
calculateLemniscape(float u,
float v)
|
PVector |
calculateLimpetTorus(float u,
float v)
|
PVector |
calculateMaedersOwl(float u,
float v)
|
PVector |
calculateParaboloid(float u,
float v)
|
PVector |
calculatePoints(float u,
float v)
Default function for calculating the points of the mesh. |
PVector |
calculateShell(float u,
float v)
|
PVector |
calculateSine(float u,
float v)
|
PVector |
calculateSphere(float u,
float v)
|
PVector |
calculateSteinbachScrew(float u,
float v)
|
PVector |
calculateSuperformula(float u,
float v)
|
PVector |
calculateTorus(float u,
float v)
|
PVector |
calculateTrianguloid(float u,
float v)
|
PVector |
calculateTriaxialTritorus(float u,
float v)
|
PVector |
calculateTube(float u,
float v)
|
void |
draw()
|
int |
getDrawMode()
|
int |
getForm()
|
String |
getFormName()
|
float |
getMaxBrightness()
|
float |
getMaxHue()
|
float |
getMaxSaturation()
|
float |
getMeshAlpha()
|
float |
getMeshDistortion()
|
float |
getMinBrightness()
|
float |
getMinHue()
|
float |
getMinSaturation()
|
float |
getParam(int theIndex)
|
float[] |
getParams()
|
int |
getUCount()
|
float |
getUMax()
|
float |
getUMin()
|
int |
getVCount()
|
float |
getVMax()
|
float |
getVMin()
|
float |
logE(float v)
The processing function log() does not take negative numbers. |
float |
power(float b,
float e)
The processing function pow() works a bit differently for negative bases. |
void |
setColorRange(float theMinHue,
float theMaxHue,
float theMinSaturation,
float theMaxSaturation,
float theMinBrightness,
float theMaxBrightness,
float theMeshAlpha)
|
void |
setDrawMode(int theMode)
|
void |
setForm(int theValue)
|
void |
setMaxBrightness(float maxBrightness)
|
void |
setMaxHue(float maxHue)
|
void |
setMaxSaturation(float maxSaturation)
|
void |
setMeshAlpha(float meshAlpha)
|
void |
setMeshDistortion(float theValue)
|
void |
setMinBrightness(float minBrightness)
|
void |
setMinHue(float minHue)
|
void |
setMinSaturation(float minSaturation)
|
void |
setParam(int theIndex,
float theValue)
|
void |
setParams(float[] theValues)
|
void |
setUCount(int theValue)
|
void |
setUMax(float theValue)
|
void |
setUMin(float theValue)
|
void |
setVCount(int theValue)
|
void |
setVMax(float theValue)
|
void |
setVMin(float theValue)
|
void |
update()
Updates the points of the mesh. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int PLANE
public static final int TUBE
public static final int SPHERE
public static final int TORUS
public static final int PARABOLOID
public static final int STEINBACHSCREW
public static final int SINE
public static final int FIGURE8TORUS
public static final int ELLIPTICTORUS
public static final int CORKSCREW
public static final int BOHEMIANDOME
public static final int BOW
public static final int MAEDERSOWL
public static final int ASTROIDALELLIPSOID
public static final int TRIAXIALTRITORUS
public static final int LIMPETTORUS
public static final int HORN
public static final int SHELL
public static final int KIDNEY
public static final int LEMNISCAPE
public static final int TRIANGULOID
public static final int SUPERFORMULA
public int form
public float uMin
public float uMax
public int uCount
public float vMin
public float vMax
public int vCount
public float[] params
public int drawMode
public float minHue
public float maxHue
public float minSaturation
public float maxSaturation
public float minBrightness
public float maxBrightness
public float meshAlpha
public float meshDistortion
Constructor Detail |
---|
public Mesh(PApplet theParent)
theParent
- Reference to a PApplet. Typically use "this"public Mesh(PApplet theParent, int theForm)
theParent
- Reference to a PApplet. Typically use "this"theForm
- One of the constants or CUSTOM.public Mesh(PApplet theParent, int theForm, int theUCount, int theVCount)
theParent
- Reference to a PApplet. Typically use "this"theForm
- One of the constants or CUSTOM.theUCount
- Number of tiles in u directiontheVCount
- Number of tiles in v directionpublic Mesh(PApplet theParent, int theForm, float theUMin, float theUMax, float theVMin, float theVMax)
theParent
- Reference to a PApplet. Typically use "this"theForm
- One of the constants or CUSTOM.theUMin
- Start value for utheUMax
- End value for utheVMin
- Start value for vtheVMax
- End value for vpublic Mesh(PApplet theParent, int theForm, int theUCount, int theVCount, float theUMin, float theUMax, float theVMin, float theVMax)
theParent
- Reference to a PApplet. Typically use "this"theForm
- One of the constants or CUSTOM.theUCount
- Number of tiles in u directiontheVCount
- Number of tiles in v directiontheUMin
- Start value for utheUMax
- End value for utheVMin
- Start value for vtheVMax
- End value for vMethod Detail |
---|
public void update()
public PVector calculatePoints(float u, float v)
public PVector calculateTube(float u, float v)
public PVector calculateSphere(float u, float v)
public PVector calculateTorus(float u, float v)
public PVector calculateParaboloid(float u, float v)
public PVector calculateSteinbachScrew(float u, float v)
public PVector calculateSine(float u, float v)
public PVector calculateFigure8Torus(float u, float v)
public PVector calculateEllipticTorus(float u, float v)
public PVector calculateCorkscrew(float u, float v)
public PVector calculateBohemianDome(float u, float v)
public PVector calculateBow(float u, float v)
public PVector calculateMaedersOwl(float u, float v)
public PVector calculateAstroidalEllipsoid(float u, float v)
public PVector calculateTriaxialTritorus(float u, float v)
public PVector calculateLimpetTorus(float u, float v)
public PVector calculateHorn(float u, float v)
public PVector calculateShell(float u, float v)
public PVector calculateKidney(float u, float v)
public PVector calculateLemniscape(float u, float v)
public PVector calculateTrianguloid(float u, float v)
public PVector calculateSuperformula(float u, float v)
public float power(float b, float e)
b
- Basee
- Exponent
public float logE(float v)
v
- Number (may also be negative)
public void draw()
draw
in class PApplet
public int getForm()
public void setForm(int theValue)
public String getFormName()
public float getUMin()
public void setUMin(float theValue)
public float getUMax()
public void setUMax(float theValue)
public int getUCount()
public void setUCount(int theValue)
public float getVMin()
public void setVMin(float theValue)
public float getVMax()
public void setVMax(float theValue)
public int getVCount()
public void setVCount(int theValue)
public float[] getParams()
public void setParams(float[] theValues)
public float getParam(int theIndex)
public void setParam(int theIndex, float theValue)
public int getDrawMode()
public void setDrawMode(int theMode)
public float getMeshDistortion()
public void setMeshDistortion(float theValue)
public void setColorRange(float theMinHue, float theMaxHue, float theMinSaturation, float theMaxSaturation, float theMinBrightness, float theMaxBrightness, float theMeshAlpha)
public float getMinHue()
public void setMinHue(float minHue)
public float getMaxHue()
public void setMaxHue(float maxHue)
public float getMinSaturation()
public void setMinSaturation(float minSaturation)
public float getMaxSaturation()
public void setMaxSaturation(float maxSaturation)
public float getMinBrightness()
public void setMinBrightness(float minBrightness)
public float getMaxBrightness()
public void setMaxBrightness(float maxBrightness)
public float getMeshAlpha()
public void setMeshAlpha(float meshAlpha)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |