We are about to switch to a new forum software. Until then we have removed the registration on this forum.
We want to use a multi-dimensional array to hold color information to scroll through during each frame to change the background color. We want the frame rate to slow down so that the color transition does not make us sick when grading, make this rate 10 fps. You will have an 5 colors, use the colors provided in the table as the values for your array. Include your standard header with appropriate information.
R G B
0 0 255
255 0 0
0 255 0
161 74 162
244 252 15
How do I go about this?
Answers
Start with a simple working sketch and slowly add features without breaking anything until every step is done.
The simplest sketch is one that does nothing. But even though it does nothing, there is still some code that you need to write to make it. You will need to have setup() and draw() functions. You will need to call size() is setup(). You should call background() in draw(). You can learn about these function by looking them up in the reference.
Attempt to write a sketch that has a specific size and just sets the background color. Post the code of your attempt for more help.
This looks like it was cut-pasted from a homework assignment. Is this problem homework, meant to teach you programming concepts?
If it is homework, we can still help you -- we just won't give you full solutions outright.
...well, if they are planning on grading you, it is definitely homework....
Depending on the requirements for your solution, you may want to search the reference for
lerpColor
, and search the forum forlerpColor
ANDlerpColors
Why not an array of color?
frameCount does this already
Its an assignment and I am supposed to use arrays to complete this.