Package renderer.models_L
Class SurfaceOfRevolution
- java.lang.Object
-
- renderer.scene.Model
-
- renderer.models_L.ParametricSurface
-
- renderer.models_L.SurfaceOfRevolution
-
- All Implemented Interfaces:
MeshMaker
public class SurfaceOfRevolution extends ParametricSurface
Create a wireframe model of a surface of revolution around the y-axis.See https://en.wikipedia.org/wiki/Surface_of_revolution#Rotating_a_function
- See Also:
ParametricSurface
-
-
Constructor Summary
Constructors Constructor Description SurfaceOfRevolution()
Create a surface of revolution around the y-axis based on a cosine function.SurfaceOfRevolution(DoubleFunction<Double> r, double y1, double y2, double theta1, double theta2, int n, int k)
Create a surface of revolution around the y-axis with the given radial function,r = r(y)
, the given angular range for the sector of revolution, the given parameter range along the y-axis, and the given number of circles of latitude.SurfaceOfRevolution(DoubleFunction<Double> r, double y1, double y2, int n, int k)
Create a surface of revolution around the y-axis with the given radial function,r = r(y)
, the given parameter range along the y-axis, and the given number of circles of latitude.SurfaceOfRevolution(DoubleFunction<Double> x, DoubleFunction<Double> y, double s1, double s2, double theta1, double theta2, int n, int k)
Create a surface of revolution around the y-axis of the given radial parametric curve and the given angular range for the sector of revolution.SurfaceOfRevolution(DoubleFunction<Double> x, DoubleFunction<Double> y, double s1, double s2, int n, int k)
Create a surface of revolution around the y-axis of the given radial parametric curve.
-
Method Summary
-
Methods inherited from class renderer.models_L.ParametricSurface
getHorzCount, getVertCount, remake
-
Methods inherited from class renderer.scene.Model
addColor, addPrimitive, addVertex, getPrimitive, toString
-
-
-
-
Constructor Detail
-
SurfaceOfRevolution
public SurfaceOfRevolution()
Create a surface of revolution around the y-axis based on a cosine function.
-
SurfaceOfRevolution
public SurfaceOfRevolution(DoubleFunction<Double> r, double y1, double y2, int n, int k)
Create a surface of revolution around the y-axis with the given radial function,r = r(y)
, the given parameter range along the y-axis, and the given number of circles of latitude.- Parameters:
r
- radius functiony1
- beginning value along the y-axisy2
- ending value along the y-axisn
- number of circles of latitudek
- number of lines of longitude- Throws:
IllegalArgumentException
- ifn
is less than 2IllegalArgumentException
- ifk
is less than 2
-
SurfaceOfRevolution
public SurfaceOfRevolution(DoubleFunction<Double> r, double y1, double y2, double theta1, double theta2, int n, int k)
Create a surface of revolution around the y-axis with the given radial function,r = r(y)
, the given angular range for the sector of revolution, the given parameter range along the y-axis, and the given number of circles of latitude.- Parameters:
r
- radius functiony1
- beginning value along the y-axisy2
- ending value along the y-axistheta1
- beginning value of angular parameter rangetheta2
- ending value of angular parameter rangen
- number of circles of latitudek
- number of lines of longitude- Throws:
IllegalArgumentException
- ifn
is less than 2IllegalArgumentException
- ifk
is less than 2
-
SurfaceOfRevolution
public SurfaceOfRevolution(DoubleFunction<Double> x, DoubleFunction<Double> y, double s1, double s2, int n, int k)
Create a surface of revolution around the y-axis of the given radial parametric curve.- Parameters:
x
- first component function of the parametric curvey
- second component function of the parametric curves1
- beginning parameter values2
- ending parameter valuen
- number of circles of latitudek
- number of lines of longitude- Throws:
IllegalArgumentException
- ifn
is less than 2IllegalArgumentException
- ifk
is less than 2
-
SurfaceOfRevolution
public SurfaceOfRevolution(DoubleFunction<Double> x, DoubleFunction<Double> y, double s1, double s2, double theta1, double theta2, int n, int k)
Create a surface of revolution around the y-axis of the given radial parametric curve and the given angular range for the sector of revolution.- Parameters:
x
- first component function of the parametric curvey
- second component function of the parametric curves1
- beginning parameter values2
- ending parameter valuetheta1
- beginning value of angular parameter rangetheta2
- ending value of angular parameter rangen
- number of circles of latitudek
- number of lines of longitude- Throws:
IllegalArgumentException
- ifn
is less than 2IllegalArgumentException
- ifk
is less than 2
-
-