Need to render one of these or just want to learn how?
You are in luck. Got some code for you at the link below. It’s a simple educational sample that has plenty of room for optimization. Also, I think I may start using it as a coding question for interviews.