Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Math Problem ...

Math Problem ...

Scheduled Pinned Locked Moved The Lounge
helpquestioncsharp
61 Posts 15 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H HalfWayMan

    But 20% = 0.2. I hope. :^) -- modified at 13:03 Tuesday 13th June, 2006 ;)

    E Offline
    E Offline
    Ed Poore
    wrote on last edited by
    #15

    HalfWayMan wrote:

    20% = 0.2

    20% = 0.2 = 2/10 = 1/5 ;P


    Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9

    1 Reply Last reply
    0
    • R Rohde

      Magnitude = 5 20% of 5 = 1. So in this case add the normalized vector to get (2.8, 3.6).

      R Offline
      R Offline
      Ray Kinsella
      wrote on last edited by
      #16

      gotcha now ... thanks ... Regards Ray "Je Suis Mort De Rire" Blogging @ Keratoconus Watch

      1 Reply Last reply
      0
      • R Ray Kinsella

        yep ... figured that out a minute ago .... brain hurts ... too long since school ... thanks to all. Regards Ray "Je Suis Mort De Rire" Blogging @ Keratoconus Watch

        E Offline
        E Offline
        Ed Poore
        wrote on last edited by
        #17

        That won't work since you're actually getting the distance that's Sqrt(2(0.2*0.2)) along the line.  Think of it as a right-angled triangle and you're using getting 0.2 along the x and 0.2 along the y so you're actually getting closer to 0.3 along the line. Give me 5 mintues and I'll write out the solution (I hope I'm right :rolleyes:)


        Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9

        Last modified: 13 June 2006 13:25:47 --

        1 Reply Last reply
        0
        • R Ray Kinsella

          Hey Guys, I have a math issue, I know how you like brain teasers so I thought I would post it here, say I have two points ab & cd, how do I find the point 20% of distance between these two points on the same slope ? Regards Ray "Je Suis Mort De Rire" Blogging @ Keratoconus Watch

          E Offline
          E Offline
          Ed Poore
          wrote on last edited by
          #18

          Ok, a reference image is provided @ http://ed.poore.googlepages.com/question.bmp[^] Basically: Let A=(a,b) Let B=(c,d) Let P=(x,y) (the point where you want to find) |AB| = √((c - a)²+(d - b)²)

          θ = arctan((d - b) / (c - a))

          x = a + (0.2*|AB|*cos(θ)) y = b + (0.2*|AB|*sin(θ))

          Some basic trig and pythagoras, you can do this by vectors, but it essentially boils down to the same thing if I remember correctly (better remember correctly since I might need it for my exam on Friday).


          Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9

          J C P 3 Replies Last reply
          0
          • E Ed Poore

            Ok, a reference image is provided @ http://ed.poore.googlepages.com/question.bmp[^] Basically: Let A=(a,b) Let B=(c,d) Let P=(x,y) (the point where you want to find) |AB| = √((c - a)²+(d - b)²)

            θ = arctan((d - b) / (c - a))

            x = a + (0.2*|AB|*cos(θ)) y = b + (0.2*|AB|*sin(θ))

            Some basic trig and pythagoras, you can do this by vectors, but it essentially boils down to the same thing if I remember correctly (better remember correctly since I might need it for my exam on Friday).


            Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9

            J Offline
            J Offline
            Jun Du
            wrote on last edited by
            #19

            This is a perfect example that how people make things more complicated than they should be:omg: This is how it works:

            x = a + (0.2*|AB|*cos(θ))) = a + 0.2*(c-a);
            y = b + (0.2*|AB|*sin(θ))) = b + 0.2*(d-b);

            BTW, I like your "θ". How come It shows "θ" in my editing panel, but not in the post? ...maybe because of my Linux (I'm using RedHat 8 at work). Signature for today: "Don't discuss math problems with a methematician."

            P E 3 Replies Last reply
            0
            • E Ed Poore

              Ok, a reference image is provided @ http://ed.poore.googlepages.com/question.bmp[^] Basically: Let A=(a,b) Let B=(c,d) Let P=(x,y) (the point where you want to find) |AB| = √((c - a)²+(d - b)²)

              θ = arctan((d - b) / (c - a))

              x = a + (0.2*|AB|*cos(θ)) y = b + (0.2*|AB|*sin(θ))

              Some basic trig and pythagoras, you can do this by vectors, but it essentially boils down to the same thing if I remember correctly (better remember correctly since I might need it for my exam on Friday).


              Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9

              C Offline
              C Offline
              Chris Losinger
              wrote on last edited by
              #20

              just look at that happy happy math! whee! x2 cos(θ4) :) Cleek | Image Toolkits | Thumbnail maker

              1 Reply Last reply
              0
              • H HalfWayMan

                But 20% = 0.2. I hope. :^) -- modified at 13:03 Tuesday 13th June, 2006 ;)

                L Offline
                L Offline
                led mike
                wrote on last edited by
                #21

                HalfWayMan wrote:

                -- modified at 13:03 Tuesday 13th June, 2006

                So based on the "date" column showing ( hrs,mins) ago and the "modified" time stamp how long did it take you to get it? :-D

                1 Reply Last reply
                0
                • E Ed Poore

                  Ok, a reference image is provided @ http://ed.poore.googlepages.com/question.bmp[^] Basically: Let A=(a,b) Let B=(c,d) Let P=(x,y) (the point where you want to find) |AB| = √((c - a)²+(d - b)²)

                  θ = arctan((d - b) / (c - a))

                  x = a + (0.2*|AB|*cos(θ)) y = b + (0.2*|AB|*sin(θ))

                  Some basic trig and pythagoras, you can do this by vectors, but it essentially boils down to the same thing if I remember correctly (better remember correctly since I might need it for my exam on Friday).


                  Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9

                  P Offline
                  P Offline
                  Paul Conrad
                  wrote on last edited by
                  #22

                  You get a division by zero if you are dealing with vertical lines.

                  E 1 Reply Last reply
                  0
                  • J Jun Du

                    This is a perfect example that how people make things more complicated than they should be:omg: This is how it works:

                    x = a + (0.2*|AB|*cos(θ))) = a + 0.2*(c-a);
                    y = b + (0.2*|AB|*sin(θ))) = b + 0.2*(d-b);

                    BTW, I like your "θ". How come It shows "θ" in my editing panel, but not in the post? ...maybe because of my Linux (I'm using RedHat 8 at work). Signature for today: "Don't discuss math problems with a methematician."

                    P Offline
                    P Offline
                    Paul Conrad
                    wrote on last edited by
                    #23

                    Though both are correct, I'd go with the simpler way since there is no worries in regards to division by zero. PJC

                    E 1 Reply Last reply
                    0
                    • J Jun Du

                      This is a perfect example that how people make things more complicated than they should be:omg: This is how it works:

                      x = a + (0.2*|AB|*cos(θ))) = a + 0.2*(c-a);
                      y = b + (0.2*|AB|*sin(θ))) = b + 0.2*(d-b);

                      BTW, I like your "θ". How come It shows "θ" in my editing panel, but not in the post? ...maybe because of my Linux (I'm using RedHat 8 at work). Signature for today: "Don't discuss math problems with a methematician."

                      E Offline
                      E Offline
                      Ed Poore
                      wrote on last edited by
                      #24

                      Jun Du wrote:

                      This is a perfect example that how people make things more complicated than they should be

                      Maybe it's more complicated but it works. Here's the proof using simple Pythagorean trig and his theorem.

                      Start with a 3,4,5 triangle with height 3 and width 4 (and hypotenuse 5).
                      If A is the bottom left-corner, located over an "origin" of (0,0) then it follows that
                          A = (0,0) (bottom-left corner)
                          B = (4,3) (top-right corner)
                          C = (4,0) (bottom-right corner)
                          θ = Angle BAC (i.e. bottom-left)
                      Also it can be shown (through Pythagorean Trigonometry) that:
                          sin(θ)=3/5
                          cos(θ)=4/5
                          tan(θ)=3/4

                      So you require 20% of the line AB (in this case it is (0.2*5) = 1).
                      We can let the co-ordinates of the end point of this line (from A along AB for 20% of AB) be X=(x,y).
                      It then follows that since we have a hypotenuse equal to 1 and the angle has remained the same that:

                      x = 1*cos(θ) = 4/5
                          y = 1*sin(θ) = 3/5

                      So from A the new point X which is 20% of the line AB is A+X, i.e: X = (0 + 4/5, 0 + 3/5) = (4/5, 3/5).

                      If you take you're equations of:
                          x = a + 0.2 * (c - a)
                          y = b + 0.2 * (d - b)
                      You will get the following answers for this case:
                          x = 0 + 0.2 * (4 - 0) = 0.2 * 2 = 2/5
                          y = 0 + 0.2 * (3 - 0) = 0.2 * 3 = 9/10
                      Which is not the same as the ones above.

                      The simplest proof that the previous equations are wrong can be shown quite simply by Pythagoras' Theorem.
                      If we assume that the triangle formed is of height and width 1 then, your equations show that the height and width of the "new" triangle which provides 20% of AB are both 0.2.
                      If you use Pythagoras on these you get a hypotenuse of √(0.2²+0.2²) which gives √0.08 which is ~0.2828, not 0.2 as you require.


                      Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9

                      C J 2 Replies Last reply
                      0
                      • P Paul Conrad

                        You get a division by zero if you are dealing with vertical lines.

                        E Offline
                        E Offline
                        Ed Poore
                        wrote on last edited by
                        #25

                        Paul Conrad wrote:

                        You get a division by zero if you are dealing with vertical lines.

                        You get division by zero if you deal with horizontal lines.  Since tanθ = opposite / adjacent (i.e. vertical over horizontal).  But it's only a couple of ifs to sort this out.  To be honest I'm suprised that so many people seem to be accepting the incorrect versions here.  All you need to know is Pythagoras (a²+o² = h²) to prove that the simpler formulae they've come up with are nonsense.


                        Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9

                        Last modified: 13 June 2006 15:56:59 --

                        P 1 Reply Last reply
                        0
                        • E Ed Poore

                          Paul Conrad wrote:

                          You get a division by zero if you are dealing with vertical lines.

                          You get division by zero if you deal with horizontal lines.  Since tanθ = opposite / adjacent (i.e. vertical over horizontal).  But it's only a couple of ifs to sort this out.  To be honest I'm suprised that so many people seem to be accepting the incorrect versions here.  All you need to know is Pythagoras (a²+o² = h²) to prove that the simpler formulae they've come up with are nonsense.


                          Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9

                          Last modified: 13 June 2006 15:56:59 --

                          P Offline
                          P Offline
                          Paul Conrad
                          wrote on last edited by
                          #26

                          Ed.Poore wrote:

                          You get division by zero if you deal with horizontal lines. Let A=(a,b) Let B=(c,d) Let P=(x,y) (the point where you want to find) |AB| = √((c - a)²+(d - b)² θ = arctan((d - b) / (c - a))

                          Check your one post because when c-a = 0, the line is vertical :) -- modified at 17:02 Tuesday 13th June, 2006

                          E 1 Reply Last reply
                          0
                          • P Paul Conrad

                            Ed.Poore wrote:

                            You get division by zero if you deal with horizontal lines. Let A=(a,b) Let B=(c,d) Let P=(x,y) (the point where you want to find) |AB| = √((c - a)²+(d - b)² θ = arctan((d - b) / (c - a))

                            Check your one post because when c-a = 0, the line is vertical :) -- modified at 17:02 Tuesday 13th June, 2006

                            E Offline
                            E Offline
                            Ed Poore
                            wrote on last edited by
                            #27

                            Oops, maybe your right, did things in a bit of rush because I've got annoyed that people can't see that the "complex" formula is the correct one, you can't get any simpler. Anyway I'm not going to argue just yet, I'm off to have some supper, I'll come back later and see if people have finally accepted it.


                            Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9

                            P 1 Reply Last reply
                            0
                            • P Paul Conrad

                              Though both are correct, I'd go with the simpler way since there is no worries in regards to division by zero. PJC

                              E Offline
                              E Offline
                              Ed Poore
                              wrote on last edited by
                              #28

                              How can both be correct, I've just posted the proof that they aren't.


                              Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9

                              1 Reply Last reply
                              0
                              • E Ed Poore

                                Oops, maybe your right, did things in a bit of rush because I've got annoyed that people can't see that the "complex" formula is the correct one, you can't get any simpler. Anyway I'm not going to argue just yet, I'm off to have some supper, I'll come back later and see if people have finally accepted it.


                                Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9

                                P Offline
                                P Offline
                                Paul Conrad
                                wrote on last edited by
                                #29

                                Ed.Poore wrote:

                                the "complex" formula is the correct one

                                The solution by Jun Du is also correct. Tried both your solution and his for several different points and I get the same answers from both. Consider if this problem was being programmed on some weird machine where no square root functions or trig functions were available via hardware, then Jun Du's solution would be best.

                                E 1 Reply Last reply
                                0
                                • J Jun Du

                                  This is a perfect example that how people make things more complicated than they should be:omg: This is how it works:

                                  x = a + (0.2*|AB|*cos(θ))) = a + 0.2*(c-a);
                                  y = b + (0.2*|AB|*sin(θ))) = b + 0.2*(d-b);

                                  BTW, I like your "θ". How come It shows "θ" in my editing panel, but not in the post? ...maybe because of my Linux (I'm using RedHat 8 at work). Signature for today: "Don't discuss math problems with a methematician."

                                  E Offline
                                  E Offline
                                  Ed Poore
                                  wrote on last edited by
                                  #30

                                  Jun Du wrote:

                                  Signature for today: "Don't discuss math problems with a methematician."

                                  Who's a methematician?


                                  Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog

                                  1 Reply Last reply
                                  0
                                  • E Ed Poore

                                    Jun Du wrote:

                                    This is a perfect example that how people make things more complicated than they should be

                                    Maybe it's more complicated but it works. Here's the proof using simple Pythagorean trig and his theorem.

                                    Start with a 3,4,5 triangle with height 3 and width 4 (and hypotenuse 5).
                                    If A is the bottom left-corner, located over an "origin" of (0,0) then it follows that
                                        A = (0,0) (bottom-left corner)
                                        B = (4,3) (top-right corner)
                                        C = (4,0) (bottom-right corner)
                                        θ = Angle BAC (i.e. bottom-left)
                                    Also it can be shown (through Pythagorean Trigonometry) that:
                                        sin(θ)=3/5
                                        cos(θ)=4/5
                                        tan(θ)=3/4

                                    So you require 20% of the line AB (in this case it is (0.2*5) = 1).
                                    We can let the co-ordinates of the end point of this line (from A along AB for 20% of AB) be X=(x,y).
                                    It then follows that since we have a hypotenuse equal to 1 and the angle has remained the same that:

                                    x = 1*cos(θ) = 4/5
                                        y = 1*sin(θ) = 3/5

                                    So from A the new point X which is 20% of the line AB is A+X, i.e: X = (0 + 4/5, 0 + 3/5) = (4/5, 3/5).

                                    If you take you're equations of:
                                        x = a + 0.2 * (c - a)
                                        y = b + 0.2 * (d - b)
                                    You will get the following answers for this case:
                                        x = 0 + 0.2 * (4 - 0) = 0.2 * 2 = 2/5
                                        y = 0 + 0.2 * (3 - 0) = 0.2 * 3 = 9/10
                                    Which is not the same as the ones above.

                                    The simplest proof that the previous equations are wrong can be shown quite simply by Pythagoras' Theorem.
                                    If we assume that the triangle formed is of height and width 1 then, your equations show that the height and width of the "new" triangle which provides 20% of AB are both 0.2.
                                    If you use Pythagoras on these you get a hypotenuse of √(0.2²+0.2²) which gives √0.08 which is ~0.2828, not 0.2 as you require.


                                    Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9

                                    C Offline
                                    C Offline
                                    Chris Losinger
                                    wrote on last edited by
                                    #31

                                    Ed.Poore wrote:

                                    x = 0 + 0.2 * (4 - 0) = ... = 2/5

                                    .2 * 4 = .8

                                    Ed.Poore wrote:

                                    y = 0 + 0.2 * (3 - 0) = 0.2 * 3 = 9/10

                                    .2 * 3 = .6 Cleek | Image Toolkits | Thumbnail maker

                                    P 1 Reply Last reply
                                    0
                                    • C Chris Losinger

                                      Ed.Poore wrote:

                                      x = 0 + 0.2 * (4 - 0) = ... = 2/5

                                      .2 * 4 = .8

                                      Ed.Poore wrote:

                                      y = 0 + 0.2 * (3 - 0) = 0.2 * 3 = 9/10

                                      .2 * 3 = .6 Cleek | Image Toolkits | Thumbnail maker

                                      P Offline
                                      P Offline
                                      Paul Conrad
                                      wrote on last edited by
                                      #32

                                      Chris Losinger wrote:

                                      .2 * 4 = .8

                                      Chris Losinger wrote:

                                      .2 * 3 = .6

                                      Last time I checked, these are the correct answers.

                                      C 1 Reply Last reply
                                      0
                                      • P Paul Conrad

                                        Chris Losinger wrote:

                                        .2 * 4 = .8

                                        Chris Losinger wrote:

                                        .2 * 3 = .6

                                        Last time I checked, these are the correct answers.

                                        C Offline
                                        C Offline
                                        Chris Losinger
                                        wrote on last edited by
                                        #33

                                        yup. he was right up until the last little bit of arithmetic. Cleek | Image Toolkits | Thumbnail maker

                                        E P 2 Replies Last reply
                                        0
                                        • P Paul Conrad

                                          Ed.Poore wrote:

                                          the "complex" formula is the correct one

                                          The solution by Jun Du is also correct. Tried both your solution and his for several different points and I get the same answers from both. Consider if this problem was being programmed on some weird machine where no square root functions or trig functions were available via hardware, then Jun Du's solution would be best.

                                          E Offline
                                          E Offline
                                          Ed Poore
                                          wrote on last edited by
                                          #34

                                          Paul Conrad wrote:

                                          The solution by Jun Du is also correct.

                                          :wtf: How?  Can you provide some proof!


                                          Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9

                                          P 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups