Monday, January 19, 2026

🖥 Klein Bottle Wireframe

EDIT: I had a little bug in the program causing part of the "blue area" of the graph getting painted black because of an out of bound RGB color component.  So I've added the following highlighted line to the  updated version of the program:

ccc = 110 + z * 150
ccc = MAX( MIN( ccc, 255 ), 0 )
COLOR _RGB( ccc, ccc, 255 - ccc )

This "Klein Bottle" program is a port and mod of a QBJS program by "Vince" which was shared with the QB64pe community via this post. (Vince's source code is presented in an embedded QBJS IDE, so you can also run the program "right there".)

Read about the "Klein Bottle" in this Wikipedia article.

You can zoom in/out of the image using the scroll wheel on a mouse.

This BAM version of the program adds color to the image and uses very tiny circles instead of points (at the intersections of lines in the wireframe.)



No comments:

Post a Comment

🖥 Klein Bottle Wireframe

EDIT: I had a little bug in the program causing part of the "blue area" of the graph getting painted black because of an out of bo...