Surface Approximation - PowerPoint PPT Presentation

About This Presentation
Title:

Surface Approximation

Description:

Surface Approximation Sphere Approximation with Longitude and Latitude Conversion between (x, y, z) and (r, , ) x=rcos cos y=rcos sin z=rsin Body Two ... – PowerPoint PPT presentation

Number of Views:69
Avg rating:3.0/5.0
Slides: 9
Provided by: uae80
Learn more at: http://cs435.cs.ua.edu
Category:

less

Transcript and Presenter's Notes

Title: Surface Approximation


1
Surface Approximation
2
Sphere Approximation with Longitude and Latitude
3
Conversion between (x, y, z) and(r, f, ?)
f
xrcosfcos? yrcosfsin? zrsinf
4
Body
for (var phi-90delta/2 philt90-delta/2
phidelta) var phirradians(phi)
var phir2radians(phidelta) for (var
theta-180.0 thetalt180.0 thetadelta)
var thetarradians(theta) var
thetar2radians(thetadelta)
quad(vec4(Math.cos(thetar) Math.cos(phir),
Math.sin(thetar) Math.cos(phir),
Math.sin(phir), 1.0),
vec4(Math.cos(thetar) Math.cos(phir2),
Math.sin(thetar) Math.cos(phir2),
Math.sin(phir2), 1.0),
vec4(Math.cos(thetar2) Math.cos(phir),
Math.sin(thetar2) Math.cos(phir),
Math.sin(phir), 1.0),
vec4(Math.cos(thetar2) Math.cos(phir2),
Math.sin(thetar2) Math.cos(phir2),
Math.sin(phir2), 1.0))
5
Two Poles
var sin_d2Math.sin(radians(90-delta/2)) var
cos_d2 Math.cos(radians(90 - delta / 2)) //
positive pole var pvec4(0.0, 0.0, 1.0, 1.0) for
(var theta-180.0 thetalt180.0 thetadelta)
var thetarradians(theta) var
thetar2radians(thetadelta) triangle(p,
vec4(Math.cos(thetar)cos_d2, Math.sin(thetar)co
s_d2, sin_d2, 1.0),
vec4(Math.cos(thetar2)cos_d2, Math.sin(thetar2)c
os_d2, sin_d2, 1.0)) // negative
pole pvec4(0.0, 0.0, -1.0, 1.0) for (var
theta-180.0 thetalt180.0 thetadelta)
var thetarradians(theta) var
thetar2radians(thetadelta) triangle(p,
vec4(Math.cos(thetar)cos_d2, Math.sin(thetar)co
s_d2, -sin_d2, 1.0),
vec4(Math.cos(thetar2)cos_d2, Math.sin(thetar2)c
os_d2, -sin_d2, 1.0))
6
Sphere Approximation from Icosahedron
  • Examples
  • Geodesic playground dome
  • Epcot
  • Time Square Ball

7
Subdivision Code
function divideTriangle(a, b, c, count) if
( count gt 0 ) var ab
normalize(mix( a, b, 0.5), true) var ac
normalize(mix( a, c, 0.5), true) var
bc normalize(mix( b, c, 0.5), true)
divideTriangle( a,
ab, ac, count - 1 ) divideTriangle( ab,
b, bc, count - 1 ) divideTriangle( bc,
c, ac, count - 1 ) divideTriangle( ab,
bc, ac, count - 1 ) else // draw
triangle at end of recursion triangle(a,
b, c)
8
Sphere Approximation from Tetrahedron
  • See Section 6.6
Write a Comment
User Comments (0)
About PowerShow.com