Class Octahedron

    • Constructor Summary

      Constructors 
      Constructor Description
      Octahedron()
      Create a regular octahedron with its center at the origin, having side length sqrt(2) = 1.4142, with its center plane given by the four vertices (±1, 0, ±1).
      Octahedron​(int n)
      Create a regular octahedron with its center at the origin, having side length sqrt(2) = 1.4142, with its center plane given by the four vertices (±1, 0, ±1).
      Octahedron​(int n1, int n2, int n3)
      Create a regular octahedron with its center at the origin, having side length sqrt(2) = 1.4142, with its center plane given by the four vertices (±1, 0, ±1).
      Octahedron​(int n1a, int n1b, int n2a, int n2b, int n3a, int n3b)
      Create a regular octahedron with its center at the origin, having side length sqrt(2) = 1.4142, with its center plane given by the four vertices (±1, 0, ±1).
    • Field Detail

      • n1

        public final int n1
      • n2

        public final int n2
      • n3

        public final int n3
    • Constructor Detail

      • Octahedron

        public Octahedron()
        Create a regular octahedron with its center at the origin, having side length sqrt(2) = 1.4142, with its center plane given by the four vertices (±1, 0, ±1). and with the top and bottom vertices being (0, ±1, 0).
      • Octahedron

        public Octahedron​(int n)
        Create a regular octahedron with its center at the origin, having side length sqrt(2) = 1.4142, with its center plane given by the four vertices (±1, 0, ±1). and with the top and bottom vertices being (0, ±1, 0).

        Add line segments fanning out from the top and bottom vertices to the sides around the center plane.

        Parameters:
        n - number of lines fanning out from the top and bottom on each side of the octahedron
        Throws:
        IllegalArgumentException - if n1 is less than 0
        IllegalArgumentException - if n2 is less than 0
      • Octahedron

        public Octahedron​(int n1,
                          int n2,
                          int n3)
        Create a regular octahedron with its center at the origin, having side length sqrt(2) = 1.4142, with its center plane given by the four vertices (±1, 0, ±1). and with the top and bottom vertices being (0, ±1, 0).

        Add line segments fanning out from each vertex to its opposite sides.

        Parameters:
        n1 - number of lines fanning out from the top and bottom on each side of the octahedron
        n2 - number of lines fanning out from v0 and v2 on each side of the octahedron
        n3 - number of lines fanning out from v1 and v3 on each side of the octahedron
        Throws:
        IllegalArgumentException - if n1 is less than 0
        IllegalArgumentException - if n2 is less than 0
        IllegalArgumentException - if n3 is less than 0
      • Octahedron

        public Octahedron​(int n1a,
                          int n1b,
                          int n2a,
                          int n2b,
                          int n3a,
                          int n3b)
        Create a regular octahedron with its center at the origin, having side length sqrt(2) = 1.4142, with its center plane given by the four vertices (±1, 0, ±1). and with the top and bottom vertices being (0, ±1, 0).

        Add line segments fanning out from each vertex to its opposite sides.

        Parameters:
        n1a - number of lines fanning out from the top on each side of the octahedron
        n1b - number of lines fanning out from the bottom on each side of the octahedron
        n2a - number of lines fanning out from v0 on each side of the octahedron
        n2b - number of lines fanning out from v1 on each side of the octahedron
        n3a - number of lines fanning out from v2 on each side of the octahedron
        n3b - number of lines fanning out from v3 on each side of the octahedron
        Throws:
        IllegalArgumentException - if n1a is less than 0
        IllegalArgumentException - if n1b is less than 0
        IllegalArgumentException - if n2a is less than 0
        IllegalArgumentException - if n2b is less than 0
        IllegalArgumentException - if n3a is less than 0
        IllegalArgumentException - if n3b is less than 0
    • Method Detail

      • remake

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