ripples

Blitz3D Forums/Blitz3D Programming/ripples

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

try this

Graphics 640,480

SetBuffer BackBuffer()

xPoints = GraphicsWidth()
yMiddle = GraphicsHeight()/2
InitAmplitude# = 30
Amplitude# = 0
DecreaseRate# = 0.04
Init = 0
PixelColor = -1	;a short way to declare Alpha=R=G=B = 255

While Not KeyHit(1)

	Cls
	Amplitude = InitAmplitude
	For i=0 To xPoints-1
		WritePixel i, Sin(i*3-Init)*Amplitude+yMiddle, PixelColor
		Amplitude = Amplitude - DecreaseRate
	Next
	Init = Init + 1
	Flip
	
Wend

End


Is it what you are talking about?

Juan