3D graphing of mathematical functions

Advert

3D graphing of mathematical functions

Home Forums Beginners questions 3D graphing of mathematical functions

Viewing 25 posts - 26 through 50 (of 58 total)
  • Author
    Posts
  • #271907
    John Haine
    Participant
      @johnhaine32865

      Michael, try this:

      **LINK**

      Advert
      #271908
      Michael Gilligan
      Participant
        @michaelgilligan61133

        Thanks again, John

        MichaelG.

        #272181
        John Haine
        Participant
          @johnhaine32865

          Michael,

          OK, so your equation is this (slightly rewitten).

          form_1.jpg

          The first thing is that the numbers, 0.75 / 5 / 5, don't really add anything. The 0.75 just scales the height of the fence to that value, and the 5's scale the values of x and y. A very common thing to do in maths in this sort of situation is to "normalise" the equation by removing scale factors if they can be restored easily if you want them but otherwise just clutter up the working. In this case we would just re-write the equation like this.

          form_2.jpg

          So first I've scrubbed out the 0.75 as we can just multiply whatever value we get from the equation later by simple multiplication. Second I've removed the 5s (or actually the 25s as the 5s are squared) – if you wanted the result for particular values in the original formula you'd just multiply those values by 25 and insert the result in the second formula. It already looks simpler. Next it's written as "e to the minus()" as 1/anything is anything to the power -1. That isn't essential but looks tidier.

          You probably know that e is the so-called Euler's constant, or the base of natural logarithms. It's a bit like pi, turns up all over the place in maths. It equals 2.7182818284590452353602874713527….and goes on for ever.

          e to the power of something, or exp(something), gets very large very quickly as the something increases, it's exponential. So exp(1) = 2.717…; exp(2) = 7.389; exp(5) = 148.4…; exp(10) = 22,000.5; exp(25) = 72,004,899,337.4! As we have the reciprocal of the exponential in our formula, it gets very small very quickly. But also note that exp(0) = 1.

          So if x and / or y in our formula above were zero, the function is equal to one. x and / or y are zero along the top edges of the fence, so that's why the top is flat.

          Now imagine an ant exploring the surface carrying a tiny GPS that tells him his coordinates including height. Suppose that the y axis points North and the x axis points east. (And the earth is flat!) Now the ant crawls eastwards along a line of latitude "1" from say x=-5 to x=5. Along that line, since y equals 1, we could write the equation:

          form_3.jpg

          At y=-5 the value of z is 1/72,004,899,337.4 = next to nothing! Since x is squared, z has the same value at x=+5. At x=+2 or -2, z is 0.018, so still pretty small. x=+/-1 gives z=0.37. You can see why we get the "fence" since the function gets very small very quickly.

          If the ant crawled along y=2, the function would be

          form_4.jpg

          Since the value of the exponent is now 4 times larger, z is much smaller except when x is (if you like) 4 times closer to zero. This why the fence gets sharper as you get further from the origin.

          Incidentally, the function in the third equation is, except from some normalising factors, the same as the statistical "normal distribution" or "gaussian function". So the original function is a sort of two-dimensional gaussian (but in the real 2-d gaussian x squared and y squared are added not multiplied).

          I hope this explanation helps. Generally with most of the formulas you could apply similar technicques, by first getting rid of multiplying coefficients and then looking at the behaviour of the function if you keep one variable constant and vary the other, and do that for various "constant" values. In effect you will be producing cross-sections of the shape. The App should easily allow you to do that.

          #272184
          SillyOldDuffer
          Moderator
            @sillyoldduffer
            Posted by John Haine on 16/12/2016 13:02:58:

            Michael,

            OK, so your equation is this (slightly rewitten).

            In this case we would just re-write the equation like this.

            form_2.jpg

            John,

            Really good explanation but for us dumbos at the back would you please show step by step how you 'just' re-wrote the equation to get rid of the reciprocal?

            I know you got it right but I wasn't paying attention during that algebra lesson, and a good few others!

            Thanks,

            Dave

            #272187
            Russ B
            Participant
              @russb
              Posted by Michael Gilligan on 13/12/2016 22:10:41:

              Looking again at Ben Joffe's example [linked earlier], and qooted here:

              img_0653.jpg

              … I think I am satisfied that my version is effectively the same.

              Apologies for the panic blush

              MichaelG.

              Still looking for that introductory tutorial.

              Is the colour a representation of the z value or have you/can you add a simple 4th dimension with this program? (ie. colour – I can't think of many other ways to add a simple 4th dimension)

              #272189
              Michael Gilligan
              Participant
                @michaelgilligan61133

                John,

                Very much appreciated … I will work carefully through that [to make sure that I comprehend], before asking for more.

                I think [hope] that I can get to grips with things "this way round" … But I foresee big problems coming if I have a particular shape in mind, and wish to write an equation that produces it.

                The App is amazing, and with your encouragement I'm confident that I will at least improve my understanding.

                MichaelG.

                #272195
                John Haine
                Participant
                  @johnhaine32865
                  Posted by SillyOldDuffer on 16/12/2016 13:21:50:

                  Posted by John Haine on 16/12/2016 13:02:58:

                  Michael,

                  OK, so your equation is this (slightly rewitten).

                  In this case we would just re-write the equation like this.

                  form_2.jpg

                  John,

                  Really good explanation but for us dumbos at the back would you please show step by step how you 'just' re-wrote the equation to get rid of the reciprocal?

                  I know you got it right but I wasn't paying attention during that algebra lesson, and a good few others!

                  Thanks,

                  Dave

                  Dave, I'm sorry I can't, offhand! It's just convention that one can write exp(-x) = 1/exp(x). If you plug some numbers into a calculator you'll find it always works. It can probably be proved but I have a suspicion it needs complex variables and logarithms to do so (or at least logs).

                  #272197
                  John Haine
                  Participant
                    @johnhaine32865
                    Posted by Michael Gilligan on 16/12/2016 13:34:37:…But I foresee big problems coming if I have a particular shape in mind, and wish to write an equation that produces it.

                    That is certainly true! If you really have to do that it's an "approximation" problem and usually it will only be an approximation. Sometimes if you want a shape to do something (a cam for example) it might be easier to see if you can use a shape you can mathematically generate rather than find an approximation.

                    #272200
                    SillyOldDuffer
                    Moderator
                      @sillyoldduffer
                      Posted by John Haine on 16/12/2016 14:15:41:

                      Posted by SillyOldDuffer on 16/12/2016 13:21:50:

                      Posted by John Haine on 16/12/2016 13:02:58:

                      Michael,

                      OK, so your equation is this (slightly rewitten).

                      In this case we would just re-write the equation like this.

                      form_2.jpg

                      John,

                      Really good explanation but for us dumbos at the back would you please show step by step how you 'just' re-wrote the equation to get rid of the reciprocal?

                      I know you got it right but I wasn't paying attention during that algebra lesson, and a good few others!

                      Thanks,

                      Dave

                      Dave, I'm sorry I can't, offhand! It's just convention that one can write exp(-x) = 1/exp(x).

                      No problem John, I'll do some digging. I use conventions too, which is OK until I misremember one, or never learned it. If I find out I'll share the answer.

                      Might do it now, I've spent the afternoon downloading software only to find out it's the wrong package. A small sherry and a little maths might cheer me up.

                      Dave

                      #272222
                      Michael Gilligan
                      Participant
                        @michaelgilligan61133
                        Posted by John Haine on 16/12/2016 14:18:17:

                        Posted by Michael Gilligan on 16/12/2016 13:34:37:…But I foresee big problems coming if I have a particular shape in mind, and wish to write an equation that produces it.

                        That is certainly true! If you really have to do that it's an "approximation" problem and usually it will only be an approximation. Sometimes if you want a shape to do something (a cam for example) it might be easier to see if you can use a shape you can mathematically generate rather than find an approximation.

                        .

                        John,

                        It's more a matter of "wanting to" than "having to"

                        … as I mentioned earlier; the underlying motive for this exploration is that I want some understanding [or at least appreciation] of how biological forms develop,

                        A couple of years ago, I studied an original print of Mrs Bury's book 'Figures of remarkable forms' **LINK** https://blogs.princeton.edu/graphicarts/2007/09/one_of_the_great_botanicals.html

                        and I have been hooked ever since.

                        Alan Turing's paper on morphogenesis would [probably] explain a lot, if only I could cope with the maths … but Turing didn't have the luxury of an iPad and the QuickGraph App, so the diagrams are rather sparse.

                        MichaelG.

                        .

                        Edit: for info. here is Turing's paper … http://dna.caltech.edu/courses/cs191/paperscs191/turing.pdf

                        Edited By Michael Gilligan on 16/12/2016 16:20:14

                        #272235
                        John Haine
                        Participant
                          @johnhaine32865

                          Got it.

                          form_5.jpg

                          where you lake the logarithm to base a. But the log of 1 to any base is zero, and the log to base a of a is 1.

                          #272305
                          Roger Head
                          Participant
                            @rogerhead16992
                            Posted by SillyOldDuffer on 16/12/2016 13:21:50:

                            Posted by John Haine on 16/12/2016 13:02:58:…

                            In this case we would just re-write the equation like this.

                            form_2.jpg

                            John,

                            Really good explanation but for us dumbos at the back would you please show step by step how you 'just' re-wrote the equation to get rid of the reciprocal?

                            I know you got it right but I wasn't paying attention during that algebra lesson, and a good few others!

                            Thanks,

                            Dave

                            Dave, it's just one of those things that flash past in a maths class – if you miss it, you're stricken forever-after. You can swap terms between numerator and denominator (or visa-versa) so long as you change the sign of the exponent.

                            Another is the counter-intuitive "anything (number, expression, whatever) raised to the power of zero has a value of 1"

                            Roger

                            #272349
                            Gary Wooding
                            Participant
                              @garywooding25363

                              Hopefully, this might make exponents a little clearer…

                              exponents.jpg

                              #272425
                              SillyOldDuffer
                              Moderator
                                @sillyoldduffer

                                Thanks guys. Where were you when I was doing homework?

                                I was quite pleased with this 'show by example' as it's similar to Gary's more general approach

                                exponents.jpg

                                I would never have thought of John's logs in a month of Sundays. If only I'd paid attention at school!

                                Thanks,

                                Dave

                                #273354
                                Michael Gilligan
                                Participant
                                  @michaelgilligan61133

                                  I think I may have found my introductory text: **LINK**

                                  http://mathinsight.org/interactive_gallery_quadric_surfaces_introduction

                                  [One page in a very thoroughly hyperlinked collection of documents]

                                  The interactive examples are written in Java; so won't run on the iPad, but should be O.K. on the Mac.

                                  … so; I can transcribe equations to QuickGraph on the iPad as I work through them yes

                                  Thanks again to John & Roger for the very helpful notes.

                                  MichaelG.

                                  #273387
                                  Rik Shaw
                                  Participant
                                    @rikshaw

                                    z=z+z+z =zzz

                                    #273404
                                    Ajohnw
                                    Participant
                                      @ajohnw51620

                                      You might get a good idea of one of the points John made by looking around for maths ignoring constants. Silly idea on the face of it but can be useful. For example

                                      say something —-> 5x^2 all the 5 does is scale the basic function. The X^2 might be said to set the shape. The important aspect.

                                      I used that sort of notation, —–> as the open university was mentioned. I did M100 that was later changed a lot because of a very high drop out rate. The —–> may be read as maps too. It an approach that allows more maths to be done on functions rather than numbers. So thw something above might be f and f is a function. not a=b etc. Things like integration look entirely different. That for instance is a big I. So you might come across something like I o f. Which would be read as I circle f. There is also a square. Never had much use for it so memory fades. Other things are also chucked in, morphisms and etc. I ^-1 is what you would expect it to be. It's inverse as would f^-1.

                                      Just mentioned as I think this form of notation is more widely used now – by mathematicians. The OU course books cover this well. They also do a load of primers to get people to the same level. Good job too on M100 the scope covered was ridiculous. That may have changed.

                                      I suspect your best bet really would be a book aimed at software people. Can't help there but I did work with some one who was into this as a hobby so do know that books are available. He was probably a higher level graduate inn electronics. That does in some cases cover some unusual maths but using old style notation. Maybe that's changed now but I haven't seen any signs of it.

                                      Mathematicians aren't strange people really. Like most fields they have their own jargon and it's what they do – most if not all of the time. I have known a few graduates that wanted to do maths initially but didn't 'cause they thought it was probably too hard. What I found very difficult was that ok it may be wonderful that things are like that but what on earth do you use the maths for.

                                      Oh forgot if this function f was used it might be shown as something like f(x)  read f of x.

                                      John

                                      Edited By Ajohnw on 23/12/2016 13:01:07

                                      #273411
                                      Ajohnw
                                      Participant
                                        @ajohnw51620

                                        I had a nose around on the web but it's pretty hopeless unless it's to buy something. Searching curve sketching might help but you'll see use of derivatives and probably few basics.

                                        One other thing that I should have mentioned is something like f(x)=5x^2. That defines the function. There are probably variations on the same theme. What doesn't seem to be around is a good explanation of modern notation. I'd assume while it may be difficult to follow many people would have a grasp of the older styles. If not some cheap books going by the name of Schaum's Outline Series may help. They cover all sorts of things and probably go down to basics. They probably all aim at applied maths. The OU thingy was and may still be pure maths.

                                        John

                                        #273416
                                        John Haine
                                        Participant
                                          @johnhaine32865
                                          Posted by Ajohnw on 23/12/2016 12:34:26:What I found very difficult was that ok it may be wonderful that things are like that but what on earth do you use the maths for.

                                          John

                                          Edited By Ajohnw on 23/12/2016 12:35:47

                                          Without it you couldn't do any real engineering. Over 40-odd years in the profession I've found more and more that maths is absolutely essential and getting more so. You can't design things in the real world by just experiment and experience, most of the time that's just too expensive and sometimes fatal. Only using mathematical methods can you model and analyse how designs will work without making them first. Even if you are trying out how bits fit together using a 3D CAD package you're using complex maths within the package

                                          #273418
                                          Russell Eberhardt
                                          Participant
                                            @russelleberhardt48058
                                            Posted by Rik Shaw on 23/12/2016 09:54:42:

                                            z=z+z+z =zzz

                                            Therefore z=0

                                            Russell

                                            #273422
                                            Ajohnw
                                            Participant
                                              @ajohnw51620

                                              Pure maths doesn't really worry about the actual application John. A brief cut and paste from a google for it

                                              Broadly speaking, pure mathematics is mathematics that studies entirely abstract concepts. This was a recognizable category of mathematical activity from the 19th century onwards, at variance with the trend towards meeting the needs of navigation, astronomy, physics, economics, engineering, and so

                                              Applied which would have been far more appropriate for me wasn't taught by the OU. Instead it gave a very broad basis in a pure mathematical sense over a number of fields that some tend to specialise in. These days a course that would probably be more ideal for what I was after would be called applied maths possibly plus computation.

                                              If some one does a degree is say engineering of some sort they will be taught applied maths related to the field the degree covers.

                                              I'm not disagreeing with you. I agree entirely when it's needed. Taking the course wasn't a waste of my time at all really. It would have been nice to see some practical applications at times though. It pretty obvious in some areas but not so much in others. Sometimes that becomes clearer when I do see a practical use.

                                              As to the quote I posted take a look at this link. It's still about.

                                              **LINK**

                                              A teacher at my son's school managed to persuade him to take a pure maths A level. I tried to dissuade him but failed. He did too, besides the point – it wouldn't really relate to the field he wanted to go into and a degree in that would cover any additional maths he needed adequately. He also dropped a course that he was sure to pass. I think the teacher was just drumming up numbers so that he could teach it – rather late in terms of exam time too. This for a kid that had won a maths challenge too.

                                              John

                                              #273489
                                              John Haine
                                              Participant
                                                @johnhaine32865

                                                Trouble is, like physics, what seems pure with no practical application turns out to be vital in the future. Like group theory turns out to be important for designing error correcting codes used in mobile communications. Riemann studies non-Euclidean geometries that turn out be useful for thinking about gravity and results in corrections that have to be made to GPS to correct for clocks slowing down at different altitudes. Number theory turns out to be important in encryption. Who'da thunk it.

                                                #273498
                                                Michael Gilligan
                                                Participant
                                                  @michaelgilligan61133
                                                  Posted by John Haine on 23/12/2016 20:50:18:

                                                  Trouble is, like physics, what seems pure with no practical application turns out to be vital in the future.

                                                  .

                                                  Absolutely !!

                                                  This page is heading nicely towards 'applied' study of Radiolarian morphogenesis : **LINK**

                                                  http://www.morphogenesism.com/project/P8/p8.html

                                                  Surely, in this time of 3D printing, such studies have very practical potential.

                                                  MichaelG.

                                                  Edited By Michael Gilligan on 23/12/2016 21:12:41

                                                  #273507
                                                  Michael Gilligan
                                                  Participant
                                                    @michaelgilligan61133

                                                    Here is the link to the referenced tutorial **LINK**

                                                    http://www.grasshopper3d.com/page/tutorials-1

                                                    [towards the bottom of the page]

                                                    MichaelG.

                                                    #273508
                                                    SillyOldDuffer
                                                    Moderator
                                                      @sillyoldduffer

                                                      Radiolaria look just like Diatoms to me. Wrong again!

                                                      Trivia corner: Microscopy was a popular hobby in Victorian times, much more genteel than turning metal in a grubby workshop. Much time was spent arranging diatoms into intricate patterns that couldn't be seen with the naked eye. I like the idea of a hobby that's so exclusive it's invisible.

                                                      Dave

                                                    Viewing 25 posts - 26 through 50 (of 58 total)
                                                    • Please log in to reply to this topic. Registering is free and easy using the links on the menu at the top of this page.

                                                    Advert

                                                    Latest Replies

                                                    Home Forums Beginners questions Topics

                                                    Viewing 25 topics - 1 through 25 (of 25 total)
                                                    Viewing 25 topics - 1 through 25 (of 25 total)

                                                    View full reply list.

                                                    Advert

                                                    Newsletter Sign-up