Infinitely long 3D model
You can render with a raymarcher and using distance fields. For the hat you would define the center and radius of the cylinder, and would draw any march which falls within such circle, no matter what "height" you are in, it will be infinite. You can also add a restriction, like y > 0 to put a beginning to your hat.