Announcement

Collapse
No announcement yet.

mathematicians needed... (sort of)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mathematicians needed... (sort of)

    Hello,

    I'm looking for a couple of 3D-plot functions that simply look nice and smooth (like a surface with a few ups and downs) and have Z-values between 0 and 1.

    Sort of like sin(x/3)+sin(y/3), but this doesn't have the correct value-range. The range of x and y doesn't matter that much (as this is just a simple scaling that might be added).
    The functions are need to make illustration for an article I'm writing... (honestly)

    Any suggestions ?



    Jörg
    pixar
    Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

  • #2
    gnuplot? Excel?
    Gigabyte P35-DS3L with a Q6600, 2GB Kingston HyperX (after *3* bad pairs of Crucial Ballistix 1066), Galaxy 8800GT 512MB, SB X-Fi, some drives, and a Dell 2005fpw. Running WinXP.

    Comment


    • #3
      Do you mean that Z will be between -2 and +2?

      You could try z(x, y) = 0.5 + 0.25 x (sin(x/3) + sin(y/3))

      Multiplying by 9.25 causes the length of the range to drop from 4 (-2 to +2) to 1 (-0.5 to 0.5). Adding 0.5 shifts it upward to {z e R } 0 <= z <= 1), which is what I understand u want.

      But then, I am not a mathematician of any sort.
      Umf
      Join MURCs Distributed Computing effort for Rosetta@Home and help fight Alzheimers, Cancer, Mad Cow disease and rising oil prices.
      [...]the pervading principle and abiding test of good breeding is the requirement of a substantial and patent waste of time. - Veblen

      Comment


      • #4
        At least one of us did not understand what VJ wanted....
        Join MURCs Distributed Computing effort for Rosetta@Home and help fight Alzheimers, Cancer, Mad Cow disease and rising oil prices.
        [...]the pervading principle and abiding test of good breeding is the requirement of a substantial and patent waste of time. - Veblen

        Comment


        • #5

          Well, scaling the function is not a problem, but I'd like other functions to generate other surfaces (as I need to have several different examples). And basically, all the sin(x)+sin(y) look similar (as do the sum of the cos); I am looking for other variations...


          Jörg
          pixar
          Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

          Comment


          • #6
            What about z=0.5+0x+0y ?
            DM says: Crunch with Matrox Users@ClimatePrediction.net

            Comment


            • #7
              It is a step in the good direction , but I feel it has too few ups and downs (but this could be my opinion) .


              Jörg
              pixar
              Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

              Comment


              • #8
                Just look at it side-on and flex the paper

                Seriously though, do you have access to Matlab? That has some very cool demos that look like what you describe and could easily be modded. (Been a while for me though...)

                HTH

                T.
                FT.

                Comment


                • #9
                  I think you could also try funnctions as:
                  z(x, y) = 0.5 + 0.25 x (sin(2x/3) + sin(0.5y/3))
                  z(x, y) = 0.5 + 0.25 x (sin(x/3) + sin(y^2))

                  Etc. They are all the "same" in a sense. It would become a bit easier if you did not only limit the "reach" (Dutch "Bereik", don't know the translation) between 0 and 1 for z, but had similar limitations on the domeins for x and y. Than we could start playing around with polynomials (limiting domeins for x and y make it easy to ensure that z will remain between 0 and 1).

                  But I know nothing about this, so find someone who can help you.
                  Join MURCs Distributed Computing effort for Rosetta@Home and help fight Alzheimers, Cancer, Mad Cow disease and rising oil prices.
                  [...]the pervading principle and abiding test of good breeding is the requirement of a substantial and patent waste of time. - Veblen

                  Comment


                  • #10
                    Tony: Thanks, I have looked at the demo's but there aren't that many and I can't seem to find the equations... (I'm using Mathcad, but I also have Maple and Matlab here) I did find the equations Derive XM (the old dos-tool) supplied, but most of them have some asymptotic behaviour just to show that the program can deal with this...

                    Umfriend: Well, the "bereik" (range ?) can easily be overcome by a scaling factor, I'm now trying equations with atan, cos and sin, as the max and min values can easily be found (and appropriate scaling factors can be used to get them in the range I require).

                    The main problem is finding something that looks nice (e.g. not too high at the beginning, as one then looks under the surface; not too step as then the surface becomes too "crowded"; ...).


                    Jörg
                    pixar
                    Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

                    Comment


                    • #11
                      What about adding a few extra harmonics in there? I mean, like sin(x) + sin(2x) + sin(3x) etc... changing the wieightings and you have a nice fourier series for x and y...
                      DM says: Crunch with Matrox Users@ClimatePrediction.net

                      Comment


                      • #12
                        Here's my personal graph that I came up with eons ago as a kid playing around with some 3D graphing program that I typed up in BASIC from a very old Byte magazine: sin(x*y)^2

                        x and y bounds = -3.14 to 3.14 (if using radians)
                        z is always 0 to 1
                        You can scale in closer to reduce the wiggles, or offset the x and y axis to remove the center of the graph.

                        Last edited by Jon P. Inghram; 26 February 2003, 12:42.

                        Comment


                        • #13
                          Great ideas !

                          Jon: I put a scaling factor in (sin(x*y/40)^2, in order to match it better with other functions (this "stretches" the graph in both X and Y direction).

                          For what it is worth, another fuction I am using now is 0.5+0.5*cos(x/4)*sin(y/3). Another one I might use is with atan(x)*cos(y), but with some constants added to y and some scaling factors.

                          Thanks !


                          Jörg
                          pixar
                          Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

                          Comment

                          Working...
                          X