Class Disk

    • Field Detail

      • r

        public final double r
      • n

        public final int n
      • k

        public final int k
    • Constructor Detail

      • Disk

        public Disk()
        Create a disk in the xy-plane with radius 1, with 12 spokes coming out of the center, and with 6 concentric circles around the disk.
      • Disk

        public Disk​(double r)
        Create a disk in the xy-plane with radius r, with 12 spokes coming out of the center, and with 6 concentric circles around the disk.
        Parameters:
        r - radius of the disk
      • Disk

        public Disk​(double r,
                    int n,
                    int k)
        Create a disk in the xy-plane with radius r, with k spokes coming out of the center, and with n concentric circles around the disk.

        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, then each spoke will have n line segments.

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

        Parameters:
        r - radius of the disk
        n - number of concentric circles
        k - number of spokes in the disk
        Throws:
        IllegalArgumentException - if n is less than 1
        IllegalArgumentException - if k is less than 3
    • Method Detail

      • remake

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