Monday, April 30, 2007

Probability

Here is the beginning of adding some nuance to my code, rather than just using constant numbers or randoms. I'm working in some probabilities to modulate the motion so that it has a more organic feel.

This function is a loop that slowly moves my cables up and down. Without the probability in the foreloop, the motion looks very machine-like and repetitive. With the addition of the probability, the movement is more fluid. Much more refinement is needed, and I hope to add this sort of logic into other places in my code.