LaTeX is The Best Thing to Explain Computer Graphics (Olive.c Ep.12 - Math Behind 3D Projection)

  Рет қаралды 33,837

Tsoding Daily

Tsoding Daily

Жыл бұрын

References:
- Source Code: github.com/tsoding/olive.c
- Demos: tsoding.github.io/olive.c/

Пікірлер: 68
@iuc7254
@iuc7254 Жыл бұрын
Oh master Tsoding... let me be your disciple and learn thy glorious ways🙏
@brainz80
@brainz80 Жыл бұрын
Teach me senpai
@pookiepats
@pookiepats 23 күн бұрын
Teach him hentai?
@jfsherazi5549
@jfsherazi5549 Жыл бұрын
There's an interesting discussion on matrices at 44:00 around. I agree with Tsoding's sentiment in some cases. If you are just interested in doing a single rotation or a reflection, matrices can feel like using a big library to accomplish a simple task. Matrices and "regular equations" are not meant offer the same interpretation. There are _often_ better ways to reason about a matrix than to look at its entries. For instance, 3D rotation matrices look like a complicated mess of cos, sin, theta and phi but you can understand what it represents by finding an eigenvector of that matrix which is literally your axis of rotation. A shearing matrix's eigenvalues tell you how it stretches your vectors (although that's kind of easy to tell even without a matrix). This is especially useful when you have multiple transformations at once, say, you shear, rotate, translate and then rotate your vector again. In that case, the "regular equations" become much more obscure than talking about eigenvalues and eigenvectors.
@DFPercush
@DFPercush Жыл бұрын
In a way I agree with him, but at the same time, the magical black box thinking can be a great facilitator to getting things done as well. I need to scale, then rotate, then translate, then .... etc. And the fact that that entire sequence of operations can be combined into the same constant size set of 16 numbers is nothing short of magical. Of course, once you understand a matrix as basically a dot product of basis vectors it makes a lot more sense. And then you learn about quaternions lol.
@____uncompetative
@____uncompetative Жыл бұрын
Real numbered vectors are an oversimplification. Complex numbered Spinors are more fundamental than vectors and vectors can be built out of them and matrices out of vectors and tensors out of a special case of matrices.
@BboyKeny
@BboyKeny 9 ай бұрын
I prefer Geometric Algebra over Linear Algebra + Quaternions because it's easier to visualise in its entirety.
@jfsherazi5549
@jfsherazi5549 9 ай бұрын
@@BboyKeny Do you mind giving us some specific examples? I'm interested.
@dieSpinnt
@dieSpinnt 3 ай бұрын
I agree and well, it is as usual: Use the right tool for the right job:P Tsoding is right that his "manual" (without matrices) approach may help us understand the math behind 3D projections, movements, rotation, etc. a little bit easier. But he is also wrong, because those matrices ARE THE EASY approach when it comes to higher dimensional math, f.e. in physics for space-time calculations (and even the expansion of the universe itself[1]), calculations in quantum mechanics and so on. "Dirty little helpers" like matrices, quaternions and tensors just have their rightful owned place in our toolbox of mathematics, physics, chemistry ... you get it. The right answer is like in most cases: It depends .... Hehehe:) [1] The expansion of the universe is the increase in distance between gravitationally unbound parts of the observable universe with time. It is an intrinsic expansion; the universe does not expand "into" anything and does not require space to exist "outside" it. Lets put it that way: It affects light ... but us? Not even remotely:) Please read more on the topic if you like at "Expansion of the universe - Wikipedia".
@abanoubha
@abanoubha Жыл бұрын
I like it when you question anything, especially questioning matrices at 44:00 and I agree with you 99% of times. great work 👍 keep making videos ✨
@gjoe3756
@gjoe3756 Жыл бұрын
I am a simple man, I see LaTeX and I like the video
@Blubb3rbub
@Blubb3rbub Жыл бұрын
You can assign a name to a node in Tikz to reuse its coordinates and even do math with them. Might be more convenient than doing \let for every value: ode (A) at (1,2) {}; \draw (A) -- ($(A) + (3,4)$);
@andresconrado
@andresconrado Жыл бұрын
ex units are relative typographical units. 1ex = the height of the lowercase letter "x" of the current font at the current size.
@maxwellmbugua6146
@maxwellmbugua6146 Жыл бұрын
When I grow up I want to be like tscoding I'm 30 😔😂
@Pedro-jj7gp
@Pedro-jj7gp Жыл бұрын
@@ribethings What's his approach?
@ziggy6698
@ziggy6698 Жыл бұрын
LaTeX was the first "programming language" I ever learned, lol. Cool strim.
@svenwindpassinger2170
@svenwindpassinger2170 7 ай бұрын
You are right about the world is moving. If you see the screen as the retina of the real eye, you have two screens. So for each Eye its like the world is moving. Relatively to each eye (mathematically). Two different relative reference Points. Becaus of your own relative world -- you moving around in the world. To can feel it you need two different references to your own center point (you are always in the center 0,0,0 of your own Inertial system). So it's true that simultaneously the outside world makes the same in the perspective of one or many points of references. That's hard to feel. Because we normally have only oure own experience. And of this POV the rest of the world is changing relatively to our self. And at the same time for the athers its vice versa. You can call it the relatively ralativ relativity of the absolut unrelativity. So the absolut world is only absolut out of an relativ prospectivity. Sounds wired. But only if you think in one way or in another way. But if you think in both ways at once, it becomes the only possibility to be right. And so its normal. I know to follow my thinking its sometimes hard 😂. Great video ⭐⭐⭐⭐⭐ And my compliment how you work on vim. It impressed me 👍 Greetings Sven
@lame_lexem
@lame_lexem Жыл бұрын
26:37 ain't rust staticly links everything (except glibc and some other things)? unless like explicitly said to use dynamic libraries
@guywald1
@guywald1 Жыл бұрын
I think what he meant here is that either way you link (static or dynamic), you pay a "penalty" either way for reusing a library. But in LaTeX, where the output document doesn't actually use the libraries (whether including them in the binary or calling them at runtime), it doesn't matter.
@DFPercush
@DFPercush Жыл бұрын
If all your dependencies are written in Rust, yes. Anything that can be compiled from source by cargo is, by default, static linkage. But you often need something that binds to a C interface in a .so somewhere in the dependency graph, like SDL, Win32 API, OpenGL, Vulkan, etc.
@dieSpinnt
@dieSpinnt 3 ай бұрын
@@guywald1 Tsoding has his point, but he is wrong on a fundamental level. The "runtime" of a transformed LaTeX document, f.e. to Postscript format is the VIEWER[1]! Good idea and nice try, "but there is no free lunch", hehehe Also: He was joking in his usual funny and metaphysical deep minded way. There is no problem with such thoughts and statements and jokes. I had a good laugh!:) [1] Edit: The terminology may be unclear here. The software to view this document is meant here, with "VIEWER".
@snk-js
@snk-js Жыл бұрын
those first minutes are a philosophy lecture on how to trully develop systems
@maisSorteQJuizo
@maisSorteQJuizo 3 ай бұрын
when you declare the types Vector2 and Vector3 and then inside the function you define one Vector[23] and return it, how this Vector you created is not freed when you exit the function?
@eino-petterikirves1595
@eino-petterikirves1595 Жыл бұрын
epk from discord here! Thanks for great content! Do i need to swich from youtube to twich due to the fact, that russia is banning youtube?
@TECHN01200
@TECHN01200 Жыл бұрын
I should've done all my math homework in latex, no more fear of running out of room on the sheet of paper.
@user-fb5he7uz2y
@user-fb5he7uz2y Жыл бұрын
Hey, I wonder what your job is looking like, with such skills that you have
@juppertv
@juppertv Жыл бұрын
I'm feeling like Tsoding had a bad time learning math in Uni
@geiger21
@geiger21 Жыл бұрын
44:37 I understand your train of thought but it's a problem with people, not with matrices. Every such situation is a problem with people who obscure important and interesting topics to just black boxes. When you go about constructing your own perspective matrix, rotation matrix etc. it gets really intuitive and suddenly - quite simple.
@rotteegher39
@rotteegher39 Жыл бұрын
What about that 8.3 GiB folder on the bottom bar? xD
@dieSpinnt
@dieSpinnt 3 ай бұрын
You can only open that folder with small frog hands ... It's a "Pepe" meme:) Look it up, @rotteegher39
@noahwinslow3252
@noahwinslow3252 Жыл бұрын
@Tsoding Daily might be worth linking your discord and Twitch in your video descriptions
@OCPyrit
@OCPyrit Жыл бұрын
No, I don't have twitch or discord.
@rogo7330
@rogo7330 Жыл бұрын
It's just /tsoding on twitch
@Vulto166
@Vulto166 Жыл бұрын
Nowadays when people want to make a software more cross-platform compatible, they add more dependencies on top of a full already abstracted and bloated application.
@reza4egg
@reza4egg Жыл бұрын
such an ignorant generalization
@voxelrifts
@voxelrifts Жыл бұрын
@@reza4egg But it is exactly what keeps happening in the majority of the cases
@Vulto166
@Vulto166 Жыл бұрын
@@reza4egg Maybe i'm ignorant of specific cases but it doesn't matter because it's a simple yt comment. I don't have to consider every possible case.
@sfulibarri
@sfulibarri Жыл бұрын
"I will repeat what strimmer said essentially verbatim, and the other youtube commenters will think I am smart"
@Vulto166
@Vulto166 Жыл бұрын
@@sfulibarri Don't be a asshole in the comments.
@seanscon
@seanscon Жыл бұрын
please write a UI library in D
@sxmourai6897
@sxmourai6897 Жыл бұрын
Hi Tsoding! I think it would be interesting to make some coding livestreams with subscribers. It could bring a lot of good stuff and people could learn and help you. What do you think?
@rogo7330
@rogo7330 Жыл бұрын
Multithreading? Nah. Let's go AVR!
@oliveiracaio57
@oliveiracaio57 Жыл бұрын
yo, just do C-c C-c to compile and C-c C-v to view the pdf.
@darioabbece3948
@darioabbece3948 Жыл бұрын
1:07:00 Aren't you not supposed to create structs and return it like this in C? It's a dangling reference
@sleepntsheep1169
@sleepntsheep1169 Жыл бұрын
No, there is no reference being returned. You can pass/return structs by value in C, and he is doing exactly that. It's like returning an int or char, but here it's a struct
@dieSpinnt
@dieSpinnt 3 ай бұрын
@@sleepntsheep1169 You are right. Dario: There are NO "pass by reference" types in C. Passing a structure as a parameter, returning a structure from a function, and using structures in assignment statements is well defined behavior in C, meaning: as a VALUE. RTFM?!:) (It is compiler implementation dependent, but in most cases this is done via a literal call to memcpy, if the struct doesn't fit into cdecl-convention registers. This may be mitigated if the compiler implements and uses "RVO" = Copy elision, for example setting a local struct variable from a function call or an assignment.).
@user-pu5vq4vs9u
@user-pu5vq4vs9u Жыл бұрын
Это база
@twospikes7387
@twospikes7387 Жыл бұрын
это знать надо
@labsendeyshent
@labsendeyshent Жыл бұрын
First?
@karl4813
@karl4813 Жыл бұрын
I want to see you solve Tideman problem from CS50 in C
@tirangodua2858
@tirangodua2858 Жыл бұрын
Олівець?
@bee8017
@bee8017 Жыл бұрын
It’s a pun, he explains it in the first video
@dnkreative
@dnkreative Жыл бұрын
LaTeX, which is pronounced «Lah-tech» or «Lay-tech» (to rhyme with «blech» or «Bertolt Brecht»). In these words "ch" is pronounced like "k" (like in take).
@Cmanorange
@Cmanorange Жыл бұрын
Ok but you understand what he is saying. Grammar is supposed to clear up ambiguity but there is not ambiguity here. Language is for conveying ideas, not adhering to rules.
@Bobbias
@Bobbias Жыл бұрын
@@Cmanorange I mean, in this case Donalt Knuth specifically defined the correct pronunciation for LaTeX. Ultimately it does still work under the same rules, but most words don't have a ground truth pronunciation to work from.
@dieSpinnt
@dieSpinnt 3 ай бұрын
@@Bobbias Well, I am surprised that the fascist internet speech police got angry and involved in here? So ... "Bertolt Brecht"? I guess he would have something to say about that topic;) @dnkreative: Kannst du bitte den Stock aus dem Arsch nehmen? (I ask him to take the broomstick out of his rectum ... A German request to a "stiff, humorless and tense" person, to relax). Well, and of course it is just a side-note that there are countless dialects in the world, different cultures with different pronunciation and views ... And there are even more people existing, that give an actual F about some random nuts on the internet who tell them how they have to talk and think. EVEN if they are absolutely right (in their tiny little delusion of a worldview, where everything has to be in their tiny little and labeled drawers). GIF! LaTeX! ... man, you are becoming the essential part of a Monty Python sketch, now;) ROTFL
Can C actually do Perfect Bézier Curves?
2:17:22
Tsoding Daily
Рет қаралды 6 М.
Unreasonably Easy Console Apps in Rust
1:54:16
Tsoding Daily
Рет қаралды 87 М.
когда одна дома // EVA mash
00:51
EVA mash
Рет қаралды 11 МЛН
Don’t take steroids ! 🙏🙏
00:16
Tibo InShape
Рет қаралды 33 МЛН
КИРПИЧ ОБ ГОЛОВУ #shorts
00:24
Паша Осадчий
Рет қаралды 6 МЛН
Зу-зу Күлпәш.Курс (6 бөлім)
40:48
ASTANATV Movie
Рет қаралды 506 М.
C is Just Better than Bash
1:07:17
Tsoding Daily
Рет қаралды 31 М.
Why is Raylib becoming so popular?
9:24
Chris_PHP
Рет қаралды 11 М.
Is C++ better than C?
1:46:10
Tsoding Daily
Рет қаралды 27 М.
Async Engine in C
3:12:16
Tsoding Daily
Рет қаралды 31 М.
researchers hack the PS4 with a 20 year old bug
12:21
Low Level Learning
Рет қаралды 23 М.
Computer Science in TypeScript (NO DEGREE REQUIRED) (Autocell Ep.01)
2:06:54
I compared Two PDF Libraries. C one was faster than Rust one.
1:22:23
Tsoding Daily
Рет қаралды 28 М.
Jonathan Blow on Modern Graphics Programming
10:50
Jonathan Blow Clips
Рет қаралды 57 М.
Airpods’un Gizli Özelliği mi var?
0:14
Safak Novruz
Рет қаралды 4,1 МЛН
Я Создал Новый Айфон!
0:59
FLV
Рет қаралды 3,2 МЛН
How Neuralink Works 🧠
0:28
Zack D. Films
Рет қаралды 28 МЛН
Рекламная уловка Apple 😏
0:59
Яблык
Рет қаралды 822 М.
What % of charge do you have on phone?🔋
0:11
Diana Belitskay
Рет қаралды 346 М.
Готовый миниПК от Intel (но от китайцев)
36:25
Ремонтяш
Рет қаралды 385 М.
📱 SAMSUNG, ЧТО С ЛИЦОМ? 🤡
0:46
Яблочный Маньяк
Рет қаралды 935 М.