Go to one of these examples and modify the code to suit your needs: