New user Help with sine wave number modifiyer
in
Programming Questions
•
2 years ago
Hi I am completely new to processing and new to programming my only experience with programming is Lingo using Director MX and this looks scary :-)
Anyhow here is a sample project i found and id like to modify the xspeed and yspeed so it varies the speed in a sine wave pattern.
i was thinking something like
xspeed = 1;
yspeed = 3.3;
where is says add the current speed i want it to alter it with a sine wave
so
// i want to continualy add 1 untill it reaches 9 then set it to a minus untill it is 0 (i assume there is some kind of frame rate it adds numbers with?)
x = x + xspeed + 1
if
xspeed > 9 {
xspeed = xspeed - 1
}
Source code current project ¬
http://pastebin.com/hpWPPbHC
I hope my question is readable as i am totally not familiar with processing and don't know any terminology sorry.
1