Package renderer.models_L
Class ParametricCurve
- java.lang.Object
-
- renderer.scene.Model
-
- renderer.models_L.ParametricCurve
-
- All Implemented Interfaces:
MeshMaker
public class ParametricCurve extends Model implements MeshMaker
Create a wireframe model of a parametric curve in space.- See Also:
ParametricSurface
-
-
Field Summary
Fields Modifier and Type Field Description intndoublet1doublet2DoubleFunction<Double>xDoubleFunction<Double>yDoubleFunction<Double>z-
Fields inherited from class renderer.scene.Model
colorList, name, primitiveList, vertexList, visible
-
-
Constructor Summary
Constructors Constructor Description ParametricCurve()Create a trefoil knot as a parametric curve in space.ParametricCurve(DoubleFunction<Double> x, DoubleFunction<Double> y, double t1, double t2, int n)Create a parametric curve in the xy-plane,ParametricCurve(DoubleFunction<Double> x, DoubleFunction<Double> y, DoubleFunction<Double> z, double t1, double t2, int n)Create a parametric curve in space,
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetHorzCount()intgetVertCount()ParametricCurveremake(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 DoubleFunction<Double> x
-
y
public final DoubleFunction<Double> y
-
z
public final DoubleFunction<Double> z
-
t1
public final double t1
-
t2
public final double t2
-
n
public final int n
-
-
Constructor Detail
-
ParametricCurve
public ParametricCurve()
Create a trefoil knot as a parametric curve in space.
-
ParametricCurve
public ParametricCurve(DoubleFunction<Double> x, DoubleFunction<Double> y, double t1, double t2, int n)
Create a parametric curve in the xy-plane,
with the parameterx = x(t) y = y(t)thaving the given parameter range and the given number of line segments.- Parameters:
x- component function in the x-directiony- component function in the y-directiont1- beginning value of parameter ranget2- ending value of parameter rangen- number of line segments in the curve- Throws:
IllegalArgumentException- ifnis less than 1
-
ParametricCurve
public ParametricCurve(DoubleFunction<Double> x, DoubleFunction<Double> y, DoubleFunction<Double> z, double t1, double t2, int n)
Create a parametric curve in space,
with the parameterx = x(t) y = y(t) z = z(t)thaving the given parameter range and the given number of line segments.- Parameters:
x- component function in the x-directiony- component function in the y-directionz- component function in the z-directiont1- beginning value of parameter ranget2- ending value of parameter rangen- number of line segments in the curve- Throws:
IllegalArgumentException- ifnis less than 1
-
-
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 ParametricCurve 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.
-
-