Class: TeapotGeometry

TeapotGeometry(size, segments, bottom, lid, body, fitLid, blinn)

Tessellates the famous Utah teapot database, by Martin Newell, into triangles.

Parameters:
  size = 50,
  segments = 10,
  bottom = true,
  lid = true,
  body = true,
  fitLid = false,
  blinn = true
Go to Wikipedia for the original real-world teapot.

Note that the bottom (the last four patches) is not flat - blame Frank Crow, not me.

The teapot should normally be rendered as a double sided object, since for some patches both sides can be seen,
e.g., the gap around the lid and inside the spout.

Segments 'n' determines the number of triangles output.

[degenerates at the top and bottom cusps are deleted]
  Total triangles = 32*2*n*n - 8*n

  size_factor   # triangles
      1          56
      2         240
      3         552
      4         992

     10        6320
     20       25440
     30       57360
Code converted from my ancient SPD software.
Created for the Udacity course "Interactive Rendering".
YouTube video on teapot history: https://www.youtube.com/watch?v=DxMfblPzFNc

Constructor

new TeapotGeometry(size, segments, bottom, lid, body, fitLid, blinn)

Parameters:
Name Type Description
size Number is a relative scale: I've scaled the teapot to fit vertically between -1 and 1.
Think of it as a "radius".
segments Number number of line segments to subdivide each patch edge;
1 is possible but gives degenerates, so two is the real minimum.
bottom Boolean boolean, if true (default) then the bottom patches are added.
Some consider adding the bottom heresy, so set this to "false" to adhere to the One True Way.
lid Boolean to remove the lid and look inside, set to true.
body Boolean to remove the body and leave the lid, set this and "bottom" to false.
fitLid Boolean the lid is a tad small in the original.
This stretches it a bit, so you can't see the teapot's insides through the gap.
blinn Boolean Jim Blinn scaled the original data vertically by dividing by about 1.3 to look nicer.
If you want to see the original teapot, similar to the real-world model, set this to false.
True by default.
Source:

Members

(static) BufferAttribute

Properties:
Name Type Description
attributes Object TeaPot vertex attributes.
Properties
Name Type Description
position Float32Array vertex coordinates.
normal Float32Array vertex normals.
uv Float32Array texture coordinates.
index Float32Array face index array.
Source:
See: