Quantcast

Jump to content

» «
Photo

Processing: Ball Trail + Color Fade

No replies to this topic
Benjimino234
  • Benjimino234

    ♤ ♡ ♢ ♧

  • Members
  • Joined: 03 Dec 2006

#1

Posted 11 April 2013 - 12:31 PM

Hey there, okay I'm a newbie to all things programming.

I'm doing this course and I would like extra deciphering and explanation on what seems a pretty simple exercise. Basically in Processing, I have to make a ball bounce around the screen with paddles following its movement and change colours when it does so. I got that down but I'm stuck on the lerpColor process (used for fading the colours) and the for loop fade trail for 20 frames of the ball's movement.

I was given examples but I cannot get it working and my brain is fried from trying to decipher them.
http://processing.or...lerpColor_.html
Also been using this as a reference for fading stuff.

My file has quite a few lines of code and tons of variables such as paddleRX, paddleRY for the right paddle and their X and Y .etc.

In the lerping example I saw a new variable created called mix (a float that will be used to set the color mix amount) and the function norm.

I can post my code up if needed later, but I'm really stumped on this.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users