All Videos
why you NEED math for programming

why you NEED math for programming

Read the full transcript of "why you NEED math for programming" by Joma Tech. Practice English listening and reading with interactive subtitles on xLearning.

Channel: Joma Tech Duration: 5 min Sentences: 31
Get the JomaClass membership: https://joma.tech/dsa First 100 people get 15% off the yearly subscription with promo code "DONUT" Donut C article by Andy Sloane: https://www.a1k0n.net/2011/07/20/donut-math.html Music by Joy Ngiaw: https://www.joyngiaw.com/ https://www.instagram.com/joyngiaw/ 📱 SOCIAL MEDIA ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ https://www.instagram.com/jomakaze/ https://twitter.com/jomakaze https://www.facebook.com/jomakaze
Watch original video on YouTube →
Start Learning with Interactive Transcript

Full Transcript

17.1s okay
17.1s okay Music
56.4s jesus nope not jesus it's just me jesus nope not jesus it's just me what the hell is going on oh yeah um what the hell is going on oh yeah um what the hell is going on oh yeah um yeah i was working on this program and yeah i was working on this program and
56.4s jesus nope not jesus it's just me what the hell is going on oh yeah um
59.8s what the hell is going on oh yeah um
59.8s what the hell is going on oh yeah um yeah i was working on this program and
62.0s yeah i was working on this program and
62.0s yeah i was working on this program and um yeah um yeah um yeah i i think i figured it out i think i got i i think i figured it out i think i got i i think i figured it out i think i got the formula so basically if the formula so basically if
62.9s um yeah
62.9s um yeah i i think i figured it out i think i got
64.8s i i think i figured it out i think i got
64.8s i i think i figured it out i think i got the formula so basically if
66.5s the formula so basically if
66.6s the formula so basically if you merge the projection equation wait you merge the projection equation wait you merge the projection equation wait wait wait wait wait wait wait what are you doing oh right what are you doing oh right what are you doing oh right um okay let let me just show you
69.0s you merge the projection equation wait
69.0s you merge the projection equation wait wait wait
70.6s wait wait
70.6s wait wait what are you doing oh right
73.9s what are you doing oh right
73.9s what are you doing oh right um okay let let me just show you
77.3s um okay let let me just show you um okay let let me just show you let me just finish up real quick let me just finish up real quick let me just finish up real quick Music ready
77.3s um okay let let me just show you let me just finish up real quick
87.0s let me just finish up real quick
87.0s let me just finish up real quick Music
100.4s ready
100.4s ready Music
110.1s wait i i i don't follow this is that wait i i i don't follow this is that it's a donut it's a donut it's a donut it's incredible isn't it it's incredible isn't it it's incredible isn't it so so all this just so so all this just
110.2s wait i i i don't follow this is that it's a donut
111.6s it's a donut
111.6s it's a donut it's incredible isn't it
114.8s it's incredible isn't it
114.8s it's incredible isn't it so so all this just
118.1s so so all this just
118.2s so so all this just to render a donut on your terminal
127.7s what the thanks for watching what the thanks for watching the idea and code were originally from the idea and code were originally from the idea and code were originally from the amazing andy sloan the amazing andy sloan the amazing andy sloan where he was able to code this whole where he was able to code this whole
127.7s what the thanks for watching the idea and code were originally from
130.3s the idea and code were originally from
130.3s the idea and code were originally from the amazing andy sloan
132.5s the amazing andy sloan
132.5s the amazing andy sloan where he was able to code this whole
134.6s where he was able to code this whole
134.6s where he was able to code this whole program and see program and see program and see and made the code itself look like a and made the code itself look like a and made the code itself look like a donut donut donut he has an article explaining how the he has an article explaining how the
136.4s program and see
136.4s program and see and made the code itself look like a
139.3s and made the code itself look like a
139.3s and made the code itself look like a donut
140.4s donut
140.4s donut he has an article explaining how the
142.2s he has an article explaining how the
142.2s he has an article explaining how the code works which i'll link code works which i'll link code works which i'll link in the description so why is math in the description so why is math in the description so why is math important for programming important for programming important for programming well it's because even if 99
143.8s code works which i'll link
143.8s code works which i'll link in the description so why is math
146.9s in the description so why is math
147.0s in the description so why is math important for programming
148.5s important for programming
148.5s important for programming well it's because even if 99
151.9s well it's because even if 99 well it's because even if 99 of the time you won't need it there's a of the time you won't need it there's a of the time you won't need it there's a one percent chance that you might one percent chance that you might
151.9s well it's because even if 99 of the time you won't need it there's a
154.2s of the time you won't need it there's a
154.2s of the time you won't need it there's a one percent chance that you might
156.3s one percent chance that you might
156.3s one percent chance that you might and it's in those moments that separate and it's in those moments that separate and it's in those moments that separate out a great programmer out a great programmer out a great programmer from average ones and if you do know from average ones and if you do know
158.6s and it's in those moments that separate
158.6s and it's in those moments that separate out a great programmer
160.3s out a great programmer
160.3s out a great programmer from average ones and if you do know
162.7s from average ones and if you do know
162.7s from average ones and if you do know your math your math your math you'll know how to modify this donut to you'll know how to modify this donut to you'll know how to modify this donut to increase the size increase the size increase the size change the rotation or even make a cube
163.5s your math
163.5s your math you'll know how to modify this donut to
165.8s you'll know how to modify this donut to
165.8s you'll know how to modify this donut to increase the size
167.2s increase the size
167.2s increase the size change the rotation or even make a cube
170.0s change the rotation or even make a cube change the rotation or even make a cube instead instead instead also if you want to do computer graphics also if you want to do computer graphics also if you want to do computer graphics machine learning or cryptography machine learning or cryptography
170.0s change the rotation or even make a cube instead
172.0s instead
172.0s instead also if you want to do computer graphics
174.5s also if you want to do computer graphics
174.5s also if you want to do computer graphics machine learning or cryptography
176.8s machine learning or cryptography
176.8s machine learning or cryptography you're gonna need math so might as well you're gonna need math so might as well you're gonna need math so might as well get good at it get good at it get good at it as you did for programming anyway back as you did for programming anyway back
179.3s you're gonna need math so might as well
179.4s you're gonna need math so might as well get good at it
180.3s get good at it
180.3s get good at it as you did for programming anyway back
183.5s as you did for programming anyway back
183.5s as you did for programming anyway back to the donut to the donut to the donut how do we write this program well first how do we write this program well first how do we write this program well first you have to create you have to create you have to create a donut which is essentially a solid of
184.6s to the donut
184.6s to the donut how do we write this program well first
187.9s how do we write this program well first
187.9s how do we write this program well first you have to create
188.9s you have to create
189.0s you have to create a donut which is essentially a solid of
191.6s a donut which is essentially a solid of a donut which is essentially a solid of revolution revolution revolution where we have a circle that rotates where we have a circle that rotates where we have a circle that rotates around the y-axis around the y-axis around the y-axis which will make a donut aka a tourist
191.6s a donut which is essentially a solid of revolution
192.6s revolution
192.6s revolution where we have a circle that rotates
194.9s where we have a circle that rotates
194.9s where we have a circle that rotates around the y-axis
196.4s around the y-axis
196.4s around the y-axis which will make a donut aka a tourist
200.4s which will make a donut aka a tourist which will make a donut aka a tourist this is the formula to create the circle this is the formula to create the circle this is the formula to create the circle centered at r2 centered at r2 centered at r2 with radius r1 and this with radius r1 and this
200.4s which will make a donut aka a tourist this is the formula to create the circle
202.9s this is the formula to create the circle
202.9s this is the formula to create the circle centered at r2
204.6s centered at r2
204.6s centered at r2 with radius r1 and this
207.7s with radius r1 and this
207.7s with radius r1 and this is the rotation matrix to rotate this is the rotation matrix to rotate this is the rotation matrix to rotate this circle circle circle around the y axis so when we combine around the y axis so when we combine around the y axis so when we combine them them
210.3s is the rotation matrix to rotate this
210.3s is the rotation matrix to rotate this circle
210.9s circle
210.9s circle around the y axis so when we combine
213.6s around the y axis so when we combine
213.6s around the y axis so when we combine them
214.1s them
214.1s them we get the coordinates of every point on we get the coordinates of every point on we get the coordinates of every point on your donut your donut your donut now that we have a donut shut up i know now that we have a donut shut up i know
216.5s we get the coordinates of every point on
216.5s we get the coordinates of every point on your donut
218.1s your donut
218.1s your donut now that we have a donut shut up i know
220.9s now that we have a donut shut up i know
221.0s now that we have a donut shut up i know this is a bagel this is a bagel this is a bagel now that we have a donut we want to now that we have a donut we want to now that we have a donut we want to rotate it around the x rotate it around the x
222.3s this is a bagel
222.3s this is a bagel now that we have a donut we want to
224.6s now that we have a donut we want to
224.6s now that we have a donut we want to rotate it around the x
226.4s rotate it around the x
226.4s rotate it around the x and z axis so it looks cool all flying and z axis so it looks cool all flying and z axis so it looks cool all flying and stuff and stuff and stuff we can do that by multiplying our donut we can do that by multiplying our donut
229.7s and z axis so it looks cool all flying
229.7s and z axis so it looks cool all flying and stuff
230.9s and stuff
231.0s and stuff we can do that by multiplying our donut
233.3s we can do that by multiplying our donut
233.3s we can do that by multiplying our donut coordinates with coordinates with coordinates with these two rotation matrices these two rotation matrices these two rotation matrices now we have to map this 3d flying donut now we have to map this 3d flying donut
234.3s coordinates with
234.3s coordinates with these two rotation matrices
237.3s these two rotation matrices
237.4s these two rotation matrices now we have to map this 3d flying donut
240.7s now we have to map this 3d flying donut
240.7s now we have to map this 3d flying donut onto a 2d screen which will become our onto a 2d screen which will become our onto a 2d screen which will become our terminal terminal terminal so each character on the terminal will so each character on the terminal will so each character on the terminal will be a pixel
243.8s onto a 2d screen which will become our
243.8s onto a 2d screen which will become our terminal
244.7s terminal
244.7s terminal so each character on the terminal will
247.3s so each character on the terminal will
247.4s so each character on the terminal will be a pixel
248.3s be a pixel be a pixel on the screen to figure out how to shade on the screen to figure out how to shade on the screen to figure out how to shade our donut our donut our donut we calculate the dot product of the we calculate the dot product of the
248.3s be a pixel on the screen to figure out how to shade
251.5s on the screen to figure out how to shade
251.5s on the screen to figure out how to shade our donut
252.4s our donut
252.4s our donut we calculate the dot product of the
254.6s we calculate the dot product of the
254.6s we calculate the dot product of the surface normal surface normal surface normal and the direction of the light so as you and the direction of the light so as you and the direction of the light so as you can see can see can see when the normal points this way it's way
255.8s surface normal
255.8s surface normal and the direction of the light so as you
258.3s and the direction of the light so as you
258.3s and the direction of the light so as you can see
259.3s can see
259.3s can see when the normal points this way it's way
262.0s when the normal points this way it's way when the normal points this way it's way brighter brighter brighter and when it points that way it's way and when it points that way it's way and when it points that way it's way darker darker darker so the dot product will tell us how
262.0s when the normal points this way it's way brighter
262.8s brighter
262.8s brighter and when it points that way it's way
264.9s and when it points that way it's way
264.9s and when it points that way it's way darker
265.8s darker
265.8s darker so the dot product will tell us how
267.7s so the dot product will tell us how so the dot product will tell us how light or dark it is light or dark it is light or dark it is we take the result of the dot product we take the result of the dot product we take the result of the dot product and map it
267.7s so the dot product will tell us how light or dark it is
269.7s light or dark it is
269.7s light or dark it is we take the result of the dot product
272.3s we take the result of the dot product
272.3s we take the result of the dot product and map it
273.1s and map it and map it into these characters from darkest to into these characters from darkest to into these characters from darkest to brightest brightest brightest and lastly we draw that on our terminal and lastly we draw that on our terminal and lastly we draw that on our terminal and voila and voila
273.1s and map it into these characters from darkest to
276.0s into these characters from darkest to
276.0s into these characters from darkest to brightest
277.1s brightest
277.1s brightest and lastly we draw that on our terminal
279.6s and lastly we draw that on our terminal
279.6s and lastly we draw that on our terminal and voila
281.4s and voila
281.4s and voila if you like the way i teach you can if you like the way i teach you can if you like the way i teach you can check out my new course on data check out my new course on data check out my new course on data structures and algorithms structures and algorithms
283.7s if you like the way i teach you can
283.7s if you like the way i teach you can check out my new course on data
285.5s check out my new course on data
285.5s check out my new course on data structures and algorithms
287.2s structures and algorithms
287.2s structures and algorithms where i use easy to understand where i use easy to understand where i use easy to understand animations to explain these concepts animations to explain these concepts animations to explain these concepts the first 100 people to sign up for joma the first 100 people to sign up for joma
289.1s where i use easy to understand
289.1s where i use easy to understand animations to explain these concepts
292.6s animations to explain these concepts
292.6s animations to explain these concepts the first 100 people to sign up for joma
294.7s the first 100 people to sign up for joma
294.7s the first 100 people to sign up for joma class will get class will get class will get 15 percent off joma class
295.7s class will get
295.7s class will get 15 percent off joma class