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. Trying To Add Sine Waves

Trying To Add Sine Waves

Scheduled Pinned Locked Moved The Lounge
questiondata-structures
37 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.
  • S Sascha Lefevre

    Looks like there's something weird going on with frequency and phase shift: Take 3.1415 as phase shift and then look at the graphs for the frequencies 1 and 2.. That 2.06 value I got with a frequency of 3: Look at phase shifts 0, 0.5, 1, 1.5, 2.06 ..

    If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

    OriginalGriffO Offline
    OriginalGriffO Offline
    OriginalGriff
    wrote on last edited by
    #16

    It looks fine for me: 2.06 radians as a phase shift with a frequency of 3 looks about right given that

    3 * (2.06 / 2) = 3.09 ~= π

    Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

    "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
    "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

    S 1 Reply Last reply
    0
    • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

      Wikipedia:

      In general, mathematically important relationships between the sine and cosine functions and the exponential function (see, for example, Euler's formula) are substantially simplified when angles are expressed in radians, rather than in degrees, grads or other units. Therefore, in most branches of mathematics beyond practical geometry, angles are generally assumed to be expressed in radians.

      And that's the case in .NET or JavaScript and Java and PHP too...All except radians and not degrees...

      Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

      K Offline
      K Offline
      Kenneth Haugland
      wrote on last edited by
      #17

      360 degrees is just for the stupid humans since we like whole numbers. Non-rational numbers aren't so nice for us. Pi is a number to describe the relations in a circle, and it is basically how Sinus and Cosinus are defined.

      9 Kornfeld Eliyahu PeterK L 3 Replies Last reply
      0
      • C C P User 3

        I am looking for a website which will allow me to add sine waves. Can someone tell me what question to ask Google ? I know several questions that ***don't*** work. I want to... - Input the frequency - Input the phase angle - Input the amplitude (nice to have, not required) - Click on a button - See the resulting wave form (save as PNG or whatever would be nice) These phrases and questions don't work... - *free online graphing tool to add two sine waves together - online graph, adding two sine waves together - add two sine waves together - add two sound waves together - Add two frequencies - Online Tone generator* Certainly I'm not the only guy on the internet who has ever wanted this. What question do I ask ? How do I phrase it ?

        K Offline
        K Offline
        Kenneth Haugland
        wrote on last edited by
        #18

        If you have problems finding this on google, you might just as well create a program that does it :D

        C 1 Reply Last reply
        0
        • C C P User 3

          Nice catch. Thank you and you are voted up My physics is messed up. If I add two sine waves, same amplitude, same frequency, but off by 180 degrees, I'm supposed to get zero. Wave Adder gives me a much lower amplitude, but not zero. Am I missing something ? Maybe congress changed the laws of physics.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #19

          Quote:

          Maybe congress changed the laws of physics.

          Not Congress. It was Al Gore!

          Get me coffee and no one gets hurt!

          1 Reply Last reply
          0
          • K Kenneth Haugland

            360 degrees is just for the stupid humans since we like whole numbers. Non-rational numbers aren't so nice for us. Pi is a number to describe the relations in a circle, and it is basically how Sinus and Cosinus are defined.

            9 Offline
            9 Offline
            9082365
            wrote on last edited by
            #20

            Kenneth Haugland wrote:

            how Sinus and Cosinus are defined

            Are you sure about that? The ratio of sides of a triangle is totally independent of the units used to measure the angle.

            I am not a number. I am a ... no, wait!

            K 1 Reply Last reply
            0
            • K Kenneth Haugland

              360 degrees is just for the stupid humans since we like whole numbers. Non-rational numbers aren't so nice for us. Pi is a number to describe the relations in a circle, and it is basically how Sinus and Cosinus are defined.

              Kornfeld Eliyahu PeterK Offline
              Kornfeld Eliyahu PeterK Offline
              Kornfeld Eliyahu Peter
              wrote on last edited by
              #21

              I think that 2π is very nice...

              Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

              "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

              OriginalGriffO F 2 Replies Last reply
              0
              • K Kenneth Haugland

                360 degrees is just for the stupid humans since we like whole numbers. Non-rational numbers aren't so nice for us. Pi is a number to describe the relations in a circle, and it is basically how Sinus and Cosinus are defined.

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #22

                That's why I bought a watch in 2 PI :laugh:

                1 Reply Last reply
                0
                • OriginalGriffO OriginalGriff

                  It looks fine for me: 2.06 radians as a phase shift with a frequency of 3 looks about right given that

                  3 * (2.06 / 2) = 3.09 ~= π

                  Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

                  S Offline
                  S Offline
                  Sascha Lefevre
                  wrote on last edited by
                  #23

                  The effect of the phase shift should be independent of the frequency. A phase shift of π will always "flip" a sine graph horizontally. Now enter a frequency of 2 and look at the graphs for a phase shift of 0 and then 3.141 :laugh:

                  If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

                  OriginalGriffO 1 Reply Last reply
                  0
                  • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                    I think that 2π is very nice...

                    Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

                    OriginalGriffO Offline
                    OriginalGriffO Offline
                    OriginalGriff
                    wrote on last edited by
                    #24

                    I prefer ><(((o> π

                    Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

                    "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                    "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                    Kornfeld Eliyahu PeterK 1 Reply Last reply
                    0
                    • S Sascha Lefevre

                      The effect of the phase shift should be independent of the frequency. A phase shift of π will always "flip" a sine graph horizontally. Now enter a frequency of 2 and look at the graphs for a phase shift of 0 and then 3.141 :laugh:

                      If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

                      OriginalGriffO Offline
                      OriginalGriffO Offline
                      OriginalGriff
                      wrote on last edited by
                      #25

                      See what you mean, but I see what they are doing as well.

                      Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

                      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                      S 1 Reply Last reply
                      0
                      • OriginalGriffO OriginalGriff

                        I prefer ><(((o> π

                        Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

                        Kornfeld Eliyahu PeterK Offline
                        Kornfeld Eliyahu PeterK Offline
                        Kornfeld Eliyahu Peter
                        wrote on last edited by
                        #26

                        I meant apple π and cherry π :-D

                        Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

                        "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

                        OriginalGriffO 1 Reply Last reply
                        0
                        • OriginalGriffO OriginalGriff

                          See what you mean, but I see what they are doing as well.

                          Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

                          S Offline
                          S Offline
                          Sascha Lefevre
                          wrote on last edited by
                          #27

                          OriginalGriff wrote:

                          but I see what they are doing as well.

                          Don't think so: f=2, p=0 -> draw yellow, add, add -> double amplitude f=2, p=0 -> draw yellow, add; f=2, p=3.141 -> add -> double amplitude, should be flat.

                          If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

                          1 Reply Last reply
                          0
                          • 9 9082365

                            Kenneth Haugland wrote:

                            how Sinus and Cosinus are defined

                            Are you sure about that? The ratio of sides of a triangle is totally independent of the units used to measure the angle.

                            I am not a number. I am a ... no, wait!

                            K Offline
                            K Offline
                            Kenneth Haugland
                            wrote on last edited by
                            #28

                            Well, its all connected: Sin(2*pi*n) = 0 Without pi the Taylor series is sin and cosine is pretty much useless in Fourier Transform for instance.

                            1 Reply Last reply
                            0
                            • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                              I think that 2π is very nice...

                              Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

                              F Offline
                              F Offline
                              Forogar
                              wrote on last edited by
                              #29

                              Shakespeare Geometry: 2π or not 2π? (That is the question.)

                              - I would love to change the world, but they won’t give me the source code.

                              1 Reply Last reply
                              0
                              • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                                I meant apple π and cherry π :-D

                                Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

                                OriginalGriffO Offline
                                OriginalGriffO Offline
                                OriginalGriff
                                wrote on last edited by
                                #30

                                Wouldn't that be iπ?

                                Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

                                "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                                "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                                1 Reply Last reply
                                0
                                • OriginalGriffO OriginalGriff

                                  Does that mean I have to become racist and get a comb-over? :laugh:

                                  Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

                                  Richard Andrew x64R Offline
                                  Richard Andrew x64R Offline
                                  Richard Andrew x64
                                  wrote on last edited by
                                  #31

                                  OriginalGriff wrote:

                                  Does that mean I have to become racist and get a comb-over?

                                  Obama doesn't have a comb-over. :rolleyes:

                                  The difficult we do right away... ...the impossible takes slightly longer.

                                  1 Reply Last reply
                                  0
                                  • K Kenneth Haugland

                                    If you have problems finding this on google, you might just as well create a program that does it :D

                                    C Offline
                                    C Offline
                                    C P User 3
                                    wrote on last edited by
                                    #32

                                    Hold it, Microsoft *Excel* will do that, I think. Yes ? No ? Will LibreOffice *Impress* also do the same thing ? I seem to remember this from 3 or 4 years ago. We did this with some procedure.

                                    K 1 Reply Last reply
                                    0
                                    • C C P User 3

                                      Hold it, Microsoft *Excel* will do that, I think. Yes ? No ? Will LibreOffice *Impress* also do the same thing ? I seem to remember this from 3 or 4 years ago. We did this with some procedure.

                                      K Offline
                                      K Offline
                                      Kenneth Haugland
                                      wrote on last edited by
                                      #33

                                      No, please sir, not Excel. Its sooo crude that any person can use it :laugh: And dont get me started on the macros, one for every operation :sigh:

                                      1 Reply Last reply
                                      0
                                      • OriginalGriffO OriginalGriff

                                        This do it? Wave Adder[^] My Google query was "how to add waves graphically" and it was the 6th link.

                                        Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

                                        C Offline
                                        C Offline
                                        C P User 3
                                        wrote on last edited by
                                        #34

                                        Now if only I could make the lines fatter, and choose the color ! Beggars can't be choosers ? Bah ! Humbug !

                                        1 Reply Last reply
                                        0
                                        • L Lost User

                                          maybe the Phase shift should be entered in rad and not degrees?

                                          X Offline
                                          X Offline
                                          xperroni
                                          wrote on last edited by
                                          #35

                                          That's it. Enter 3.14 instead of 180.

                                          "Whereas smaller computer languages have features designed into them, C++ is unusual in having a whole swathe of functionality discovered, like a tract of 19th century Africa." -- Verity Stob http://www.theregister.co.uk/2006/05/05/cplusplus\_cli/

                                          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