1 / 27

Parallel Computation of the Minimum Separation Distance of Bezier Curves and Surfaces

Parallel Computation of the Minimum Separation Distance of Bezier Curves and Surfaces. Lauren Bissett, lauren.bissett@uconn.edu Nicholas Woodfield, nicholas.woodfield@uconn.edu REU Biogrid, Summer 2009 University of Connecticut Storrs, CT 06269. Presentation Summary.

abram
Download Presentation

Parallel Computation of the Minimum Separation Distance of Bezier Curves and Surfaces

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Parallel Computation of the Minimum Separation Distance of Bezier Curves and Surfaces • Lauren Bissett, lauren.bissett@uconn.edu • Nicholas Woodfield, nicholas.woodfield@uconn.edu REU Biogrid, Summer 2009 University of Connecticut Storrs, CT 06269

  2. Presentation Summary • Background • Overview • CUDA • Bezier Curves • Bezier Surfaces • Benefits/Future work

  3. Background • Animation relies on continuous movement between frames to give the illusion of motion. • When an unexpected change occurs between frames, this is known as temporal aliasing.

  4. Background • One method of dealing with temporal aliasing is detecting self-intersections in geometric objects. • If self-intersections are unnoticed by an animator, it could lead to the animation looking 'off'. • A scientist looking at a visual of a complicated molecule likewise could not determine if there are self-intersections.

  5. Background • One method to detect self-intersections is finding a geometric object's minimum separation distance. • The minimum separation distance is the smallest doubly normal segment between any two points on the object. • A segment is doubly normal if both its endpoints are normal to the curve/surface.

  6. Background • The algorithm for finding the minimum separation distance is time-consuming and not practical for use. • Therefore NVIDIA's CUDA parallel programming langauge will be used to implement the algorithms so that they run fast enough for practical use.

  7. CUDA • CUDA was developed by NVIDIA for parallel programming on the GPU. • Allows the launch of thousands of parallel threads of execution. • Unlike most GPU programming, CUDA development is relatively easy, because it extends C (with additional bindings for C++ and Fortran). • It also allows for general programming, no prior knowledge of graphics required

  8. CUDA Memory Model • Threads – basic element of execution, has own register and local memory • Blocks – composed of threads, has own shared memory • Grid – composed of blocks, contains global, constant and texture memory

  9. Our Machine • The machine used for this research used a QuadroFX 5800 GPU running Windows Vista. • 512 threads per block • 32 registers per thread

  10. Minimum Separation Distance • To find the minimum separation distance, there are three major steps: • Generate candidate double normal segments • Newton's method • Find segment of minimum segment length

  11. Finding Candidate Segments • The method of finding potential double normal segments is simple but time-consuming. • For a given sample size (n), take n sample points and pair with all other points in the sample. • Then check if each pair is creates a double normal segment.

  12. Finding Candidate Segments

  13. Newton's Method • The initial estimates are run on Newton's method until they converge. • When finished, the double normal segment is compared to determine if it is of smallest length.

  14. Bezier Curves • Curve case implemented first • It's simple – only two parametric values – (s,t) – to worry about

  15. Bezier Curve Kernel Organization • Used a 1-Dim grid composed of 1-Dim blocks • Blocks divided into groups, one for each curve • Threads responsible for one s parametric value on only one curve • Each thread tests its sample points vs all other points on it's parent curve and all other curves • If the candidate segment passes the double normal test, we run newton's method on it • Each thread ultimately returns the shortest segment from its search

  16. Bezier Curve Kernel Organization • What problems can arise? • Sample size > maximum thread allowance • Register usage • Must ensure consistency among multiple blocks • E.g. If we used a thread's built in index value, and we used 2 blocks per curve, each block would then only test values between 0 and .5! • This required equations to calculate which thread belonged to whom

  17. Bezier Curve Kernel Results • Double normals returned in a 2D array • Rows are blocks • Columns are threads in a block • Launched a second kernel to collapse the array into a 1-Dim array the size of the # of blocks • Iterated over those segments, and found the shortest which is our minimum separation distance

  18. Results • 8x to 200x speedup

  19. Bezier Surfaces • Next we moved onto surfaces – bicubic bezier meshes.

  20. Bezier Surfaces • Surfaces are just an extension of curves, but with two parametric values – u and v. • Each thread in the kernel handles a u,v pair. It then checks against all other u,v pairs on the surface. • Blocks were extended into 2 Dimensions, to represent the unit square.

  21. Bezier Surfaces • Similar to curves, the thread determines if the segment is doubly normal, and if necessary, discards an old one of greater length if it finds a short one. • And again, Newton's method is run on each doubly normal segment. • Finally, a similar search through results to find the minimum separation distance

  22. Bezier Surfaces • The thread results are again searched for the smallest segment, which is the minimum separation distance.

  23. Results? • The mesh algorithm was largely completed in the last few days • Curve case, although simple, took two weeks of tweaking until the code was sastifactory • Mesh case still needs some tweaking • Still confident we'll observe similar results to the curve case • However, we do not have comparable C code to compare results

  24. Benefits/Future work • How does this tie into bio-grid? • Nature of the problem: • Self-intersections in molecule simulations are of interest • Leveraging the GPU for general programming • 'Supercomputing for the masses' • Tremendous speedups for low costs • Useful for when supercomputing power is not present nor available • Future work: Finish the mesh case!

  25. Questions and Answers • Any Questions?

  26. Images • CUDA Memory Model, Dr. Dobbs Supercomputing for the Masses: http://www.ddj.com/architect/208401741?pgno=3 • Double normal segments & surfaces double normals, Ed Moore's Ph.D. Thesis • Newton's method: http://en.wikipedia.org/wiki/Newton%27s_method • Bezier surface w/control points: http://www.cs.cf.ac.uk/Ralph/graphicspics/bez.GIF

More Related