Post Reply 
 
Thread Rating:
  • 359 Votes - 2.84 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rotating Teapot
07-01-2011, 10:13 AM (This post was last modified: 07-01-2011 11:37 AM by ashimo.)
Post: #1
Rotating Teapot
The "teapot" is a classic example of 3D rendering. The Curl RTE renders it using hardware-accelerated 3D graphics. This famous teapot is rendered using Curl's real-time rendering of vector-based graphical elements.

Description
Curl's 3-D graphics engine rotates a surface model created from a table of coordinates.

You'll have to check out the code to believe it. Definitely no animated .GIF files here, the model is created and then rotated. Simple in theory, but not so easy with other technologies.

See the instructions so you don't miss anything.
  • procedural graphics
  • 3D visualization of surface model
  • realtime rendering
  • camera angle adjustments
Instructions
For you purists out there: sorry, this teapot does have a bottom.

Run this one full screen if you can't see the whole thing in your browser.

Click on "Run/Stop", then sit back and watch the teapot spin. Couldn't be simpler (or much more impressive).

But if you want to see ultra-cool, try this:
  • Click and drag your mouse to zoom around the teapot. This changes the camera angle for viewing the teapot, and the reference points for the calculations.
  • Try the left and right buttons to see the difference.
  • Slide the bar at the bottom to the left to decrease the resolution.
  • Slide the bar to the right to increase the resolution. There are lots of calculations going on here, so it might slow down a bit.
If you are good, you can zoom inside the teapot, and watch it spin from the inside!

To run the rotating teapot applet application click on the link below.

Rotating Teapot

Download the zip file attachment below to get the complete source code for this application.

You will also need the to download and unzip the Styled Controls package from the link below. The
unzipped contents should be placed alongside the unzipped Rotating Teapot demo source.

Styled Controls Package Zip File

teapot.zip
Find all posts by this user
Quote this message in a reply
Post Reply 

Forum Jump:


User(s) browsing this thread:
1 Guest(s)