will turn this into a game very soon! Really really fast screen space culling notes on how it works are below. I know it's hard to read, I tried my best :( the reason for the jitter when rotating is due to the variable size changing ever so slightly (eg 1.12 is visually larger than 1)
you project the points position to each axis then (per axis) store this data in a tree during traversal transform the screen bounding box (BB) by the camera matrix - project screen BB to all axes, resulting in x-min, x-max range and a y-min, y-max range - initialise a drawbuffer of size (dimensions - 1) traverse the tree per node: { if subtree_span intersects screen_span: | if vertex intersects screen_span | | if first axis; | | replace [index] in the cull buffer with (1) | | if intermediate; | | | if previous axis index is 1 | | | | replace [index] in the cull buffer with (1) | | if final axis; | | | | add (idx) to drawbuffer | check child subtrees } during rendering: - invert camera matrix - transform all points by this inverse before projecting