Working Spirograph code