Procedural mesh cube with 24 vertices?

Thanks for the great explanation.