Class Box


  • public class Box
    extends Model
    Create a wireframe model of a cuboid aligned with the x, y, and z axes and with one corner at the origin.

    Here is a picture showing how the cuboid's eight vertices are labeled.

    
                      y
                      |
                      | v4
                      +---------------------+ v5
                     /|                    /|
                    / |                   / |
                   /  |                  /  |
                  /   |                 /   |
                 /    |                /    |
             v7 +---------------------+ v6  |
                |     |               |     |
                |     |               |     |
                |     | v0=(0,0,0)    |     | v1
                |     +---------------|-----+------> x
                |    /                |    /
                |   /                 |   /
                |  /                  |  /
                | /                   | /
                |/                    |/
                +---------------------+
               /v3                    v2
              /
             z
    
    See https://en.wikipedia.org/wiki/Cuboid
    See Also:
    Cube
    • Constructor Detail

      • Box

        public Box()
        Create a Box with all three sides of length 1.
      • Box

        public Box​(double xs,
                   double ys,
                   double zs)
        Create a Box with the given side lengths.
        Parameters:
        xs - the size of the Box along the x-axis
        ys - the size of the Box along the y-axis
        zs - the size of the Box along the z-axis