Interactive ‘Slinky Thing’

July 16th, 2011 | Categories: general math, just for fun, mathematica, Wolfram Demonstrations | Tags:

Over at Playing with Mathematica, Sol Lederman has been looking at pretty parametric and polar plots.  One of them really stood out for me, the one that Sol called ‘Slinky Thing’ which could be generated with the following Mathematica command.

ParametricPlot[{Cos[t] - Cos[80 t] Sin[t], 2 Sin[t] - Sin[80 t]}, {t, 0, 8}]

Out of curiosity I parametrised some of the terms and wrapped the whole thing in a Manipulate to see what I could see. I added 5 controllable parameters by turning Sol’s equations into

{Cos[e t] - Cos[f t] Sin[g t], 2 Sin[h t] - Sin[i t]}, {t, 0, 8}

Each parameter has its own slider (below). If you have Mathematica 8, or the free cdf player, installed then the image below will turn into an interactive applet which you can use to explore the parameter space of these equations.

Interactive Slinky Thing

Here are four of my favourites.  If you come up with one that you particularly like then feel free to let me know what the parameters are in the comments.
My fav slinky things

  1. July 16th, 2011 at 10:52
    Reply | Quote | #1

    I started playing with the applet just after finishing this post and came up with a couple more that I liked. For example,

    e=5
    f=80
    g=80
    h=55
    i=50

    or, to use a more compact notation

    [5 80 80 55 50]

  2. July 16th, 2011 at 10:53
    Reply | Quote | #2

    [4 79 3 3 74]

  3. July 18th, 2011 at 19:19
    Reply | Quote | #3

    I experimented in recreating the plotting applet just using HTML5 controls, for anyone who wants to play with the parameters without using the cdf player extension.

    http://dpcarlisle.blogspot.com/2011/07/slinky-canvas.html

  4. July 18th, 2011 at 19:48
    Reply | Quote | #4

    Hi David

    Thanks for that…it looks great. I tried to say as much on your blog but had difficulty with your comment system.

    Cheers,
    Mike

  5. July 18th, 2011 at 22:33
    Reply | Quote | #5

    @Mike Croucher

    Sorry about the comment problem, it’s just an out-the-box blogger setup, I had the horrible CAPTCHA word verification thing on as I was getting junk comments but I’ve turned it off again.

  6. Matt T
    July 28th, 2011 at 18:55
    Reply | Quote | #6

    Bollocks. Now I have to write a MATLAB version, don’t I?

  7. July 28th, 2011 at 19:25
    Reply | Quote | #7

    @Matt well you don’t HAVE to but it is kinda traditional ;)

  8. Nessdude
    August 6th, 2011 at 09:40
    Reply | Quote | #8

    Here are some that my friend and I came up with:
    35 35 70 70 1
    35 70 70 70 33
    70 35 35 44 55
    70 35 35 61 61
    70 35 35 70 79
    72 35 35 70 72
    70 70 29 12 70
    31 52 52 52 31
    59 59 60 60 58
    57 57 56 57 56
    57 58 57 57 57
    7 67 40 20 60
    77 77 20 20 60
    39 80 19 20 60
    39 80 39 20 20
    39 20 41 20 20
    39 20 79 20 60
    40 79 40 20 60
    39 20 79 20 20
    40 20 40 20 60
    80 20 40 20 60
    1 1 80 80 80
    80 80 1 1 1
    80 80 80 80 80
    80 80 1 1 80
    80 80 80 80 70
    1 1 80 80 1
    57 50 57 50 30
    41 79 40 80 80
    78 79 79 80 80
    40 79 40 80 80
    78 79 40 80 80
    78 79 79 80 80
    79 79 79 80 80
    1 79 79 80 80
    2 79 79 80 80
    47 80 47 40 40
    53 20 47 20 80

  9. August 8th, 2011 at 16:51
    Reply | Quote | #9

    @Nessdude Wow! Some really nice ones there, thanks for sharing your findings.

  10. Matt T
    August 11th, 2011 at 13:52

    @Mike Croucher
    Sent you the code — share and enjoy!

  11. Nasser M. Abbasi
    September 10th, 2011 at 15:28

    fyi,

    If you set the following: e=14, f=31, g=54, h=50, i=36, then change quality to any value over 15, then you will see a problem with the program.

    –Nasser

  12. September 11th, 2011 at 07:58

    Thanks for that Nasser. The problem occurs with any set of parameters e,f,g,h,i

    As you point out, a quality factor of more than 15 causes an error.

  13. September 11th, 2011 at 08:10

    I’ve uploaded a fixed version where the maximum quality is 15. This is because the maximum MaxRecursion that is allowed is 15.

    Thanks so much for pointing out the error.

    Cheers,
    Mike

  14. Simone
    November 24th, 2011 at 18:00

    65 71 6 39 39