4
u/ariasaurus Dec 02 '18
speaker: Let's do this simple thing ...
audience: boo!
speaker: in the console
audience: yay!
I actually like this animation and spent about a minute staring at it. Basically 2 views.
2
u/vanyakosmos Dec 02 '18
this. I literally completed only couple of basic tutorials on 3d graphics. Don't know why so many people got excited.
1
u/billsil Dec 02 '18
Cause nobody knows about backspace and up in the terminal for one. Second would be the animation part, not necessarily the math. I'd be impressed by a multifrequency sine wave traveling; the math is even easier. Basically, it looks cool.
2
u/XNormal Dec 02 '18
Double vertical resolution by using .|’|; (and spaces for background).
Don’t use unicode for even higher resolution. Keep the old school retro charm.
2
22
54
9
7
28
6
2
u/lerrigatto Dec 02 '18
So beautiful, can you pass 3d files to it?
11
u/vanyakosmos Dec 02 '18
Currently it loads hardcoded model. Maybe one day I will teach it to load from file.
1
u/alexzoin Dec 02 '18 edited Dec 02 '18
Can someone explain this to me?
If __name__ == '__main__':
main()
2
u/vanyakosmos Dec 02 '18
if script was launched directly (python this_script.py) then run main(). if script was just imported from another script then don't run main()
1
2
2
2
u/PhroznGaming Dec 02 '18
I don't understand to the math but God damn is that code beautiful.
Tip of the hat to you my friend!
1
u/ThatsALovelyShirt Dec 02 '18
It's cool, but can you do it with a projection-based viewport rather than orthographic?
1
1
1
u/lorg Dec 02 '18
Nice!
I also wrote one a few years back - http://www.algorithm.co.il/blogs/programming/python-curses-numpy-ascii-art-rotating-cube/
1
1
1
1
1
1
0
76
u/vanyakosmos Dec 01 '18
if someone need it https://github.com/vanyakosmos/ascii-canvas/blob/012b70fa57f3fe990997370b459f1cb3429268f5/playground.py