- Box, sphere, torus
- Defining points: verticies
- Givens: P0 (top-left-front), width (x), height (y), depth (z)
- Defining points: points along the surface
- Givens: center, radius
- Generate a sphere by rotating a circle
x = rcosθ + cx
y = rsinθcosΦ + cy
z = rsinθsinΦ + cz
[1 0 0 ] [rcosθ] [rcosθ ]
[0 cosΦ -sinΦ] x [rsinθ] = [rsinθcosΦ]
[0 sinΦ cosΦ] [ θ ] [rsinθsinΦ]
θ
: angle of circle creation
Φ
: angle of circle rotation
θ: 0 -> 2π, Φ: 0 -> π
OR
θ: 0-> π, Φ: 0 -> 2π
for Φ: 0 -> 2π
for θ: 0 -> π
x = rcosθ + cx
y = rsinθcosΦ + cy
z = rsinθsinΦ + cz
- Defining points: points on surface
- Givens: r (radius of generating circle), R (radius of torus - r), cx, cy, cz
- Generate the points by translating a circle and then rotating
- If we translate over x, rotate about y
- If we translate over y, rotate about x
y-rotation x circle* = torus
[cosΦ 0 sinΦ] [rcosθ + R] [cosΦ(rcosθ + R) + cx]
[0 1 0 ] x [ rsinθ ] = [rsinθ + cy]
[-sinΦ 0 cosΦ] [ 0 ] [-sinΦ(rcosθ + R) + cz]
θ
: 0 -> 2π
Φ
: 0 -> 2π