Function Cartvorm(ByVal pX As Single) As Single
	Return Math.Cos(pX)  Math.Cos(3 * pX) / 3 + Math.Cos(5 * pX) / 5  
Math.Cos(7 * pX) / 7
End Function

'Onderstaande code moet in de Paint event

Dim V As Single = 160, H As Single = 0.5, K As Single = 100
Dim C As Single = 2 * Math.PI / 320
For J As Single = 0 To 320
	Dim X As Single = C * J  Math.PI, Y As Single = Cartvorm(X)
	Y = Int(V  K * Y + H)
	e.Graphics.DrawLine(Pens.Black, J, V, J, Y)
Next
e.Graphics.DrawRectangle(Pens.Black, 0, 0, 320, 320)
