You will need to use Euler's angle if the pendulum is not a sphere,
for example: when it is a cylinder, then, you can use the following rules to draw it:
1. rotate around z axis by
2. rotate around y axis by
3. rotate around z axis by
You can check out the following applet.