Class ConeSector

    • Field Detail

      • r

        public final double r
      • h

        public final double h
      • t

        public final double t
      • theta1

        public final double theta1
      • theta2

        public final double theta2
      • n

        public final int n
      • k

        public final int k
    • Constructor Detail

      • ConeSector

        public ConeSector()
        Create half of a right circular cone with its base in the xz-plane, a base radius of 1, height 1, and apex on the positive y-axis.
      • ConeSector

        public ConeSector​(double r,
                          double h,
                          double theta1,
                          double theta2,
                          int n,
                          int k)
        Create a part of the cone with its base in the xz-plane, a base radius of r, height h, and apex on the y-axis.

        The partial cone is a cone over the circular sector from angle theta1 to angle theta2 (in the counterclockwise direction). In other words, the (partial) circles of latitude in the model extend from angle theta1 to angle theta2 (in the counterclockwise direction).

        The last two parameters determine the number of lines of longitude and the number of (partial) circles of latitude in the model.

        If there are n circles of latitude in the model (including the bottom edge), then each line of longitude will have n line segments. If there are k lines of longitude, then each (partial) circle of latitude will have k-1 line segments.

        There must be at least four lines of longitude and at least one circle of latitude.

        Parameters:
        r - radius of the base in the xz-plane
        h - height of the apex on the y-axis
        theta1 - beginning longitude angle of the sector (in radians)
        theta2 - ending longitude angle of the sector (in radians)
        n - number of circles of latitude around the cone
        k - number of lines of longitude
        Throws:
        IllegalArgumentException - if n is less than 2
        IllegalArgumentException - if k is less than 4
      • ConeSector

        public ConeSector​(double r,
                          double h,
                          double t,
                          double theta1,
                          double theta2,
                          int n,
                          int k)
        Create a part of the cone with its base in the xz-plane, a base radius of r, height h, and apex on the y-axis.

        If 0 < t < h, then the partial cone is a frustum with its base in the xz-plane and the top of the frustum at y = t.

        The partial cone is a cone over the circular sector from angle theta1 to angle theta2 (in the counterclockwise direction). In other words, the (partial) circles of latitude in the model extend from angle theta1 to angle theta2 (in the counterclockwise direction).

        The last two parameters determine the number of lines of longitude (not counting one edge of any removed sector) and the number of (partial) circles of latitude (not counting the top edge of the frustum) in the model.

        If there are n circles of latitude in the model (including the bottom edge but not the top edge of the frustum), then each line of longitude will have n+1 line segments. If there are k lines of longitude (not counting one edge of any removed sector), then each (partial) circle of latitude will have k line segments.

        There must be at least four lines of longitude and at least two circles of latitude.

        Parameters:
        r - radius of the base in the xz-plane
        h - height of the apex on the y-axis
        t - top of the frustum of the come
        theta1 - beginning longitude angle of the sector (in radians)
        theta2 - ending longitude angle of the sector (in radians)
        n - number of circles of latitude around the cone
        k - number of lines of longitude
        Throws:
        IllegalArgumentException - if n is less than 2
        IllegalArgumentException - if k is less than 4
        IllegalArgumentException - if h is less than t
    • Method Detail

      • remake

        public ConeSector remake​(int n,
                                 int k)
        Description copied from interface: MeshMaker
        Build an instance of the Model with new values for the number of lines of latitude and longitude while keeping all the other model parameters the same.
        Specified by:
        remake in interface MeshMaker
        Parameters:
        n - number of lines of latitude for the returned Model
        k - number of lines of longitude for the returned Model
        Returns:
        a new instance of the Model with the updated parameters