5 ms·
So whenever I read the source on things like this I always hit a blocker with the maths - I just don't understand the reasoning and theory behind it. Can anyon
by WickyNilliams 13y ago
So whenever I read the source on things like this I always hit a blocker with the maths - I just don't understand the reasoning and theory behind it.
Can anyone tell me what areas of math should I look at learning to comprehend (maybe even produce) this kind of thing?
- kaoD 13y agoActually is more physics than math, and some geometry for drawing.
- nkozyra 13y agoPhysics & geometry can only be computationally expressed via the medium of math.
- kaoD 13y agoSo what? That does not mean that he should look into math to understand the physics behind this demo. Yeah, geometry is pretty much math (that's why I separated it in the parent comment) but physics justs uses math to model and express the physic concepts. The math behind the physics on this demo is just addition, subtraction, multiplication... He shouldn't be concerned about the math, but about the physics... unless he doesn't know elementary math of course. The math behind the basic Newtonian Physics is damn simple. The geometry is very simple too (basic Euclidean Geometry, Bezier curves and that's pretty much it).
- nkozyra 13y agoI was simply correcting the notion that it's "not math." Understanding something like this can go one of two ways: 1. Reverse engineer it by playing with the code. This is, of course, the very ethos of these code share sites. 2. Learn the basics of physics & geometry on your own and come back to it. Feel free to choose either method, but for the developer who is curious, option 1 is a lot faster.
- kaoD 13y agoWell, physics IS NOT math even if physics uses math as a tool. Economics isn't math even if economics uses math all the time. The rest of your comment is correct but irrelevant. He could (and should) go learn the physics he's lacking... but he would probably not learn a single new math concept. The math needed to express these physics concepts is taught in secondary education (addition, subtraction, multiplication, vectors... not much more).
- nkozyra 13y agoPhysics is not math, true. The "physics" he didn't understand in the code IS math, though. That's the point. Even if you know physics, you won't be able to understand the code without the math.
- WickyNilliams 13y agoI could indeed reverse engineer by playing around, but it's unlikely I'd ever be able to independently produce something like that myself if I went down that path. I think both is the best, learn some theory, play around with it, rinse, repeat. That said, what areas of geometry and physics should I focus on? Any good online resources?
- WickyNilliams 13y agoApologies, I thought it would perhaps be more linear algebra. The deal is I haven't done any maths since university and I've become very rusty. I haven't done any physics in even longer! Where should I start? I guess I'd even need to know things like how to even draw a curve etc. I'm a complete amateur "physics is to math as sex is to masturbation" - XKCD
- a-nikolaev 13y agoYou are not exactly right. FYI, Newtonian mechanics = differential equations and calculus. And more advanced Lagrangian mechanics is a reinterpretation of the same ideas. I'm almost sure that Calculus was created by people like Newton in responce to the needs of mechanics and physics. The fact that the program is implemented by using " just addition, subtraction, multiplication" is irrelevant, because this is how computers (and mathematical numerical methods) work. For many great mathematicians the difference between math and physics is almost non-existent. You may also read this guy, btw https://en.wikipedia.org/wiki/Vladimir_Arnold https://en.wikipedia.org/wiki/Vladimir_Arnold
- iffyuva 13y agoYou should know how to draw things first before dwelling into maths. For eg, look at this one: https://github.com/MathiasPaumgarten/hair/blob/master/source/scripts/hair/App.js https://github.com/MathiasPaumgarten/hair/blob/master/source... and check out drawFinger, its all about drawing an arc. Once you know basics, i think its matter of time that you can produce jaw dropping things like this. coming to maths that you need to learn: learn co-ordinate geometry for all 2d related stuff.
- nkozyra 13y agoIf it makes you feel any better, I will often spend days or weeks writing such things that include a great deal of math and then look at it again after a day off and have no clue how it works. With a lot of physics-based math the best way to see what everything does (assuming you don't understand the core concepts out of the gate) is to just tweak all of the vars that contribute to size, shape and movement to see how they work.
- WickyNilliams 13y agoIt's good to hear that even people familiar with this can easily get confused about it. I think it's a sign perhaps you should comment your code more :P Seriously though it's the writing part that I couldn't do - I'd be happy to come back and not understand something if I could even write it in the first place!