Learn Trigonometry with JavaScript

  Рет қаралды 14,563

Radu Mariescu-Istodor

Radu Mariescu-Istodor

Күн бұрын

Пікірлер: 83
@georgecrisan9499
@georgecrisan9499 Жыл бұрын
Thanks For guys with magic mouse on macos or a trackpad, replace onwheel with onscroll. (It should work for everyone actually.) Note toRad function is not needed with this approach. let pos = 0; document.onscroll = (event) => { const scrollY = window.scrollY.toFixed(0); // Make - 0.02 and 0.02 whatever you like (higher is faster) theta -= scrollY > pos ? - 0.02 : 0.02; pos = scrollY; if (scrollY < 5 || scrollY > 15000) { scrollTo(0, 5000); } update(); }; // On document load set page down to 5000 so we have a bit of play zone scrollTo(0, 5000); also make the body very large in height and the canvas a position of fixed. Why? Because now you are looking at the scroll position against the window and not at the event (you don't have onwheel with magic mouse, remember?) It works excellent. Here is the CSS. .canvasStyle { background-color: honeydew; position: fixed; } body { background-color: teal; margin: 0; height: 20000px; padding: 0; } My implementation can be found at github [dot] com / GeorgeCrisan / math-trigo. Credit to Radu.
@Radu
@Radu Жыл бұрын
Wow, awesome :-) It even works when I press the mouse wheel and move the mouse up and down. Would have been really easy to do that and control the speed when testing / animating things for the video. Thanks, and also thanks for donating, but I feel I should be paying you :-D [btw: radian(s), not radiant]
@Radu
@Radu Жыл бұрын
I gave you a shoutout in my new ML video (description has the timestamp).
@engincandinc9328
@engincandinc9328 10 ай бұрын
I usually don't comment much but couldn't help myself but to drop this here: I've recently discovered your channel and OMG feels like I found treasure, never seen smt like this on youtube before. Your ability to teach complex subjects in a simple way is unreal. Thanks a lot for sharing your wisdom, appreciated. Keep up the great work!
@Radu
@Radu 10 ай бұрын
Thank you for the nice comment :-)
@Android-17
@Android-17 Жыл бұрын
How do you always find something interesting to do with the simplest things! Just amazing.
@Radu
@Radu Жыл бұрын
Glad to hear you found it interesting :-)
@Colaholiker
@Colaholiker 11 ай бұрын
Awesome explanation for someone who totally failed in everything math related. But now I crave for the most geometric food there is: Pizza. A circle, made out of triangles, packed in a square box. (fade out and "no, no no" moment...)
@Radu
@Radu 11 ай бұрын
:-))) good one!
@zohaibqurban7386
@zohaibqurban7386 Жыл бұрын
Sir, you are best teacher in the world.
@Radu
@Radu Жыл бұрын
Don't know about that, but good if you learn :-)
@vasudev16180
@vasudev16180 Жыл бұрын
You always blew my mind, Radu! You are one of my Top 10 KZbinrs. Thank you for being awesome. Please continue doing great videos.
@Radu
@Radu Жыл бұрын
Thanks for the nice comment. I'll try :-)
@sharmarahul384
@sharmarahul384 Жыл бұрын
I love trigonometry. I started loving it when I knew sin and cos is used to make a circle motion in javascript!
@Radu
@Radu Жыл бұрын
Yeah :-) kind of same experience with me as well!
@tristangibbs8488
@tristangibbs8488 Жыл бұрын
This is wonderful!! Something like this for Vectors would be great too. Great job, I love the channel.
@Radu
@Radu Жыл бұрын
Next week ;-)
@despot979
@despot979 10 ай бұрын
Thank you for the amazing job. I've managed to code along and finish and got very inspired to continue with next lessons.
@Radu
@Radu 10 ай бұрын
Really happy to hear :-) Thanks for watching!
@2difficult2do
@2difficult2do 8 ай бұрын
Thank you for such a good lesson ☝️😼👍You explained almost every line of your code and it made everything clearer...
@Radu
@Radu 8 ай бұрын
Glad to hear it was clear :-)
@ssikarim
@ssikarim 11 ай бұрын
I love this man. thanks Radu. Your videos are tresors.
@Radu
@Radu 11 ай бұрын
Glad you like them! :-)
@pesterenan
@pesterenan Жыл бұрын
This is awesome! I'm still watching but I had to comment at the use of the XOR operator at 28:30. That is genius! Allows for a more concise writing, and I believe I've never used it before! Hahaha Incredible Radu! Keep up the good work!
@Radu
@Radu Жыл бұрын
Still wondering if it's the best way to do that part. I avoided talking about it because it would have taken too much 'attention'.
@negaaa5080
@negaaa5080 Жыл бұрын
This is exactly what I needed
@Radu
@Radu Жыл бұрын
Really hope it helps!
@Azorman534
@Azorman534 Жыл бұрын
Always brilliant, thanks for your efforts. I've made a few changes to recreate the normal anticlockwise sense in positive angles and and corresponding functions sin, cos and tan. But due to how the coordinates are measured (from Top and Left corner canvas) I'm with you that your way is more natural. No one would make a video to create doubts in your public. Best stuff in KZbin!!! Thanks and keep on teaching us, waiting for the next KZbin session and code to analyze. ;D
@Radu
@Radu Жыл бұрын
Of course, when you know how to code you can change things and make it even clearer like that. Good job :-)
@julienverkest3623
@julienverkest3623 Жыл бұрын
26:05 I love this moment
@Radu
@Radu Жыл бұрын
:-)
@benedictlutab2370
@benedictlutab2370 Жыл бұрын
Awesome. More maths like Linear Algebra and Calculus series in the future with Javascript maybe?
@Radu
@Radu Жыл бұрын
Yes. Next week, 2D vectors :-)
@NoName-lu5tg
@NoName-lu5tg Жыл бұрын
@@Radu wow that will be super cool, as I am currently learning linear algebra. Btw what will be your approach, like it will be for machine learning or for using it in game physics.
@Radu
@Radu Жыл бұрын
I think I missed your comment. I probably will end up using vectors for both.
@joshuabyrd2629
@joshuabyrd2629 Жыл бұрын
I have not watched this yet. But a whole math for game dev course would be awesome from you.
@Radu
@Radu Жыл бұрын
Maybe someday :-)
@skylerengland4707
@skylerengland4707 Жыл бұрын
Just so you know, your song made me subscribe ... 😂 Now, I'll watch the video 🤣🤣🤣🤣
@Radu
@Radu Жыл бұрын
Note to self: sing more, code less :-D
@___d3p1
@___d3p1 Жыл бұрын
Very creative development and explanation as always! :)
@Radu
@Radu Жыл бұрын
Thank you!
@osamaabozahra
@osamaabozahra Жыл бұрын
Thanks Radu, great video as always 👍 👌
@Radu
@Radu Жыл бұрын
Thanks! :-)
@sergeys5270
@sergeys5270 Жыл бұрын
Thank you! Amazing!
@Radu
@Radu Жыл бұрын
Glad you liked it!
@comoyun
@comoyun Жыл бұрын
That's a very useful tutorial
@Radu
@Radu Жыл бұрын
Glad to hear :-)
@NoName-lu5tg
@NoName-lu5tg Жыл бұрын
Great video, thanks. I really needed this
@Radu
@Radu Жыл бұрын
Good. Happy I made it :-D
@shakedrosenblat1925
@shakedrosenblat1925 10 ай бұрын
Thank you Radu
@Radu
@Radu 10 ай бұрын
You're welcome! Thanks for watching :-)
@edgaremmanuel3197
@edgaremmanuel3197 Жыл бұрын
awesome content
@Radu
@Radu Жыл бұрын
Thank you!
@MikkelGissel
@MikkelGissel Жыл бұрын
Great stuff again, Radu! As a Danish educator, I really appreciate the many layers and levels of learning you reach with these things, incredible! Did you do something on svg's yet? Also guide to make and maintain npm package for math utils (not completely vanilla, but hey =)
@Radu
@Radu Жыл бұрын
Thank you Mikkel :-) I didn't do SVG yet... I might someday. I will use node soon, in the machine learning course I'm currently planning (to be out in January)!
@abdelrahmanmohamed-xo4bf
@abdelrahmanmohamed-xo4bf Жыл бұрын
Hey can you recommend books for js Cuz i love learning from books and thanks for your awesome videos
@Radu
@Radu Жыл бұрын
Don't really know of good books... Things change so quickly, that books become old quickly. Staying up to date with online documentation / tutorials is the way to go.
@javifontalva7752
@javifontalva7752 Жыл бұрын
Could you make nore vida where you teach Maths through Javascript? I think this is a very cool way to learn Maths.
@Radu
@Radu Жыл бұрын
I might, let's see :-)
@vladyslav-py-js-cs
@vladyslav-py-js-cs 9 ай бұрын
wow it's really cool😁
@Radu
@Radu 8 ай бұрын
Glad you liked it :-)
@ahmadkhudai
@ahmadkhudai Жыл бұрын
amazing video. thanks :)
@Radu
@Radu Жыл бұрын
No problem :-)
@vivekp9206
@vivekp9206 Жыл бұрын
Hi.Why are you using Math.hypot to calculate the distance between two points?
@Radu
@Radu Жыл бұрын
I often use different ways to calculate the distance, just so people know they exist. Hypot is objectively better if dealing with large values, but here it's not really the case. If you want to learn more about distances I have these videos: kzbin.info/www/bejne/n6K2na2Pjcl5sNk kzbin.info/www/bejne/aaOzqJmjp6iqjNk
@sean_reyes
@sean_reyes Жыл бұрын
just like the brilliant app...
@Radu
@Radu Жыл бұрын
Is it? I haven't used it, but I know they have nice things :-)
@sanjivjadhav7789
@sanjivjadhav7789 6 ай бұрын
this is great but it doesn't work in my vs code and browser?
@Radu
@Radu 6 ай бұрын
It should... could I see the code?
@alnajafyprogrammer3460
@alnajafyprogrammer3460 10 ай бұрын
you are prof thaaaaaaaaaaaaaank you radu may alla save you
@Radu
@Radu 10 ай бұрын
:-)
@jengkhaw15
@jengkhaw15 Жыл бұрын
Nice thumbnail :D
@Radu
@Radu Жыл бұрын
Thanks ;-)
@soussousalahiddine5933
@soussousalahiddine5933 Жыл бұрын
you are awesome
@Radu
@Radu Жыл бұрын
Thank you :-)
@ashokd1998
@ashokd1998 Ай бұрын
Where it creates
@Radu
@Radu Ай бұрын
Not sure what you mean...
@NoName-tj8dm
@NoName-tj8dm Жыл бұрын
Just 🙏🙏
@Radu
@Radu Жыл бұрын
:-)
@oneseventwonine4342
@oneseventwonine4342 Жыл бұрын
coding with radu sir
@Radu
@Radu Жыл бұрын
:-)
@lionelgibaudan3592
@lionelgibaudan3592 10 ай бұрын
Fantastic tuts !!! Tell me, at @9:00 when you draw the coordinates axis you use ctx.lineTo(ctx.canvas.width-offset.x, 0); to draw the 'x' axis, but it works too with the simpler line ctx.lineTo(offset.x, 0); does it matter?
@Radu
@Radu 10 ай бұрын
No, it doesn't matter. You're right :-) you found a simpler way!
Learn 2D Vectors with JavaScript
43:20
Radu Mariescu-Istodor
Рет қаралды 10 М.
Trigonometry Concepts - Don't Memorize! Visualize!
32:35
Dennis Davis
Рет қаралды 2,9 МЛН
1, 2, 3, 4, 5, 6, 7, 8, 9 🙈⚽️
00:46
Celine Dept
Рет қаралды 78 МЛН
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 3 МЛН
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 195 МЛН
two
25:47
Tamiz Maths!
Рет қаралды 3
Researchers thought this was a bug (Borwein integrals)
17:26
3Blue1Brown
Рет қаралды 3,7 МЛН
A math GENIUS taught me how to LEARN ANYTHING in 3 months (it's easy)
8:52
Python Programmer
Рет қаралды 865 М.
Let’s Find the ANGLE - Basic Trig Functions (sin, cos, tan)
16:24
TabletClass Math
Рет қаралды 103 М.
Why is calculus so ... EASY ?
38:32
Mathologer
Рет қаралды 1,7 МЛН
10 Math Concepts for Programmers
9:32
Fireship
Рет қаралды 1,9 МЛН
Distance from Point to Segment Explained using JavaScript
25:11
Radu Mariescu-Istodor
Рет қаралды 5 М.
WebGPU :: Javascript at the speed of Light
20:02
Visionary 3D
Рет қаралды 84 М.