Class RingSector

    • Field Detail

      • r1

        public final double r1
      • r2

        public final double r2
      • theta1

        public final double theta1
      • theta2

        public final double theta2
      • n

        public final int n
      • k

        public final int k
    • Constructor Detail

      • RingSector

        public RingSector()
        Create half a ring (annulus) in the xy-plane with outer radius 1, inner radius 0.33, with 7 spokes coming out of the center, and with 5 concentric circles.
      • RingSector

        public RingSector​(double r1,
                          double r2,
                          double theta1,
                          double theta2,
                          int n,
                          int k)
        Create a sector of a ring (annulus) in the xy-plane with outer radius r1, inner radius r2, starting angle theta1, ending angle theta2, with k spokes coming out of the center, and with n concentric circles.

        If there are k spokes, then each (partial) circle around the center will have k-1 line segments. If there are n concentric circles around the center, then each spoke will have n-1 line segments.

        There must be at least four spokes and at least two concentric circle.

        Parameters:
        r1 - outer radius of the ring
        r2 - inner radius of the ring
        theta1 - beginning angle of the sector (in radians)
        theta2 - ending angle of the sector (in radians)
        n - number of concentric circles
        k - number of spokes in the ring
        Throws:
        IllegalArgumentException - if n is less than 2
        IllegalArgumentException - if k is less than 4
    • Method Detail

      • remake

        public RingSector 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