Processing is an application that enables you to create images and interactions only with code. It's built on java. Here's what I've made so far:
Sine wave
//Controls:
B - toggle whether to clear the canvas when the wave reaches the end
M - increase the number of periods
L - decrease the number of periods