3 ms·
Thanks! I upvoted you but forgot to reply. Those are as interesting as I thought they'd be.
by trealira 2y ago
Thanks! I upvoted you but forgot to reply. Those are as interesting as I thought they'd be.
- kragen 2y agoAwesome, I'm glad you liked them! I probably should have said in my original comment that the 3-D rotation itself was only 3 of the 15 lines: s = 0.1 # sine c = (1 - s**2)**0.5 # cosine ... cube = [(c*x + s*z, y, -s*x + c*z) for x, y, z in cube] # Rotate by theta. The rest was ASCII art, animation, perspective projection, and geometry generation.