How can we help?

Stuck on solution "Rotation Challenge"

Comments

2 comments

  • Avatar
    Elijah Daniels

    Hi bastian!

    The first half of your code looks good!  But just so you know, there should only be 1 for loop in this project.  Notice how you're not using the second for loop for anything?  It isn't needed, so you can get rid of it.  After that, you should be good!  If you continue to get an error after deleting the second loop, just play around with the increments of r, g, and b.  This project want's some specific values.

    Hope this helps and happy coding!  Let me know if you have any other questions :)

    2
    Comment actions Permalink
  • Avatar
    martinvetsu

    the right code is:

    noStroke();
    background(0, 0, 0);
    var r = 255;
    var g = 90;
    var b = 0;

    for (var i = 0;i<360;i+=30) {
    fill(r, g, b);
    r-=1;
    g+=1;
    b+=1;
    pushMatrix();
    translate(200, 200);
    rotate(i);
    rect(0, 0, 150, 15);
    popMatrix();
    }

    0
    Comment actions Permalink

Please sign in to leave a comment.

Visit our Help Center
Can’t find what you’re looking for in the Community? Check out the Help Center for additional resources
Visit our Help Center