Package renderer.models_L
Class ParametricSurface
- java.lang.Object
-
- renderer.scene.Model
-
- renderer.models_L.ParametricSurface
-
- All Implemented Interfaces:
MeshMaker
- Direct Known Subclasses:
SurfaceOfRevolution
public class ParametricSurface extends Model implements MeshMaker
Create a wireframe model of a parametric surface in space.- See Also:
ParametricCurve
-
-
Field Summary
Fields Modifier and Type Field Description intkintndoubles1doubles2doublet1doublet2DoubleBinaryOperatorxDoubleBinaryOperatoryDoubleBinaryOperatorz-
Fields inherited from class renderer.scene.Model
colorList, name, primitiveList, vertexList, visible
-
-
Constructor Summary
Constructors Constructor Description ParametricSurface()Create a graph of the function with the following formula,ParametricSurface(DoubleBinaryOperator f, double x1, double x2, double z1, double z2, int n, int k)Create a graph of a function of two variablesy = f(x, z)as a parametric surface with the given parameter ranges in thexandzdirections.ParametricSurface(DoubleBinaryOperator x, DoubleBinaryOperator y, DoubleBinaryOperator z, double s1, double s2, double t1, double t2, int n, int k)Create a parametric surface in space,ParametricSurface(DoubleBinaryOperator x, DoubleBinaryOperator y, DoubleBinaryOperator z, double s1, double s2, double t1, double t2, int n, int k, String name)Create a parametric surface in space,
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetHorzCount()intgetVertCount()ParametricSurfaceremake(int n, int k)Build an instance of theModelwith new values for the number of lines of latitude and longitude while keeping all the other model parameters the same.-
Methods inherited from class renderer.scene.Model
addColor, addPrimitive, addVertex, getPrimitive, toString
-
-
-
-
Field Detail
-
x
public final DoubleBinaryOperator x
-
y
public final DoubleBinaryOperator y
-
z
public final DoubleBinaryOperator z
-
s1
public final double s1
-
s2
public final double s2
-
t1
public final double t1
-
t2
public final double t2
-
n
public final int n
-
k
public final int k
-
-
Constructor Detail
-
ParametricSurface
public ParametricSurface()
Create a graph of the function with the following formula,
as a parametric surface.f(x,z) = sin(PI*x) * sin(PI*z)
-
ParametricSurface
public ParametricSurface(DoubleBinaryOperator f, double x1, double x2, double z1, double z2, int n, int k)
Create a graph of a function of two variablesy = f(x, z)as a parametric surface with the given parameter ranges in thexandzdirections.- Parameters:
f- function of x and zx1- beginning value of x-parameter rangex2- ending value of x-parameter rangez1- beginning value of y-parameter rangez2- ending value of z-parameter rangen- number of mesh lines in x-rangek- number of mesh lines in y-range- Throws:
IllegalArgumentException- ifnis less than 2IllegalArgumentException- ifkis less than 2
-
ParametricSurface
public ParametricSurface(DoubleBinaryOperator x, DoubleBinaryOperator y, DoubleBinaryOperator z, double s1, double s2, double t1, double t2, int n, int k)
Create a parametric surface in space,
with the parametersx = x(s,t) y = y(s,t) z = z(s,t)sandthaving the given parameter ranges and the given number of mesh lines in each parametric direction.- Parameters:
x- component function in the x-directiony- component function in the y-directionz- component function in the z-directions1- beginning value of first parameter ranges2- ending value of first parameter ranget1- beginning value of second parameter ranget2- ending value of second parameter rangen- number of mesh lines in first rangek- number of mesh lines in second range- Throws:
IllegalArgumentException- ifnis less than 2IllegalArgumentException- ifkis less than 2
-
ParametricSurface
public ParametricSurface(DoubleBinaryOperator x, DoubleBinaryOperator y, DoubleBinaryOperator z, double s1, double s2, double t1, double t2, int n, int k, String name)
Create a parametric surface in space,
with the parametersx = x(s,t) y = y(s,t) z = z(s,t)sandthaving the given parameter ranges and the given number of mesh lines in each parametric direction.- Parameters:
x- component function in the x-directiony- component function in the y-directionz- component function in the z-directions1- beginning value of first parameter ranges2- ending value of first parameter ranget1- beginning value of second parameter ranget2- ending value of second parameter rangen- number of mesh lines in first rangek- number of mesh lines in second rangename-Stringname for this surface- Throws:
IllegalArgumentException- ifnis less than 2IllegalArgumentException- ifkis less than 2
-
-
Method Detail
-
getHorzCount
public int getHorzCount()
- Specified by:
getHorzCountin interfaceMeshMaker- Returns:
- the number of lines of latitude that the
Modelcontains
-
getVertCount
public int getVertCount()
- Specified by:
getVertCountin interfaceMeshMaker- Returns:
- the number of lines of longitude that the
Modelcontains
-
remake
public ParametricSurface remake(int n, int k)
Description copied from interface:MeshMakerBuild an instance of theModelwith new values for the number of lines of latitude and longitude while keeping all the other model parameters the same.
-
-