牵着老婆满街逛

严以律己,宽以待人. 三思而后行.
GMail/GTalk: yanglinbo#google.com;
MSN/Email: tx7do#yahoo.com.cn;
QQ: 3 0 3 3 9 6 9 2 0 .

Newell Teapot, Cup and Spoon

From:http://www.cs.auckland.ac.nz/~jli023/opengl/NewellTeaset.htm

Author: Jing Li
Updated time:
26-06-2003

Newell Teapot, Cup and Spoon

I learned Bezier curve and surface in 2001 when I studied the Advanced Computer Graphics paper in The University of Auckland. I drew a teapot lid. One year later, Richard wrote "The teapot is the classic icon of computer graphics. To find out more about its history, check out http://sjbaker.org/teapot/index.html" in an assignment specification that was for the Computer Graphics paper. I was so interested in this that I checked the "A Brief History of The Teapot" web page by Steve Baker, and knew the teapot is from Martin Newell and his wife, and got the entire Newell teapot data set from the web page linker.

I have already known what the teapot looks like, but wondered what the Newell tea cup and spoon look like. I asked Steve Baker, who said in his email that "I wonder how many years it's been since the less famous parts of the tea set have been rendered? The only images of the cup and spoon that I've ever seen were Newell's original rendering." I became fussy with Newell cup and spoon, so I decided to render them myself.

First I implemented a template using VS .Net MFC and OpenGL, which can render any Bezier patches if the patches and vertices are in array format. I tested my template using the teapot data set from Richard's assignment, which works fine. Then I moved on rendering the tea cup and spoon.

To render the cup and spoon, the data set needs to be changed in array format. In order to that, a c++ program ReadAndWrite.cpp was coded using iosteam, which reads the data from the original text files and writes the data to three text files in array format. Then the array data is copied to NewellTeasetData.h header file.

I rendered the cup and spoon data and got very funny images. I assumed the data my programm retrieves from the arrays was not correct. After testing and checking the data many times, I found that the vertices' index stored in Newell's cup and spoon patches arrays start from 1, not from 0. Finally, I knew what Newell's tea cup and spoon look like.

Here is the screen shot of my template, you can download the execute file to play with it.


Here are some images from Newell tea set rendering using my MFC+Open Bezier curve template

Newell tea cup from different views
Newell tea spoon from different views

Top

 

posted on 2007-04-11 10:58 杨粼波 阅读(357) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理