Road to creative coding ?

edited June 2015 in General Discussion

how do you guys manage the results you want if it involves complex math ?

like you have two objects then with maths like sine cosine do you imagine each and every steps ( numbers in x coordinated y coordinate blah blah ) made by the object in order to achieve the result you want ?

See I am not good in math but I find creating art using codes cool so Im trying to get serious with it but it seems I cannot hold and remember the mechanisms of codes I am studying ?

Is there any techniques involve or way to improve the self in understanding the works of others ?

how long does it take to become proficient in creating crazy designs with finesse and control ? I see a lot of cool works and I wish to create one

Answers

  • edited June 2015

    When I have a sketch that uses complex math, I just use more imagination than usual.

    The previous statement is a joke; I am trying to make a pun. Complex numbers have an imaginary part, so when doing complex math (presumably with complex numbers) I would need to use more imagination (for the imaginary parts of the complex numbers).

    You're probably overthinking things. In general, you will probably never need to nestle loops more than three levels deep, and any complex logic can always be broken out into simpler, and easier to understand, functions. I rarely find myself having to use trig functions more complex than sin() and cos(). Just remember that cos() goes with X, and sin() goes with Y.

    And lighten up! You don't have to be so serious about things. Feel free to screw around in code and see what you get. Just avoid deleting files at random and endless loops, and practice practice practice!

  • edited June 2015

    just play with some codes and examples that you like and have fun

    in this code for example you wouldn't have to understand every cos value

    you just understand the idea behind it.

    how a circle is constructed with its positions and radius.

    questions:

    • why there is a for-loop from 0 to 360 (what happens with 0 to 300?)

    • where is the center of the circle set ?

    • why does it shrink and grow ?

      float x, y;          // pos 
      float r = 0;    // radius// changing 
      float rAdd = 1;  // changing by this 
      
      
      void setup() {
      
        size(800, 800);
        //stroke(255);
        noStroke();
        println ("End of setup().");
      } // func
      
      void draw() {
      
        // background(0);
      
        for (int i=0;i<360;i++) {
          fill(i, 2, 2);
          x=width/2  + r*cos(radians(i));
          y=height/2 + r*sin(radians(i));
          ellipse(x, y, 1, 1);
        } // for
      
        // change r 
        r+=rAdd; // 
        if (r > 660||r<=0) {  
          rAdd=rAdd*-1;
        } // if
        //
      } // func 
      //
      
  • What is 'complex math'? In practice a lot of the math that is used is reasonably straightforward. Depending on your age you've either forgotten it - so in your dim memory it seems complex - or you were never taught to apply it to something interesting, like creative coding... It's amazing how a creative application of seemingly 'complex' ideas renders them far easier to understand.

    Maths is at play all around us, and finding out how it shapes the living things we might take for granted is one source of inspiration for me. Exploring the history of maths is another. For example how it shaped ancient buildings and the mathematical puzzles architects would build into them. There are plenty of source books on both these subjects and they often explain the ideas in far more straightforward, and practical, terms than a maths text book. Creative coding revived my interest in maths and I'm really glad it did :)

Sign In or Register to comment.