210 likes | 569 Views
Constructing Bezier Curves on the Surface of a Sphere. By Reza Ali Fundamentals of Spatial Computing UCSB MAT 594CM Spring 2009 . Presentation Outline. Purpose/Goal Spherical Coordinates & Properties SLERP ( s pherical l inear int erp olation) OpenGL Bezier Curves Particle Systems
E N D
Constructing Bezier Curves on the Surface of a Sphere By Reza Ali Fundamentals of Spatial Computing UCSB MAT 594CM Spring 2009
Presentation Outline • Purpose/Goal • Spherical Coordinates & Properties • SLERP (spherical linear interpolation) • OpenGL Bezier Curves • Particle Systems • Voronoi & Shaders
Purpose/Goal • Partition the surface of a sphere using the voronoi algorithm • Allow the points that define the voronoi to be an interactive magnetic particle system • Real Time manipulate of particles
Spherical Coordinates • Sphere Equations: • Cartesian Equivalents:
Sphere Properties • Equation of a sphere • Cartesian Coordinates: • Spherical Coordinates: • 2 values define a sphere • Center & Radius • Geodesic: curve that is the shortest distance between two points
Sphere Properties • Antipodal: points are located directly opposite of each other on a sphere (no geodesic) • Great Circle: the intersection of a plane containing the origin and the unit sphere
Spherical Linear Interpolation • A method of interpolating between two points on a sphere • Estimation: • Not good enough this will traverse the geodesic at non-constant rate
Spherical Linear Interpolation • Z=slerp(x,y,α) (constant rate) • Watch for the case Ω=180° (antipodal case) • Related to Quaternion
Bezier Curves • Develop a set of parametric cubic equations to represent curves and surfaces using only a small set of control points (4)
Bezier Curves & OpenGL • OpenGL evaluator functions allow you to use polynomial equations to produce vertices, normals, textures coordinates, and colors • Evaluator functions define a Bezier Curve (also the basis for NURBS)
Bezier Curves & OpenGL • Function: glMap1f() • Data Glfloat ctlpts[4][3] • glMap1f( • target type • Lower t range • Higher t range • Stride • Number of points • Reference to points) • glEnable(GL_MAP1_VERTEX_3) • glMapGrid1d(20,0,1) • glEvaMesh1(GL_LINE,0,20) • t=(0,1/20,2/20,…1) • 20 = number of points to evaluate
Particle Systems • Developing 3D Particle System • The particles will distribute themselves along the surface of a sphere • Electromagnetic repulsion • Voronoi Pattern Creation based of particle system
Voronoi & Shaders • Create a voronoi curves that will define a sphere and use these curves as points where light escapes like -> • Allow user to interactive with system via GUI (GLV) • Real Time, maybe?
References • Principles of Computer Graphics (ShaliniGovil-Pai) • 3D Computer Graphics (Samuel R. Buss) • Wikipedia: Spherical Coordinates • Wikipedia: Sphere • Google Image Search • Efficient Reconstruction of Functions on the Sphere from Scattered Data (Keiner, Kunis, Potts) • Vimeo: Mass_Ins • Spherical Centroid Voronoi Tesselation • Distributing Points on a Sphere • Voronoi Diagram on the sphere • Voronoi Diagram of Curves Objects • Voronoi diagrams on the sphere (Na, Lee, Cheong)