Processing Tutorial: Creating Trippy Animations with the Superformula

Поділитися
Вставка
  • Опубліковано 1 бер 2016
  • The superformula is a mathematical formula created by Johan Gielis which can be used to draw lots of cool shapes. In this tutorial, we plot the superformula using the Processing programming language.
    This video covers:
    - The difference between Cartesian and polar coordinates, and how to convert between the two;
    - How to transfer a mathematical formula into Processing code;
    - How to animate the superformula by changing parameters over time (this is the fun part!).

КОМЕНТАРІ • 88

  • @farismoumin6048
    @farismoumin6048 8 років тому +23

    thanks , when maths and arts are mixed , they make pure beauty

  • @lsudol
    @lsudol 7 років тому +18

    You did an excellent job of describing something complex. Thank you!

  • @timmorphine
    @timmorphine 7 років тому

    Thank you, Alex, I'm currently learning processing from books and I got tired of doing simple boring still stuff in the beginning, I'm glad I found your videos. Totally wish for more, have fun.

  • @ishadawaher-bakhos1048
    @ishadawaher-bakhos1048 7 років тому

    Thank you so much. Finish the video, and now I'm tweaking your code. It's beautiful!

  • @stigmollerhansen
    @stigmollerhansen 8 років тому +4

    A concise hands-on explanation of the Superformula. Thank you for taking the time to put this together and share it. Regarding the hole in the shape, changing the endShape() to endShape(CLOSE) will do the trick.

    • @alexmiller
      @alexmiller  8 років тому

      +Stig Møller Hansen Thanks! I chose not to use endShape(CLOSE) because I thought it looked weirder than having a hole. But it's a good thing to mention, so thanks for posting!

  • @rzeka
    @rzeka 8 років тому

    Please continue making these!

  • @MemeticArts
    @MemeticArts 6 років тому +8

    Really enjoyed your explanation and demo, great stuff. I thought you might be interested in seeing some of the work I've been doing with the SuperFormula as well. It uses the same basic script that you are using, but I'm connecting the generated points as a set of 3600 line segments. Then, based on the length of the segment (or a range, actually, e.g. >.1 and

  • @dididi8274
    @dididi8274 7 років тому

    this is super fun~! much appreciated!!!

  • @quinxx12
    @quinxx12 3 роки тому

    Great simple and effective exercise!

  • @liz_3d
    @liz_3d 8 років тому

    This is an amazing video man, explained a lot , thanks !

  • @danieltorres1487
    @danieltorres1487 7 років тому

    Awesome, keep up the good work!

  • @incarts8818
    @incarts8818 6 років тому

    Super nice tutorial! Great job, helped me a lot! Thank you very much sir!

  • @blind377
    @blind377 7 років тому

    Great video! It really helped me understand processing and implementing more complicated math. :)

  • @gregfield4457
    @gregfield4457 8 років тому

    Very helpful tutorial Thanks! very professional

  • @chicapercebe
    @chicapercebe 2 роки тому

    I loved this video, thank you!

  • @h92o
    @h92o 6 років тому

    Thanks you kept me interested even when thinking I had done all this by using sin and cos as oscillating factors at the end,, I made this in basic on an apple 2e in high school we didn’t have the super formula but I had altered and for looped the color palette...we also made polar flowers.. flowers can be made if I think about it probably with negative parameters in the super formula..

  • @BFoltyn7
    @BFoltyn7 8 років тому +2

    An article about HelloGames' NoMan'sSky brought me here. Fascinating! #proceduralgeneration

  • @jupiterjs031
    @jupiterjs031 7 років тому

    very cool

  • @mortifiedlobster
    @mortifiedlobster 3 роки тому

    wavy bro thank you

  • @alltaken0
    @alltaken0 5 років тому

    cool bananas mate!

  • @sunrising4931
    @sunrising4931 6 років тому

    you teach exallent plz make some more video on genrative art on processing and also 3d art...

  • @rikerwilliams8209
    @rikerwilliams8209 6 років тому

    Can you share the code for moving "imported images" in Processing like this video? Thanks

  • @henrynator99
    @henrynator99 4 роки тому +2

    Would it be possible to mix this with the minim library for loading sounds to create animations that oscillate according the amplitude of the sounds being played.

  • @Benfry57
    @Benfry57 5 років тому

    Using a simplex noise library in javascript. Add some alpha to the background for a smoother undulating effect. Looks organic.
    let tt = theta / 2*PI;
    let time = t - (tt * delay);
    let noise = simplex.noise2D(cos(time), sin(tt))
    let rad = r(
    theta,
    1.0, //a
    1.0 + noise, //b
    6.0, //m
    1.0, //n1
    cos(t) * 0.2, //n2
    sin(t) * 0.2 //n3
    );

  • @sarahlauzon4531
    @sarahlauzon4531 7 років тому

    Thank you so much for making this video! I am working on a project for university and this has helped me tremendously. Any suggestions on how to turn this into a 3D shape? Great video :)

  • @EmergencyTemporalShift
    @EmergencyTemporalShift 8 років тому

    startShape is only drawing a single point for me, line()s work fine, I have the exact same code. Do you have any idea what the problem could be? It loops but doesn't change theta, odd. I stopped multiplying the sine and cosine by rad, that seems to have worked.
    Edit: I put rad in the sin and cos instead of theta.

  • @surface64
    @surface64 6 років тому

    Charming, but, for me, complicated. Anyway I have a question, can you enter imput data with electronic music in .wav or .mp3 or .flac format instead of mouse movements? This way, you can record music videos in a totally automatic way. If so, can you post the list to be copied in processing? Thank you

  • @Avionics1958
    @Avionics1958 7 років тому

    if I have to give a mark for your teaching it has to be 100%.

  • @smellthel
    @smellthel 4 роки тому +2

    I don’t know what your talking about but I’ll like anyways.

    • @quinxx12
      @quinxx12 3 роки тому

      he might be hypnotizing us with this formula!

  • @philipposphilippou7235
    @philipposphilippou7235 7 років тому

    Hello, Really great tutorial. Instead of using the mouse to make the shape animated can I use Kinect 2? I am trying to do that by adding the org.openkinect.processing library and I am getting nowhere. Please note I am just learning Processing 3. Any ideas how to? thanks

  • @DasCartoonLand
    @DasCartoonLand 4 роки тому

    thanks for explaining. i would appreciate if you pasted the code into the description.

  • @quinxx12
    @quinxx12 3 роки тому

    A question about some annoyance within the animation: Maybe you noticed in the endresult that there is this one part of the form on the right side which is oscillating heavily and even jumps around. I couldn't get rid of that, changing any parameters. Does anyone know what is effecting it and how to deal with it?

  • @pinklady7184
    @pinklady7184 6 років тому +1

    What software are you using?

  • @TheWaterTune
    @TheWaterTune 6 років тому +2

    Right up untill 11:00 it stops working for me! 'Unexpected token: float' on
    float rad = r(theta);
    I redid the code over and over again and the same issue repeats. What am I doing wrong!?

    • @alltaken0
      @alltaken0 5 років тому

      last number does not require a komma .... ,

  • @ishadawaher-bakhos1048
    @ishadawaher-bakhos1048 7 років тому

    How do you know so much about maths? I'd like learn more in order to apply them on Processing and others.

    • @alexmiller
      @alexmiller  7 років тому +11

      I don't actually know that much! If you're interested in applying math to programming, you'd probably like this channel: ua-cam.com/users/codingmath

    • @ishadawaher-bakhos1048
      @ishadawaher-bakhos1048 7 років тому +8

      Oh, yes, I'm already subscribed. Thank you, anyway. By the way, I'm tweaking both of your processing codes for a final project of physics and fluids at uni. The subject is just about programming on processing. I will credit you. :-)

  • @ClearNinjaFox
    @ClearNinjaFox 7 років тому

    any practical use for this formula ? other then trippy animations? thanks for the teach

    • @delyodobrev3382
      @delyodobrev3382 4 роки тому

      having fun is practically healthy so have fun with it boy

    • @all_bets_on_Ganesh
      @all_bets_on_Ganesh 2 роки тому

      Much more than one would think. It was developed by a botanist trying to describe the shape of bamboo, but over the years its benn used in every branch of science from nano engineering all the way up to astrophysics. Its huge in computer graphics too. The botanist who discovered it patented a data compression algorithm using it, i think reducing CAD files or something. For a formula nones ever heard of its pretty cool!

  • @Leeengold
    @Leeengold 7 років тому +2

    How to avoid the jumping 'beginning'/'end' of the Shape. It's on the right side. I guess it comes from the vertex/shape but have no idea on how to fix it.

  • @avertproxy2201
    @avertproxy2201 2 роки тому

    is ther a way to get rid of those odd endpoints of the function that sometimes flare out?

  • @IPlayGames3
    @IPlayGames3 5 років тому +1

    Here is a way to transform them! (Satire (I know that this won’t work))
    transform([Insert polar coordinate here], Cartesian);

    • @delyodobrev3382
      @delyodobrev3382 4 роки тому

      this could actually work provided you ceate a func and name it differently so why not :d

  • @EmergencyTemporalShift
    @EmergencyTemporalShift 8 років тому

    Anyway, after I fixed my silly mistakes, I found that modulo also can have some fun results.

    • @alexmiller
      @alexmiller  7 років тому

      Cool! Could you send me a link to a picture and/or code? Curious to see.

    • @EmergencyTemporalShift
      @EmergencyTemporalShift 7 років тому

      I can't find what I did with the modulo, but here's this, which still make cool stuff. I'll let you know if I find it. codeshare.io/mz3El

    • @alexmiller
      @alexmiller  7 років тому

      Awesome! Thanks for sharing.

    • @EmergencyTemporalShift
      @EmergencyTemporalShift 7 років тому

      +Alexander Miller I like the fact that it's actually different each time.

  • @TheIllegalLlama
    @TheIllegalLlama 5 років тому

    Right up untill 11:00 it stops working for me! 'Unexpected token: float' on
    float rad = r(theta);
    I redid the code over and over again and the same issue repeats. What am I doing wrong!?

    • @alltaken0
      @alltaken0 5 років тому

      no comma at the end ---- ,

  • @horacioluna7046
    @horacioluna7046 6 років тому

    im back on hs yay

  • @gregberger
    @gregberger 8 років тому +5

    Thanks a lot !
    I did some audio visualization with your implementation of the Superformula.
    Here it is: github.com/naabys/aav

    • @gregberger
      @gregberger 7 років тому

      I updated the README to mention the dependency to the Minim lib

    • @gregberger
      @gregberger 7 років тому

      thank you for noticing

  • @andrewparker318
    @andrewparker318 3 роки тому +1

    I’m hoping so badly that Hello Games uses this for No Man’s Sky now that the patent has expired

  • @cassandradawn780
    @cassandradawn780 4 роки тому

    +1 screensaver

  • @maxiecoates8108
    @maxiecoates8108 7 років тому

    What else can "Superformula" do?

  • @marudevsinghnathawat4640
    @marudevsinghnathawat4640 Рік тому

    PLs give the source code also

  • @FredDufresne
    @FredDufresne 7 років тому +1

    So apparently you can't use this in any software because you'll get sued by Genicap. Just a heads up.

    • @Onyvox
      @Onyvox 7 років тому

      Don't cry wolf untill all the debates were done.

    • @jeanhrndz
      @jeanhrndz 7 років тому

      It can be used for informative purposes.

  • @schleuer.
    @schleuer. 3 роки тому

    Has anybody here seen some polar insect formulae? I remember messing around on my calculator a few years ago and finding a formula that could pretty consistently make insects (one looked like a locust). I’ve since forgotten how to make them but I want to see if other people know cuz Google doesn’t seem to.
    Also, if you read this whole thing, have a nice day!! :)

  • @kat-oh3hx
    @kat-oh3hx 6 років тому +1

    16:19 i see fidget spinner

    • @dowrow6898
      @dowrow6898 4 роки тому

      dang that was almost 3 years ago

  • @justinlincoln
    @justinlincoln 6 років тому

    Thank you for such a clear and fun tutorial. I put parameters for most of the variables into a midi controller. I think I may tweak those parameters for days. I posted a minute of initial results on Instagram + tumblr: notational.tumblr.com/post/174685390622/found-a-great-tutorial-on-youtube-by-alexander

  • @GamesRosario
    @GamesRosario 7 років тому

    I can't even 2+2...

  • @suave319
    @suave319 7 років тому

    How conceited does one have to be to patent such an arbitrary formula?

  • @AlwaysAskQuestion
    @AlwaysAskQuestion 7 років тому

    OK, this is the reason No Man Sky can't be released? Cause some Scientist is acting childish and doesn't want to share his coding methods?

    • @Leeengold
      @Leeengold 7 років тому

      He is not childish, he is in the right. That is the sense of patents, to take an advantage of the thing you created. And if 'No Man's Sky' would use it, they would earn money with the work of somebody else.

    • @azamean
      @azamean 7 років тому +1

      neither should patenting DNA, but that still happens.

    • @DustinRodriguez1_0
      @DustinRodriguez1_0 7 років тому +1

      Technically you can not patent a mathematical formula. But thanks to how software patents are handled, using a computer programmed with the superformula to generate patterns was able to be patented. Sean Murray claimed that the superformula wasn't actually used in No Man's Sky when the game was held up due to the patent claim (which completely contradicts a lengthy interview he gave much earlier claiming that the superformula was used to generate shapes in many places in the game, in fact it was described as the technology which was making the game possible). I haven't been able to find any further information about that dispute, but it is entirely possible that we will hear about it again.
      Just because something is patented does not mean you can't use it. This is, for reasons I don't understand, always glossed over when people talk about these issues. If you wish to use a patented invention, the person who holds the patent can give you license to do so. Usually, you'd pay a licensing fee and receive the right to use it. It seems that companies are often more willing to take their chances and simply violate peoples patents and hope they can't mount a competent legal defense than they are to even ask to license a patent. But that is what they are ideally supposed to do. When it is another company that holds the patent, they might refuse to even talk about a price and the company wanting to use the tech often doesn't want to reveal their desire to use it for fear that it would inspire competition. My guess is that when an individual is concerned, they are worried that the inventor might ask for a couple million dollars. Even if that is completely reasonable and the company would stand to make ten times that amount by commercializing it, there is the desire to not contribute to a market where engineers could get rich through invention. They see that as an illegitimate way to make money because it does not give a large advantage to people who already have money.

  • @mazack00
    @mazack00 7 років тому +1

    nightmare level lip smacking. don't eat and record.