|
Rings Version 0.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectthreeD.raytracer.engine.AbstractSurface
threeD.raytracer.primitives.Polynomial
A Polynomial object represents a 3d polynomial surface.
| Constructor Summary | |
Polynomial()
Constructs a new Polynomial object with no terms. |
|
Polynomial(PolynomialTerm[] terms)
Constructs a new Polynomial object with the specified terms. |
|
| Method Summary | |
Polynomial |
add(Polynomial polynomial)
Combines the terms of this Polynomial object and the specified Polynomial object and returns the sum as a Polynomial object. |
void |
addTerm(PolynomialTerm term)
Adds the specified PolynomialTerm object to this Polynomial object. |
void |
calculateDx()
Calculates the terms of the partial derivative of the polynomial function represented by this Polynomial object with respect to X and stores the terms for later evaluatation. |
void |
calculateDy()
Calculates the terms of the partial derivative of the polynomial function represented by this Polynomial object with respect to Y and stores the terms for later evaluatation. |
void |
calculateDz()
Calculates the terms of the partial derivative of the polynomial function represented by this Polynomial object with respect to Z and stores the terms for later evaluatation. |
double |
calculateZero(double initialValue,
double yValue,
double zValue,
int recursions)
Calculates an estimate for an X value that allows the polynomial function represented by this Polynomial object to equal zero when the specified Y and Z values are held constant. |
double[] |
calculateZeros(double start,
double end,
double increment,
double yValue,
double zValue,
int recursions)
Calculates a series of zeros found by the calculateZero method in the interval from the double value start to the double value end choosing guesses at every interval of the length specified by the double value increment. |
double |
evaluate(double x,
double y,
double z)
Evaluates the polynomial function represented by this Polynomial object for the specified values. |
Vector |
evaluateGradient(double x,
double y,
double z)
Evaluates the gradient of the polynomial funtion represented by this Polynomial object for the specified values. |
Polynomial |
expand(int power)
Multiplies this Polynomial object with itself as many times as indicated by the specified integer value. |
Polynomial |
getDx()
Returns a Polynomial object that represents the partial derivative of the polynomial function represented by this Polynomial object with respect to X. |
Polynomial |
getDy()
Returns a Polynomial object that represents the partial derivative of the polynomial function represented by this Polynomial object with respect to Y. |
Polynomial |
getDz()
Returns a Polynomial object that represents the partial derivative of the polynomial function represented by this Polynomial object with respect to Z. |
Vector |
getNormalAt(Vector point)
Returns a Vector object that represents the vector normal to this polynomial surface at the point represented by the specified Vector object. |
PolynomialTerm[] |
getTerms()
Returns the terms of this Polynomial object as an array of PolynomialTerm objects. |
boolean |
intersect(Ray ray)
Returns true if the ray represented by the specified Ray object intersects the polynomial surface represented by this Polynomial object in real space. |
Intersection |
intersectAt(Ray ray)
Returns an array of double values representing the distance along the ray represented by the specified Ray object that intersection between the ray and the polynomial surface represented by this Polynomial object occurs. |
Polynomial |
multiply(Polynomial polynomial)
Calculates the product of the polynomial function represented by this Polynomial object and that of the specified Polynomial object and returns the result as a Polynomial object. |
Polynomial |
multiply(PolynomialTerm term)
Calculates the product of the polynomial function represented by this Polynomial object and that of the specified PolynomialTerm object and returns the result as a Polynomial object. |
void |
removeTerm(int index)
Removes the PolynomialTerm object stored at the specified index from this Polynomial object. |
void |
setTerms(PolynomialTerm[] terms)
Sets the terms of this Polynomial object to those specified. |
void |
simplify()
Scans this Polynomial object for like terms and combines them and calculates the terms of the new partial derivatives. |
java.lang.String |
toString()
Returns a String representation of this Polynomial object. |
| Methods inherited from class threeD.raytracer.engine.AbstractSurface |
addShader, addTexture, addTransform, calculateTransform, getColor, getColorAt, getLocation, getParent, getRotationCoefficients, getScaleCoefficients, getShadeBack, getShadeFront, getShaderSet, getSize, getTexture, getTextures, getTextureSet, getTransform, getTransform, getTransforms, removeTexture, removeTransform, setColor, setLocation, setParent, setRotationCoefficients, setScaleCoefficients, setShadeBack, setShadeFront, setShaders, setSize, setTexture, setTextures, setTransform, setTransforms, shade |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Polynomial()
public Polynomial(PolynomialTerm[] terms)
| Method Detail |
public void setTerms(PolynomialTerm[] terms)
public void addTerm(PolynomialTerm term)
public void removeTerm(int index)
public PolynomialTerm[] getTerms()
public void simplify()
public Polynomial add(Polynomial polynomial)
public Polynomial multiply(Polynomial polynomial)
public Polynomial multiply(PolynomialTerm term)
public Polynomial expand(int power)
public double evaluate(double x,
double y,
double z)
public Vector evaluateGradient(double x,
double y,
double z)
public double[] calculateZeros(double start,
double end,
double increment,
double yValue,
double zValue,
int recursions)
public double calculateZero(double initialValue,
double yValue,
double zValue,
int recursions)
public Polynomial getDx()
public Polynomial getDy()
public Polynomial getDz()
public void calculateDx()
public void calculateDy()
public void calculateDz()
public Vector getNormalAt(Vector point)
public boolean intersect(Ray ray)
public Intersection intersectAt(Ray ray)
public java.lang.String toString()
|
Rings Version 0.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||