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. For the math-heads

For the math-heads

Scheduled Pinned Locked Moved The Lounge
question
28 Posts 12 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.
  • M MS le Roux

    I'm playing around with graphing, and I'm trying to figure out the following: Draw a line from point A (0,10) to point B (100,10). Now draw a line from point B to point C, in such a way that C is below B, and angle ABC is 100 degrees. AB and BC have the same length. How do you calculate the coordinates of point C?

    J Offline
    J Offline
    Jason Henderson
    wrote on last edited by
    #4

    AB and BC are the same length, so we can assume they are radii of a circle with the origin at (100,10). Using polar coordinates, x=radius*(Cosine(Theta)) and y=radius*(Sine(Theta)): x=(100*cos(280)+100) = 117.365 y=(100*sin(280)+10) = -88.481 Roughly. If you apply the distance formula: distance=sqrt((x2-x1)^2 + (y2-y1)^2)) distance=sqrt(17^2 + (-98)^2)=sqrt(289+9604)=99.464 Pretty close to 100.

    "It is better to remain silent and be thought a fool than to open one's mouth and remove all doubt." - Abraham Lincoln

    Jason Henderson
    blog | articles

    D J 2 Replies Last reply
    0
    • I Iain Clarke Warrior Programmer

      I am assuming that ptC is just a little to the right of straight down from B. Just to check my vision of what you want is correct. ptC.x = ptB.x - |BC| cos (Theta); ptC.y = ptB.y - |BC| sin (Theta); |BC| = |AB| = 90 Theta = 100o = PI/4 + a bit. So, C = (115.63, -78.63). How's that? Iain.

      M Offline
      M Offline
      MS le Roux
      wrote on last edited by
      #5

      Remind me - what does Theta represent?

      I D 2 Replies Last reply
      0
      • S Shog9 0

        C.x = B.x+sine(ABC-90)*BC C.y = B.y-cosine(ABC-90)*BC = C.x = 100+sine(10)*100 C.y = 10-cosine(10)*100

        I think it's cool that Shog's coding johnson is longer than everyone elses -- JoeSox 10/8/03

        S Offline
        S Offline
        Smitha Nishant
        wrote on last edited by
        #6

        Got it all except that C.y thing. Can't figure out how you got that :-D Smitha Every person, all the events of your life, are there because you have drawn them there. What you choose to do with them is up to you. -- Richard Bach

        S 1 Reply Last reply
        0
        • S Smitha Nishant

          Got it all except that C.y thing. Can't figure out how you got that :-D Smitha Every person, all the events of your life, are there because you have drawn them there. What you choose to do with them is up to you. -- Richard Bach

          S Offline
          S Offline
          Shog9 0
          wrote on last edited by
          #7

          I'm assuming coordinate system where negative Y is down. Invert (10+ not 10-) for typical screen coordinates.

          I think it's cool that Shog's coding johnson is longer than everyone elses -- JoeSox 10/8/03

          J 1 Reply Last reply
          0
          • S Shog9 0

            I'm assuming coordinate system where negative Y is down. Invert (10+ not 10-) for typical screen coordinates.

            I think it's cool that Shog's coding johnson is longer than everyone elses -- JoeSox 10/8/03

            J Offline
            J Offline
            Jason Henderson
            wrote on last edited by
            #8

            Your answer was right.

            "It is better to remain silent and be thought a fool than to open one's mouth and remove all doubt." - Abraham Lincoln

            Jason Henderson
            blog | articles

            S 1 Reply Last reply
            0
            • J Jason Henderson

              Your answer was right.

              "It is better to remain silent and be thought a fool than to open one's mouth and remove all doubt." - Abraham Lincoln

              Jason Henderson
              blog | articles

              S Offline
              S Offline
              Shog9 0
              wrote on last edited by
              #9

              Thanks *wanders off to find some coffee*

              I think it's cool that Shog's coding johnson is longer than everyone elses -- JoeSox 10/8/03

              1 Reply Last reply
              0
              • M MS le Roux

                Remind me - what does Theta represent?

                I Offline
                I Offline
                Iain Clarke Warrior Programmer
                wrote on last edited by
                #10

                Theta was the angle ABC. In this case, 100 degrees. Iain.

                1 Reply Last reply
                0
                • I Iain Clarke Warrior Programmer

                  I am assuming that ptC is just a little to the right of straight down from B. Just to check my vision of what you want is correct. ptC.x = ptB.x - |BC| cos (Theta); ptC.y = ptB.y - |BC| sin (Theta); |BC| = |AB| = 90 Theta = 100o = PI/4 + a bit. So, C = (115.63, -78.63). How's that? Iain.

                  J Offline
                  J Offline
                  Jason Henderson
                  wrote on last edited by
                  #11

                  The length of BC is off by 10.

                  "It is better to remain silent and be thought a fool than to open one's mouth and remove all doubt." - Abraham Lincoln

                  Jason Henderson
                  blog | articles

                  I 1 Reply Last reply
                  0
                  • M MS le Roux

                    I'm playing around with graphing, and I'm trying to figure out the following: Draw a line from point A (0,10) to point B (100,10). Now draw a line from point B to point C, in such a way that C is below B, and angle ABC is 100 degrees. AB and BC have the same length. How do you calculate the coordinates of point C?

                    R Offline
                    R Offline
                    RChin
                    wrote on last edited by
                    #12

                    Draw a line from point A (0,10) to point B (100,10). Now draw a line from point B to point C, in such a way that C is below B, and angle ABC is 100 degrees. AB and BC have the same length. OK, Now my solution is as follows: (NB: I haven't done any trig. maths for quite a few years, so my memory of most trig equations are a little sketchy. Forgive my pathetic excuse of a text graph :~

                    ^
                    |
                    |

                    A(0,10) B(100,10) x D

                    *'''''''''''''''''''''''''''''''*''''''''''''+ -
                    | 100 \ 90'
                    | \ '
                    | \ '
                    | \ '
                    | \ ' y
                    | \ '
                    | \ '
                    | \ '
                    | \ '
                    | \ '
                    +-------------------------------+--------> \ '
                    |(0,0) 100 \'
                    | * C

                    AB = BC = 100
                    A<B>C = 100 deg.
                    ~ C<B>D = 180 - 100 = 80 deg.
                    ~ B<C>D = 180 - (90+80) = 10 deg.

                    since BC = 100:
                    y/BC = COS(B<C>D)
                    y/100 = COS(10);
                    := y = 100 * COS(10) = 98.48

                    X/BC = SIN(10)
                    X = 100 * Sin(10) = 17.365

                    ~ C = ( 100 + X, 10 - Y )
                    = (117.365, -88.48)

                    .QED.

                    (i'm sure some of you will prove me wrong) **I Dream of Absolute Zero


                    **

                    D 1 Reply Last reply
                    0
                    • J Jason Henderson

                      AB and BC are the same length, so we can assume they are radii of a circle with the origin at (100,10). Using polar coordinates, x=radius*(Cosine(Theta)) and y=radius*(Sine(Theta)): x=(100*cos(280)+100) = 117.365 y=(100*sin(280)+10) = -88.481 Roughly. If you apply the distance formula: distance=sqrt((x2-x1)^2 + (y2-y1)^2)) distance=sqrt(17^2 + (-98)^2)=sqrt(289+9604)=99.464 Pretty close to 100.

                      "It is better to remain silent and be thought a fool than to open one's mouth and remove all doubt." - Abraham Lincoln

                      Jason Henderson
                      blog | articles

                      D Offline
                      D Offline
                      David Stone
                      wrote on last edited by
                      #13

                      Well, you got it right...but my question is why didn't you just use cos(80) and sin(80)

                      We're given this:
                      100
                      A--------------------B
                      θ=100° \
                      \
                      100\
                      \
                      \
                      \
                      C

                      Now, if we draw an imaginary triange the other way, we can say that φ=80° because of supplementary angles.
                      Then we can say that Cx = 100 + 100 cos(80°) and Cy = 100 sin(80°):

                            100 
                      

                      A--------------------B======|
                      θ=100° \φ=80°|
                      \ |
                      100\ |
                      \ |
                      \ |
                      \|
                      C

                      What's with cos and sin of 280? Where does that come from? [EDIT] Hey, if you highlight everything in the pre tags, it looks like a guy with a really long nose and a little cap on. :-D [/EDIT]


                      When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?" -Hockey on being a geek

                      J 1 Reply Last reply
                      0
                      • R RChin

                        Draw a line from point A (0,10) to point B (100,10). Now draw a line from point B to point C, in such a way that C is below B, and angle ABC is 100 degrees. AB and BC have the same length. OK, Now my solution is as follows: (NB: I haven't done any trig. maths for quite a few years, so my memory of most trig equations are a little sketchy. Forgive my pathetic excuse of a text graph :~

                        ^
                        |
                        |

                        A(0,10) B(100,10) x D

                        *'''''''''''''''''''''''''''''''*''''''''''''+ -
                        | 100 \ 90'
                        | \ '
                        | \ '
                        | \ '
                        | \ ' y
                        | \ '
                        | \ '
                        | \ '
                        | \ '
                        | \ '
                        +-------------------------------+--------> \ '
                        |(0,0) 100 \'
                        | * C

                        AB = BC = 100
                        A<B>C = 100 deg.
                        ~ C<B>D = 180 - 100 = 80 deg.
                        ~ B<C>D = 180 - (90+80) = 10 deg.

                        since BC = 100:
                        y/BC = COS(B<C>D)
                        y/100 = COS(10);
                        := y = 100 * COS(10) = 98.48

                        X/BC = SIN(10)
                        X = 100 * Sin(10) = 17.365

                        ~ C = ( 100 + X, 10 - Y )
                        = (117.365, -88.48)

                        .QED.

                        (i'm sure some of you will prove me wrong) **I Dream of Absolute Zero


                        **

                        D Offline
                        D Offline
                        David Stone
                        wrote on last edited by
                        #14

                        You got it right. You just went through a very roundabout way of doing it. :)


                        When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?" -Hockey on being a geek

                        R 1 Reply Last reply
                        0
                        • D David Stone

                          Well, you got it right...but my question is why didn't you just use cos(80) and sin(80)

                          We're given this:
                          100
                          A--------------------B
                          θ=100° \
                          \
                          100\
                          \
                          \
                          \
                          C

                          Now, if we draw an imaginary triange the other way, we can say that φ=80° because of supplementary angles.
                          Then we can say that Cx = 100 + 100 cos(80°) and Cy = 100 sin(80°):

                                100 
                          

                          A--------------------B======|
                          θ=100° \φ=80°|
                          \ |
                          100\ |
                          \ |
                          \ |
                          \|
                          C

                          What's with cos and sin of 280? Where does that come from? [EDIT] Hey, if you highlight everything in the pre tags, it looks like a guy with a really long nose and a little cap on. :-D [/EDIT]


                          When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?" -Hockey on being a geek

                          J Offline
                          J Offline
                          Jason Henderson
                          wrote on last edited by
                          #15

                          David Stone wrote: What's with cos and sin of 280? Where does that come from? Think of it as a circle with the origin at 100,10 with a radius of 100. AB is 180 from BX (BX being the line from (100,10)-(200,10). When we add another 100 to get the ABC angle, that equals 280 on our circle. I haven't had trig for a while, but the polar coordinate system is pretty simple for me. For problems like this, I always try to think in terms of a circle.

                          "It is better to remain silent and be thought a fool than to open one's mouth and remove all doubt." - Abraham Lincoln

                          Jason Henderson
                          blog | articles

                          D 1 Reply Last reply
                          0
                          • J Jason Henderson

                            David Stone wrote: What's with cos and sin of 280? Where does that come from? Think of it as a circle with the origin at 100,10 with a radius of 100. AB is 180 from BX (BX being the line from (100,10)-(200,10). When we add another 100 to get the ABC angle, that equals 280 on our circle. I haven't had trig for a while, but the polar coordinate system is pretty simple for me. For problems like this, I always try to think in terms of a circle.

                            "It is better to remain silent and be thought a fool than to open one's mouth and remove all doubt." - Abraham Lincoln

                            Jason Henderson
                            blog | articles

                            D Offline
                            D Offline
                            David Stone
                            wrote on last edited by
                            #16

                            Jason Henderson wrote: Think of it as a circle with the origin at 100,10 with a radius of 100. AB is 180 from BX (BX being the line from (100,10)-(200,10). When we add another 100 to get the ABC angle, that equals 280 on our circle. Ah, that makes sense...okay. I see your point. Jason Henderson wrote: I haven't had trig for a while, but the polar coordinate system is pretty simple for me. I use trig a lot in Physics and 3rd semester calculus. So that's why I immediately go for trig. I learned to hate polar coordinates last semester. Ever try integrating polar equations? X|


                            When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?" -Hockey on being a geek

                            J 1 Reply Last reply
                            0
                            • D David Stone

                              You got it right. You just went through a very roundabout way of doing it. :)


                              When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?" -Hockey on being a geek

                              R Offline
                              R Offline
                              RChin
                              wrote on last edited by
                              #17

                              I haven't done these sort of maths in YEARS! I've still got it.... :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: yeah! **I Dream of Absolute Zero


                              **

                              D 1 Reply Last reply
                              0
                              • R RChin

                                I haven't done these sort of maths in YEARS! I've still got it.... :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: yeah! **I Dream of Absolute Zero


                                **

                                D Offline
                                D Offline
                                David Stone
                                wrote on last edited by
                                #18

                                Isn't math fun? :)


                                When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?" -Hockey on being a geek

                                R 1 Reply Last reply
                                0
                                • M MS le Roux

                                  Remind me - what does Theta represent?

                                  D Offline
                                  D Offline
                                  Daniel Turini
                                  wrote on last edited by
                                  #19

                                  In Portuguese, "boobies" :)


                                  Help me dominate the world - click this link and my army will grow

                                  J 1 Reply Last reply
                                  0
                                  • D David Stone

                                    Jason Henderson wrote: Think of it as a circle with the origin at 100,10 with a radius of 100. AB is 180 from BX (BX being the line from (100,10)-(200,10). When we add another 100 to get the ABC angle, that equals 280 on our circle. Ah, that makes sense...okay. I see your point. Jason Henderson wrote: I haven't had trig for a while, but the polar coordinate system is pretty simple for me. I use trig a lot in Physics and 3rd semester calculus. So that's why I immediately go for trig. I learned to hate polar coordinates last semester. Ever try integrating polar equations? X|


                                    When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?" -Hockey on being a geek

                                    J Offline
                                    J Offline
                                    Jason Henderson
                                    wrote on last edited by
                                    #20

                                    Trig is all about circles. :cool: David Stone wrote: Ever try integrating polar equations? Not that I recall.

                                    "It is better to remain silent and be thought a fool than to open one's mouth and remove all doubt." - Abraham Lincoln

                                    Jason Henderson
                                    blog | articles

                                    D 1 Reply Last reply
                                    0
                                    • J Jason Henderson

                                      Trig is all about circles. :cool: David Stone wrote: Ever try integrating polar equations? Not that I recall.

                                      "It is better to remain silent and be thought a fool than to open one's mouth and remove all doubt." - Abraham Lincoln

                                      Jason Henderson
                                      blog | articles

                                      D Offline
                                      D Offline
                                      David Stone
                                      wrote on last edited by
                                      #21

                                      Jason Henderson wrote: Trig is all about circles. Trig is all about triangles. At least that's what I was always told...and that's what I've seen. Jason Henderson wrote: Not that I recall. Lucky...it's not fun at all.


                                      When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?" -Hockey on being a geek

                                      J 1 Reply Last reply
                                      0
                                      • D David Stone

                                        Isn't math fun? :)


                                        When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?" -Hockey on being a geek

                                        R Offline
                                        R Offline
                                        Roger Wright
                                        wrote on last edited by
                                        #22

                                        Some of my students are not enjoying it much.:( Last week's exam results were so bad that I'm retesting in a week. Seriously, you'd think that people who do perfectly on homework would pay attention on an exam, rather than racing through it and failing to read the questions completely.:doh: "Your village called -
                                        They're missing their idiot."

                                        J 1 Reply Last reply
                                        0
                                        • D David Stone

                                          Jason Henderson wrote: Trig is all about circles. Trig is all about triangles. At least that's what I was always told...and that's what I've seen. Jason Henderson wrote: Not that I recall. Lucky...it's not fun at all.


                                          When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?" -Hockey on being a geek

                                          J Offline
                                          J Offline
                                          Jason Henderson
                                          wrote on last edited by
                                          #23

                                          The basics of trig were taught to me using a circle of radius 1. Almost anything can be broken into right triangles and the hypotenouses of those triangles can be seen as the radius of a circle.

                                          "It is better to remain silent and be thought a fool than to open one's mouth and remove all doubt." - Abraham Lincoln

                                          Jason Henderson
                                          blog | articles

                                          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