Class Ring

    • Constructor Summary

      Constructors 
      Constructor Description
      Ring()
      Create a ring (annulus) in the xy-plane with outer radius 1 and with inner radius 0.33, with 12 spokes coming out of the center, and with 5 concentric circles.
      Ring​(double r1, double r2)
      Create a ring (annulus) in the xy-plane with outer radius r1 and with inner radius r2, with 12 spokes coming out of the center, and with 5 concentric circles.
      Ring​(double r1, double r2, int n, int k)
      Create a ring (annulus) in the xy-plane with outer radius r1 and with inner radius r2, with k spokes coming out of the center, and with n concentric circles (not counting the inner most circle).
    • Field Detail

      • r1

        public final double r1
      • r2

        public final double r2
      • n

        public final int n
      • k

        public final int k
    • Constructor Detail

      • Ring

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

        public Ring​(double r1,
                    double r2)
        Create a ring (annulus) in the xy-plane with outer radius r1 and with inner radius r2, with 12 spokes coming out of the center, and with 5 concentric circles.
        Parameters:
        r1 - outer radius of the ring
        r2 - inner radius of the ring
      • Ring

        public Ring​(double r1,
                    double r2,
                    int n,
                    int k)
        Create a ring (annulus) in the xy-plane with outer radius r1 and with inner radius r2, with k spokes coming out of the center, and with n concentric circles (not counting the inner most circle).

        If there are k spokes, then each circle around the center will have k line segments. If there are n concentric circles around the center (not counting the inner most circle), then each spoke will have n line segments.

        There must be at least three spokes and at least one concentric circle.

        Parameters:
        r1 - outer radius of the ring
        r2 - inner radius of the ring
        n - number of concentric circles
        k - number of spokes in the ring
        Throws:
        IllegalArgumentException - if n is less than 1
        IllegalArgumentException - if k is less than 3
    • Method Detail

      • remake

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