We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
Lex Fridman · 8.9M views · 226.2K likes Short
Analysis Summary
Worth Noting
Positive elements
- This video provides a concise, accessible breakdown of how 3D projection and ASCII shading work in a historically significant piece of code.
Influence Dimensions
How are these scored?About this analysis
Knowing about these techniques makes them visible, not powerless. The ones that work best on you are the ones that match beliefs you already hold.
This analysis is a tool for your own thinking — what you do with it is up to you.
Transcript
here on the left is a spinning ASCII donut and on the right is a donut shaped C code by Andy Sloan that generates it now with syntax highlighting now I recommend you check out Andy's blog post on the mathematics behind a flying spinning Taurus AKA donut the link to the post is in the description the basic steps are create a circle then create a Taurus by rotating the circle about the y-axis then using rotation matrices spin a donut around the x and z axes finally project the donut onto the 2D screen adding illumination by calculating the surface normal after picking a particular light source the cool thing is because this is ASCII world there's different characters associated with different levels of luminance we can go back to the de-africated version of the code that I generated adding a microsecond sleeve function to Aid in the animation compiling and running the code we get our spinning donut there's a lot of parameters that you can control with this donut including the field of view and the distance of the donor from the viewer I spend at least an hour every day learning and exploring outside my main line of work so I thought it'd be cool to uh start throwing together quick little videos about things that I find beautiful whether they're basic or advanced in the world of machine learning math computer science programming psychology whatever even biology physics history and philosophy so hope this is uh a value fun and something you would enjoy
Video description
"Donut math: how donut.c works" blog post by Andy Sloane: https://www.a1k0n.net/2011/07/20/donut-math.html Deobfuscated code: https://bit.ly/2BITbQm