The Gray's Kleinbottle was discovered by Albert Gray. These equations were taken from Paul Bourke's webpage on Klein Bottles. To form a Gray's Kleinbottle, take a Möbius strip and attach its ends together, much like making a Möbius strip out of a plane.
The equations, adapted for use by the "XYZ Surface" generator from Blender's "Extra Objects" addon, are the following:
x: (a + cos(bu/2.0) * sin(v) - sin(bu/2.0) * sin(2v)) * cos(cu/2.0)
y: (a + cos(bu/2.0) * sin(v) - sin(bu/2.0) * sin(2v)) * sin(cu/2.0)
z: sin(bu/2.0) * sin(v) + cos(bu/2.0) * sin(2*v)
The parametric limitations are u from 0 to 4π; v from 0 to 2π.
Set the a, b, and c "helper functions" to customize the result. In the .blend file, the objects are named for their a, b, and c values (e.g., the object named GK_1.5_2_1 has a=1.5, b=2, and c=1).
Procedural rainbow texture included.
dis is awesome