Thread: Can someone help me to math?

  1. #16
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by Alpo View Post
    Well like I understand what's happening to some extent, I can't understand why. Like if I'm at (1, 1) in a unit circle, and I want to move to (-1, -1) why can't I just multiply ( x * -1 ), where -1 is the cos() of the new point (and multiply y by the new sin)? Why does he add and subtract the extra fields (in bold)?
    Well, the point (1, 1) is not on the unit circle, for one thing...

    But even if it was... consider your proposed operation which moves (1, 1) to (-1, -1). First, I have no idea if that's a rotation unless you give me another example. You could be using an operation that takes every point to (-1, -1). Ok, assume then that you've specified you want a rotation. Is negating both coordinates enough? Yes it is, if you only ever rotate by 180 degrees. If you plug 180 degrees into these equations, you'll see that the sin() terms become zero and, lo and behold they aren't needed.

    Problem is you may want to rotate by an angle that isn't 180 degrees...
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  2. #17
    Registered User Alpo's Avatar
    Join Date
    Apr 2014
    Posts
    877
    Quote Originally Posted by brewbuck View Post
    Well, the point (1, 1) is not on the unit circle, for one thing...

    But even if it was... consider your proposed operation which moves (1, 1) to (-1, -1). First, I have no idea if that's a rotation unless you give me another example. You could be using an operation that takes every point to (-1, -1). Ok, assume then that you've specified you want a rotation. Is negating both coordinates enough? Yes it is, if you only ever rotate by 180 degrees. If you plug 180 degrees into these equations, you'll see that the sin() terms become zero and, lo and behold they aren't needed.

    Problem is you may want to rotate by an angle that isn't 180 degrees...
    Thanks, yeah I had worked out it was applicable in only 1 case. I'm bad about that. Now that I think on it though, it's not a totally useless concept. You use something like that to do a horizontal or vertical flip of something with less calculations than the original code (I think).

    The actual points I was referencing was sin(x) = cos(x) = .707 (45 degree acute angle) rotated to sin(x) = cos(x) = -.707. (I explained this later down, I was just confused).

    I'm actually in a part of the trig book now where we derive all the trigonometric identities. I've been testing MegaFiddle's idea about the polar coordinates against the identities I come across to see if they match the functions math (haven't found anything yet, I'm going a bit slow though).
    WndProc = (2[b] || !(2[b])) ? SufferNobly : TakeArms;

  3. #18
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Quote Originally Posted by Elysia View Post
    And remember: no math proofs. Only intuitive proofs. If you provide graphical representation of the proofs, then even better. Many people learn better if they can see something graphically.
    I wouldn't agree with "no math proofs". I do agree with adopting teaching style - and a range of teaching styles - that accommodates a reasonable range of capabilities of students. Presenting "something graphically" to people with a theoretical bent does a disservice too.

    There are people who grasp "math proofs" quite easily but get bored with "graphical" presentations, others who learn best with "graphical" presentations, and a fair few who cope well with either. If a teacher is dogmatic (sticks to one approach or another) some students will suffer.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  4. #19
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by grumpy View Post
    I wouldn't agree with "no math proofs". I do agree with adopting teaching style - and a range of teaching styles - that accommodates a reasonable range of capabilities of students.
    Indeed. In my own experience one of the most exhilarating moments for my students is when I slowly build the proof for the quadratic formula on the board, carefully explaining each step. Not only they are able to understand it, they can no longer forget the formula and can more easily understand its constituents; the discriminant and the importance of -b/2a in studying of the parabola.

    It's a somewhat easy proof to understand and has the added benefit of making students better appreciate the power of elementary algebra as a means to obtain and generalize proofs. I often get students on the 9th and 10th grade who still have trouble moving from numeric to symbolic mathematics.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #20
    Registered User Alpo's Avatar
    Join Date
    Apr 2014
    Posts
    877
    Quote Originally Posted by grumpy View Post
    There are people who grasp "math proofs" quite easily but get bored with "graphical" presentations, others who learn best with "graphical" presentations, and a fair few who cope well with either. If a teacher is dogmatic (sticks to one approach or another) some students will suffer.
    I can agree with that. One thing though is that when a person wants to learn a thing, they tend to convert what the teacher says into something they can understand. This is sort of inevitable to some extent, as teachers are people too (who may only be able to explain a thing as they understand it). I always appreciated teachers who would give serious consideration of a question, rather than dismissing it and bringing it back to their favorite type of explanation.
    WndProc = (2[b] || !(2[b])) ? SufferNobly : TakeArms;

  6. #21
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Alpo View Post
    I always appreciated teachers who would give serious consideration of a question, rather than dismissing it and bringing it back to their favorite type of explanation.
    This is hard to avoid as not only the person doing the question, but the entire class needs to follow the answer. Many of those favorite type of explanations are tried and true methods of teaching. And sometimes it is students who don't want to use their heads. It's not always the teacher fault that a concept isn't understood. Although students like to think so.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Math
    By knightjp in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 04-01-2009, 05:36 PM
  2. Basic Math Problem. Undefined Math Functions
    By gsoft in forum C Programming
    Replies: 1
    Last Post: 12-28-2004, 03:14 AM
  3. Math in C++
    By Soccerman1234 in forum C++ Programming
    Replies: 5
    Last Post: 01-22-2004, 12:34 PM
  4. Help with Math...
    By OneStiffRod in forum C++ Programming
    Replies: 4
    Last Post: 10-10-2002, 04:20 PM
  5. Gah! More math!
    By BMJ in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 10-02-2002, 09:33 PM