Fast methods for N-body problems

Size: px
Start display at page:

Download "Fast methods for N-body problems"

Transcription

1 CME342- Parallel Methods in Numerical Analysis Fast methods for N-body problems May 21, 2014 Lecture 13

2 Outline Motivation: N-body problem is O(N^2) Data structures: quad tree and oct tree (ADT?) The Barnes-Hut algorithm: An O(N log N) approximate algorithm for the N-body problem The Fast Multipole method: An O(N ) approximate algorithm for the N-body problem Parallelization issues

3 Particle simulations Particle simulations are used in: Computational Fluid Dynamics: vortex methods Molecular Dynamics, plasma simulations: electrostatic force Astrophysics: gravitational force Computer graphics: radiosity computation t = 0! while t < t_final! for i = 1 to n n = number of particles! compute f(i) = force on particle i! for i = 1 to n! move particle i under force f(i) for time dt using F=ma! compute interesting properties of particles (energy, etc.)! t = t + dt! end while!

4 Applications Computational Fluid Dynamics: vortex methods using FMM (Koumoutsakos)

5 Spray modeling Applications

6 Applications From a computer simulation of the formation of large scale structures in the Universe. The image shows 287,865,861 individual bodies (Warren and Salmon)

7 Particle simulations t = 0! while t < t_final! for i = 1 to n n = number of particles! compute f(i) = force on particle i! for i = 1 to n! move particle i under force f(i) for time dt using F=ma! compute interesting properties of particles (energy, etc.)! t = t + dt! end while! force = F external + F neighbor + F farfield O( N) O( N) O( N 2 ) Using a classical approach, this will require O(N^2) operations, but with a clever divide and conquer approach we can solve the problem in O(N logn) or O(N) operations

8 Particles simulations force = F external + F neighbor + F farfield p O(N) φ (z) = M log(z z ) + β ( j) O(N) c j=1 (z z c ) j External/ Body forces: external magnetic or electric field Can be computed independently Nearest neighbor force: Van der Waals Only requires interaction with the nearest neighbor Far field force: all to all interaction Expensive to compute, the force depends on all other particles

9 Fast hierarchical methods Use of adaptive quadtree or octree to subdivide the space Barnes-Hut algorithm: can solve the problem in O(N logn) not very accurate use the center of mass and total mass Fast Multipole method : can solve the problem in O(N) accurate use more information than BH more difficult to implement

10 Particle simulations Using a classical approach, they require O(N^2) operations, but with a clever divide and conquer approach we can solve the problem in O(NlogN) or O(N) operations Consider computing the force on earth due to all celestial bodies, we can reduce the number of particles in the force sum approximating all stars in a certain galaxy by a macroparticle located at its center of mass with the same total mass D = size of box containing Andromeda, r = distance of CM to Earth Require that D/r be small enough

11 Particle simulations Newton did this at the end of 17th century. What is new is to use this idea recursively. As long as D1/r1 is small enough, stars inside smaller box can be replaced by their CM to compute the force. Boxes nest in boxes recursively

12 Quad tree Data structure to subdivide the plane Nodes can contain coordinates of center of box, side length Eventually also coordinates of CM, total mass, etc. In a complete quad tree, each non leaf node has 4 children

13 Oct tree Data structure to subdivide the space In a complete oct tree, each non leaf node has 8 children

14 Adaptive quad tree Most algorithms begin by constructing a tree to hold all the particles Adaptive Quad (Oct) Tree only subdivides space where particles are located Children nodes enumerated counterclockwise from SE corner, empty ones excluded

15 Procedure QuadTreeBuild! QuadTree = {emtpy}! for j = 1 to N Adaptive quad tree loop over all N particles! QuadTreeInsert(j, root) insert particle j in QuadTree! endfor! At this point, the QuadTree may have some empty leaves,! whose siblings are not empty! Traverse the QuadTree eliminating empty leaves via, say Breadth First Search!! Procedure QuadTreeInsert(j, n)! Try to insert particle j at node n in QuadTree! By construction, each leaf will contain either 1 or 0 particles! if the subtree rooted at n contains more than 1 particle n is an internal node! determine which child c of node n contains particle j! QuadTreeInsert(j, c)! else if the subtree rooted at n contains 1 particle n is a leaf! add n s 4 children to the QuadTree! move the particle already in n into the child containing it! let c be the child of n containing j! QuadTreeInsert(j, c)! else the subtree rooted at n is an empty leaf! store particle j in node n! end! Cost <= N * maximum cost of QuadTreeInsert = O(N * maximum depth of QuadTree) Uniform distribution => depth of QuadTree = O(log N), so Cost = O( N log N) Arbitrary distribution => depth of Quad Tree = O(b) = O(# bits in particle coords), so Cost = O(bN)

16 Parallel ADT search library Used in SUmb for arbitrary geometric searches in distributed grids Application program only provides its local grid information and an MPI communicator to the library. Interpolation data and/or interpolation coefficients are returned; the coefficients are interpolation weights, the corresponding element ID and type and the processor ID in the group of the MPI-communicator. All processes which belong to the communicator should call the APIs even if no local information is present/needed. An arbitrary number of ADT s can be stored in the data structures Support for coupling any number of single-discipline simulation codes. Designed to avoid memory bottlenecks Target platform Blue Gene/L for the full simulation. Limited amount of memory per processor. Even surface grids cannot be gathered on one processor anymore (as was done for wall distance searches and sliding mesh interfaces.)

17 Parallel ADT search library Building of the local trees Create the bounding box of every local element; this bounding box can be represented by a point in 6D. Build the 6-dimensional ADT as shown in the figure. Use a logical rather than a geometric split Figure from Aftosmis VKI LS notes Advantage: degenerate trees are avoided and the amount of memory is known a priori. Disadvantage: a sort operation is needed every time a leaf is split building the tree is more complicated.

18 Parallel ADT search library Building of a global tree The root leaves of every processor are gathered on all processors The geometric range of every local ADT is known on all processors. Possible target ADTs can be determined for every point to be searched. Any processor is able to search trees that may reside in different processors transparently. Does this pose potential CPU scalability bottlenecks? Work in progress.

19 Parallel ADT search library Searching a global tree Determine, for every point to be searched, the local target trees and determine the number of local trees to be searched for the current set of points. Make this number available to all processors Every processor can determine the number of points it has to search in the local tree. Determine the number of search rounds to avoid a possible memory bottleneck. Determine the sending and receiving processors for every search round. Loop over the search rounds MPI_Alltoall to request data from processors. Send coordinates to target processors. Perform the interpolation in the local tree to overlap between communication and computation. Loop over the number of processors I need to interpolate data in my local tree Receive the coordinates. Interpolate the data in the local tree. Send interpolation data back to the requesting processor. Loop over the number of processors to which I send coordinates. Receive the interpolation data.

20 Parallel ADT search library Searching a local tree (containment search) Loop over the number of points to be searched. Traverse the tree and store the leaves which contain the point. At the base of the tree this gives a limited number of bounding boxes that contain the point. Loop over the corresponding volume elements. Determine if the element contains the point. Usually a Newton algorithm is needed, except for tetrahedra. If the element contains the point, store the interpolation weights and perform the interpolation of the variables (if requested)

21 Parallel ADT search library Applications. SUmb, sliding interpolation. SUmb, wall distance search. CHIMPS, volume interpolation between an arbitrary number of application codes. OOGA, volume interpolation for overset meshes. NASA Ames solution interpolation between mismatched meshes (Shuttle investigation.) Others? Future improvements. Efficiency of minimum distance search, especially wall distance search, should be improved.

22 Barnes-Hut algorithm A Hierarchical O(n log n) force calculation algorithm, J. Barnes and P. Hut, Nature, v. 324 (1986), many later papers Good for low accuracy calculations: RMS error = (Σ k approx f(k) - true f(k) 2 / true f(k) 2 /N) 1/2 ~ 1% 1) Build the QuadTree using QuadTreeBuild! already described, cost = O( N log N) or O(b N)! 2) For each node = subsquare in the QuadTree, compute the! CM and total mass (TM) of all the particles it contains! post order traversal of QuadTree, cost = O(N log N) or O(b N)! 3) For each particle, traverse the QuadTree to compute the force on it,! using the CM and TM of distant subsquares! core of algorithm! cost depends on accuracy desired but still O(N log N) or O(bN)!

23 Compute CM and total mass of each node Compute the CM = Center of Mass and TM = Total Mass of all the particles in each node of the QuadTree ( TM, CM ) = Compute_Mass( root ) function ( TM, CM ) = Compute_Mass( n ) compute the CM and TM of node n if n contains 1 particle the TM and CM are identical to the particle s mass and location store (TM, CM) at n return (TM, CM) else post order traversal : process parent after all children for all children c(j) of n j = 1,2,3,4 ( TM(j), CM(j) ) = Compute_Mass( c(j) ) endfor TM = TM(1) + TM(2) + TM(3) + TM(4) the total mass is the sum of the children s masses CM = ( TM(1)*CM(1) + TM(2)*CM(2) + TM(3)*CM(3) + TM(4)*CM(4) ) / TM the CM is the mass-weighted sum of the children s centers of mass store ( TM, CM ) at n return ( TM, CM ) end if Cost = O(# nodes in QuadTree) = O( N log N ) or O(b N)

24 Compute force on each particle For each node = square, we can approximate force on particles outside the node due to particles inside node by using the node s CM and TM This will be accurate enough if the node is far away enough from the particle For each particle, use as few nodes as possible to compute force, subject to accuracy constraint Need criterion to decide if a node is far enough from a particle D = side length of node r = distance from particle to CM of node q = user supplied error tolerance < 1 Use CM and TM to approximate force of node on box if D/r < q

25 Fast Multipole Method A fast algorithm for particle simulation, L. Greengard and V. Rokhlin, J. Comp. Phys. V. 73, 1987, many later papers Differences from Barnes-Hut FMM computes the potential at every particle, not just the force FMM uses more information in each box than just the CM and TM, so it is both more accurate and more expensive To compensate, FMM accesses a fixed set of boxes at every level, independent of D/r BH uses fixed information (CM and TM) in every box, but # boxes increases with accuracy. FMM uses a fixed # boxes, but the amount of information per box increases with accuracy.

26 Fast Multipole method FMM uses two kinds of expansions Outer expansions represent potential outside a node due to particles inside another one, analogous to (CM,TM) Inner expansions represent potential inside node due to particles outside; Computing this for every leaf node is the computational goal of FMM Force on particle at (x,y,z) due to one at origin = -m1 m2(x,y,z)/r2 Instead of force, consider φ(x,y,z)=-1/r Force =-grad φ(x,y,z)=-(d φ /dx, d φ /dy, d φ /dz) FMM will compute a compact expression for φ(x,y,z), which can be evaluated and/or differentiated at any point

27 Fast Multipole method Use the potential instead of the force FMM uses two kinds of expansions Outer expansions represent potential outside node due to particles inside, analogous to (CM,TM) Inner expansions represent potential inside a node due to particles outside; Computing these for every leaf node is the computational goal of FMM

28 Fast Multipole method For simplicity, we will discuss the 2D version. In 3D, can use spherical harmonics or other expansions Force on particle at (x,y) due to one at origin = F=-(x,y)/r2= -z / z 2 where z = x + iy (complex number) Potential φ(x,y)=-1/r =log z equivalent to gravity between infinite parallel wires instead of point masses We can write a 2D multipole expansion of φ that is accurate when r is large: φ(z) = M log z + j=1 (Outer expansion) α( j) z j N j i α( j) = z m i j i=1

29 Error in multipole expansion error( r ) = O( {max k z k / z }p+1 ) bounded by geometric sum If z >c*max z k, then error( r ) = O(1/cp+1) Suppose all the particles z k lie inside a D- by-d square centered at the origin Suppose z is outside a 3D-by-3D square centered at the origin c = 1.5*D/(D/sqrt(2)) ~ 2.12 Each extra term in expansion increases accuracy about 1 bit 24 terms enough for single,53 terms for double φ(z) = M log z + p j=1 α( j) z j

30 Outer expansion p φ (z) = M log(z z ) + α 1 ( j) (z z 1 ) j Outer(n) = (M, α 1, α 2,, α r, z n ) Stores data for evaluating potential φ(z) outside node n due to particles inside n Will be computed for each node in QuadTree Cost of evaluating φ(z) is O( p ), independent of the number of particles inside n Outer expansion needed to compute the potential away from n due to particles inside n. We also want to compute potential inside n due to particles away from n j =1

31 Inner expansion Inner(n) = ( β 1, β 2,, β r, z n ) Stores data for evaluating potential φ(z) inside node n due to particles outside n φ (z) = c p i=0 β(i) (z z c ) i Computing this for every leaf node is the computational goal of FMM

32 Converting Outer Expansions We want to compute Outer(n) cheaply from Outer( c ) for all children of n How to combine outer expansions around different points? First step: make them expansions around same point n 1 is a subsquare of n 2, z k = center(n k ) for k=1,2 Outer(n 1 ) expansion accurate outside blue dashed square, so also accurate outside black dashed square So there is an Outer(n 2 ) expansion with different a k and center z 2 which represents the same potential as Outer(n 1 ) outside the black dashed box

33 Converting outer expansions Given Solve for M2 p φ (z) = M log(z z ) + α 1 ( j) (z z 1 ) j and α 2 in φ (z) φ 1 2 (z) = 2 Get M2 = M 1 and each α 2 is a linear combination of the α 1 multiply r-vector of α 1 values by a fixed r-by-r matrix to get α 2 ( M 2, α 12,, α r2 ) = Outer_shift( Outer(n 1 ), z 2 ) = desired Outer( n 2 ) j =1 p M log(z z ) + α 2 ( j) 2 (z z 2 ) j j=1

34 Converting inner expansions How to combine inner expansions around different points? First step: make them expansions around same point n 1 is a subsquare of n 2, z k = center(n k ) for k=1,2 Inner(n 2 ) expansion accurate inside black dashed square, so also accurate inside blue dashed square So there is an Inner(n 1 ) expansion with different β k and center z 1 which represents the same potential as Inside(n 2 ) inside the blue dashed box

35 Converting Inner Expansions Given Solve for β 2 such that p φ (z) = 1 p i=0 β 2 (i) = (z z 2 ) i i=0 β(i) (z z 1 ) i p i=0 β 1 (i) (z z 1 ) i Each β 2 is a linear combination of the β 1 multiply p-vector of α 1 values by a fixed p-by-p matrix to get β 2 (β 12,, β r2 ) = Inner_shift( Inner(n 1 ), z 2 ) = desired Inner( n 2 )

36 Converting Outer to Inner We need to show how to convert Outer(n3) to Inner(n4) when n4 is far enough from n3 Inner(n 4 ) = ( β 0, β 1,, β r, z 4 ) Outer(n 3 )=(M, α 1, α 2,, α r, z 3 ) p M log(z z ) + α 3 ( j) 3 3 j=1 (z z 3 ) j = p i=1 β 4 (i) (z z 4 ) i Once again is a weighted sum Inner(n4)=Convert(Outer(n3),center(n4))

37 Top Level Description of FMM 1) Build the QuadTree! 2) Call Build_Outer(root), to compute outer expansions! of each node n in the QuadTree! Traverse QuadTree from bottom to top,! combining outer expansions of children! to get out outer expansion of parent! 3) Call Build_ Inner(root), to compute inner expansions! of each node n in the QuadTree!! Traverse QuadTree from top to bottom,! converting outer to inner expansions! and combining them! 4) For each leaf node n, add contributions of nearest particles! directly into Inner(n)! final Inner(n) is desired output: expansion for potential at! each point due to all particles!

38 Compute Outer(n) for each node Compute Outer(n) for each node of the QuadTree! outer = Build_Outer( root )!! function ( M, a 1,,a r, z n ) = Build_Outer( n ) compute outer expansion of node n! if n if a leaf it contains 1 (or a few) particles! compute and return Outer(n) = ( M, a 1,,a r, z n ) directly from! its definition as a sum! else post order traversal : process parent after all children! Outer(n) = 0! for all children c(k) of n k = 1,2,3,4! Outer( c(k) ) = Build_Outer( c(k) )! Outer(n) = Outer(n) +! Outer_shift( Outer(c(k)), center(n))! just add component by component! endfor! return Outer(n)! end if! Cost = O(# nodes in QuadTree) = O( N ) same as for Barnes-Hut

39 Compute Inner from other expansions We will use Inner_shift and Convert to build each Inner(n) by combing expansions from other nodes Which other nodes? As few as necessary to compute the potential accurately Inner_shift(Inner(parent(n), center(n)) will account for potential from particles far enough away from parent (red nodes below) Convert(Outer(i), center(n)) will account for potential from particles in boxes at same level in Interaction Set

40 Interaction set Interaction Set = { nodes i that are children of a neighbor of parent(n), such that i is not itself a neighbor of n} For each i in Interaction Set, Outer(i) is available, so that Convert(Outer(i),center(n)) gives contribution to Inner(n) due to particles in i Number of i in Interaction Set is at most = 27 in 2D Number of i in Interaction Set is at most = 189 in 3D

41 Compute Inner(n) for each node Compute Inner(n) for each node of the QuadTree! outer = Build_ Inner( root )!!! function ( b 1,,b r, z n ) = Build_ Inner( n ) compute inner expansion of node n! p = parent(n) p=nil if n = root! Inner(n) = Inner_shift( Inner(p), center(n) ) Inner(n) = 0 if p = root! for all i in Interaction_Set(n) Interaction_Set(root) is empty! Inner(n) = Inner(n) + Convert( Outer(i), center(n) )! add component by component! end for! for all children c of n complete preorder traversal of QuadTree! Build_Inner( c )! end for! Cost = O(# nodes in QuadTree) = O( N )

42 Compute nearest neighbour contribution Inner(n) includes the potential of all the particles except those in the nearest neighbour and particles inside n itself. This is a small number of particles (otherwise we would have further refined the tree), so we can use a direct sum!

43 Parallelization issues for N-body Barnes-Hut, FMM and related algorithms have similar computational structure: 1) Build the QuadTree 2) Traverse QuadTree from leaves to root and build outer expansions 3) Traverse QuadTree from root to leaves and build any inner expansions 4) Traverse QuadTree to accumulate forces for each particle Parallelization scheme: Assign regions of space to each processor Regions may have different shapes, but to get load balance Each region will have about N/p particles

44 Parallelization issues for N-body Each processor will store a part of the Quadtree containing all particles (=leaves) in its region, as well as their ancestors in the Quadtree Top of tree stored by all processors, lower nodes may also be shared Each processor will also store adjoining parts of Quadtree needed to compute forces for particles it owns Subset of Quadtree needed by a processor called the Locally Essential Tree (LET) Given the LET, all force accumulations (step 4)) are done in parallel, without communication

45 Orthogonal Recursive Bisection Recursively split region along axes into regions containing equal numbers of particles Works well for 2D, not 3D Warren and Salmon, Supercomputing 92 Partitioning for 16 procs

46 Hashed Oct Tree Instead of partitioning space, work on quadtree Estimate work for each node, call total work W Arrange nodes of QuadTree in some linear order Assign contiguous blocks of nodes with work W/p to processors Works well in 3D In shared memory environment these are called cost zones Warren and Salmon, Supercomputing 93

47 Hashed Oct Tree Arrange nodes of QuadTree in some linear order Morton ordering Assign unique key to each node in QuadTree, then compute hash(key) to get integers that can be linearly ordered If (x,y) are coordinates of center of node, interleave bits to get key Put 1 at left as sentinel Nodes at root of tree have shorter keys

A Kernel-independent Adaptive Fast Multipole Method

A Kernel-independent Adaptive Fast Multipole Method A Kernel-independent Adaptive Fast Multipole Method Lexing Ying Caltech Joint work with George Biros and Denis Zorin Problem Statement Given G an elliptic PDE kernel, e.g. {x i } points in {φ i } charges

More information

Partitioning and Divide-and-Conquer Strategies

Partitioning and Divide-and-Conquer Strategies Chapter 4 Partitioning and Divide-and-Conquer Strategies Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M. Allen,

More information

1. Meshes. D7013E Lecture 14

1. Meshes. D7013E Lecture 14 D7013E Lecture 14 Quadtrees Mesh Generation 1. Meshes Input: Components in the form of disjoint polygonal objects Integer coordinates, 0, 45, 90, or 135 angles Output: A triangular mesh Conforming: A triangle

More information

Adaptive-Mesh-Refinement Pattern

Adaptive-Mesh-Refinement Pattern Adaptive-Mesh-Refinement Pattern I. Problem Data-parallelism is exposed on a geometric mesh structure (either irregular or regular), where each point iteratively communicates with nearby neighboring points

More information

Efficient computation of source magnetic scalar potential

Efficient computation of source magnetic scalar potential Adv. Radio Sci., 4, 59 63, 2006 Author(s) 2006. This work is licensed under a Creative Commons License. Advances in Radio Science Efficient computation of source magnetic scalar potential W. Hafla, A.

More information

Multidimensional Indexes [14]

Multidimensional Indexes [14] CMSC 661, Principles of Database Systems Multidimensional Indexes [14] Dr. Kalpakis http://www.csee.umbc.edu/~kalpakis/courses/661 Motivation Examined indexes when search keys are in 1-D space Many interesting

More information

1 The range query problem

1 The range query problem CS268: Geometric Algorithms Handout #12 Design and Analysis Original Handout #12 Stanford University Thursday, 19 May 1994 Original Lecture #12: Thursday, May 19, 1994 Topics: Range Searching with Partition

More information

Mesh Generation. Quadtrees. Geometric Algorithms. Lecture 9: Quadtrees

Mesh Generation. Quadtrees. Geometric Algorithms. Lecture 9: Quadtrees Lecture 9: Lecture 9: VLSI Design To Lecture 9: Finite Element Method To http://www.antics1.demon.co.uk/finelms.html Lecture 9: To Lecture 9: To component not conforming doesn t respect input not well-shaped

More information

Lecture 4: Locality and parallelism in simulation I

Lecture 4: Locality and parallelism in simulation I Lecture 4: Locality and parallelism in simulation I David Bindel 6 Sep 2011 Logistics Distributed memory machines Each node has local memory... and no direct access to memory on other nodes Nodes communicate

More information

Trees : Part 1. Section 4.1. Theory and Terminology. A Tree? A Tree? Theory and Terminology. Theory and Terminology

Trees : Part 1. Section 4.1. Theory and Terminology. A Tree? A Tree? Theory and Terminology. Theory and Terminology Trees : Part Section. () (2) Preorder, Postorder and Levelorder Traversals Definition: A tree is a connected graph with no cycles Consequences: Between any two vertices, there is exactly one unique path

More information

LPT Codes used with ROAM Splitting Algorithm CMSC451 Honors Project Joseph Brosnihan Mentor: Dave Mount Fall 2015

LPT Codes used with ROAM Splitting Algorithm CMSC451 Honors Project Joseph Brosnihan Mentor: Dave Mount Fall 2015 LPT Codes used with ROAM Splitting Algorithm CMSC451 Honors Project Joseph Brosnihan Mentor: Dave Mount Fall 2015 Abstract Simplicial meshes are commonly used to represent regular triangle grids. Of many

More information

CSC 391/691: GPU Programming Fall N-Body Problem. Copyright 2011 Samuel S. Cho

CSC 391/691: GPU Programming Fall N-Body Problem. Copyright 2011 Samuel S. Cho CSC 391/691: GPU Programming Fall 2011 N-Body Problem Copyright 2011 Samuel S. Cho Introduction Many physical phenomena can be simulated with a particle system where each particle interacts with all other

More information

Algorithms for GIS:! Quadtrees

Algorithms for GIS:! Quadtrees Algorithms for GIS: Quadtrees Quadtree A data structure that corresponds to a hierarchical subdivision of the plane Start with a square (containing inside input data) Divide into 4 equal squares (quadrants)

More information

A Model to Evaluate Ray Tracing Hierarchies

A Model to Evaluate Ray Tracing Hierarchies A Model to Evaluate Ray Tracing Hierarchies K. R. Subramanian Donald Fussell Department of Computer Sciences The University of Texas at Austin 1 Introduction In this article we develop a model to evaluate

More information

Organizing Spatial Data

Organizing Spatial Data Organizing Spatial Data Spatial data records include a sense of location as an attribute. Typically location is represented by coordinate data (in 2D or 3D). 1 If we are to search spatial data using the

More information

Ray Tracing with Spatial Hierarchies. Jeff Mahovsky & Brian Wyvill CSC 305

Ray Tracing with Spatial Hierarchies. Jeff Mahovsky & Brian Wyvill CSC 305 Ray Tracing with Spatial Hierarchies Jeff Mahovsky & Brian Wyvill CSC 305 Ray Tracing Flexible, accurate, high-quality rendering Slow Simplest ray tracer: Test every ray against every object in the scene

More information

Intersection Acceleration

Intersection Acceleration Advanced Computer Graphics Intersection Acceleration Matthias Teschner Computer Science Department University of Freiburg Outline introduction bounding volume hierarchies uniform grids kd-trees octrees

More information

Trees. Eric McCreath

Trees. Eric McCreath Trees Eric McCreath 2 Overview In this lecture we will explore: general trees, binary trees, binary search trees, and AVL and B-Trees. 3 Trees Trees are recursive data structures. They are useful for:

More information

Partitioning and Divide-and- Conquer Strategies

Partitioning and Divide-and- Conquer Strategies Partitioning and Divide-and- Conquer Strategies Partitioning Strategies Partitioning simply divides the problem into parts Example - Adding a sequence of numbers We might consider dividing the sequence

More information

Using GPUs to compute the multilevel summation of electrostatic forces

Using GPUs to compute the multilevel summation of electrostatic forces Using GPUs to compute the multilevel summation of electrostatic forces David J. Hardy Theoretical and Computational Biophysics Group Beckman Institute for Advanced Science and Technology University of

More information

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo Computer Graphics Bing-Yu Chen National Taiwan University The University of Tokyo Hidden-Surface Removal Back-Face Culling The Depth-Sort Algorithm Binary Space-Partitioning Trees The z-buffer Algorithm

More information

Module 8: Range-Searching in Dictionaries for Points

Module 8: Range-Searching in Dictionaries for Points Module 8: Range-Searching in Dictionaries for Points CS 240 Data Structures and Data Management T. Biedl K. Lanctot M. Sepehri S. Wild Based on lecture notes by many previous cs240 instructors David R.

More information

Efficient Storage and Processing of Adaptive Triangular Grids using Sierpinski Curves

Efficient Storage and Processing of Adaptive Triangular Grids using Sierpinski Curves Efficient Storage and Processing of Adaptive Triangular Grids using Sierpinski Curves Csaba Attila Vigh, Dr. Michael Bader Department of Informatics, TU München JASS 2006, course 2: Numerical Simulation:

More information

Computer Graphics. Bing-Yu Chen National Taiwan University

Computer Graphics. Bing-Yu Chen National Taiwan University Computer Graphics Bing-Yu Chen National Taiwan University Visible-Surface Determination Back-Face Culling The Depth-Sort Algorithm Binary Space-Partitioning Trees The z-buffer Algorithm Scan-Line Algorithm

More information

Trees. CSE 373 Data Structures

Trees. CSE 373 Data Structures Trees CSE 373 Data Structures Readings Reading Chapter 7 Trees 2 Why Do We Need Trees? Lists, Stacks, and Queues are linear relationships Information often contains hierarchical relationships File directories

More information

Advanced Algorithm Design and Analysis (Lecture 12) SW5 fall 2005 Simonas Šaltenis E1-215b

Advanced Algorithm Design and Analysis (Lecture 12) SW5 fall 2005 Simonas Šaltenis E1-215b Advanced Algorithm Design and Analysis (Lecture 12) SW5 fall 2005 Simonas Šaltenis E1-215b simas@cs.aau.dk Range Searching in 2D Main goals of the lecture: to understand and to be able to analyze the kd-trees

More information

Geometric Algorithms. Geometric search: overview. 1D Range Search. 1D Range Search Implementations

Geometric Algorithms. Geometric search: overview. 1D Range Search. 1D Range Search Implementations Geometric search: overview Geometric Algorithms Types of data:, lines, planes, polygons, circles,... This lecture: sets of N objects. Range searching Quadtrees, 2D trees, kd trees Intersections of geometric

More information

1. [1 pt] What is the solution to the recurrence T(n) = 2T(n-1) + 1, T(1) = 1

1. [1 pt] What is the solution to the recurrence T(n) = 2T(n-1) + 1, T(1) = 1 Asymptotics, Recurrence and Basic Algorithms 1. [1 pt] What is the solution to the recurrence T(n) = 2T(n-1) + 1, T(1) = 1 2. O(n) 2. [1 pt] What is the solution to the recurrence T(n) = T(n/2) + n, T(1)

More information

On the data structures and algorithms for contact detection in granular media (DEM) V. Ogarko, May 2010, P2C course

On the data structures and algorithms for contact detection in granular media (DEM) V. Ogarko, May 2010, P2C course On the data structures and algorithms for contact detection in granular media (DEM) V. Ogarko, May 2010, P2C course Discrete element method (DEM) Single particle Challenges: -performance O(N) (with low

More information

Ray Tracing Acceleration Data Structures

Ray Tracing Acceleration Data Structures Ray Tracing Acceleration Data Structures Sumair Ahmed October 29, 2009 Ray Tracing is very time-consuming because of the ray-object intersection calculations. With the brute force method, each ray has

More information

Multi-way Search Trees. (Multi-way Search Trees) Data Structures and Programming Spring / 25

Multi-way Search Trees. (Multi-way Search Trees) Data Structures and Programming Spring / 25 Multi-way Search Trees (Multi-way Search Trees) Data Structures and Programming Spring 2017 1 / 25 Multi-way Search Trees Each internal node of a multi-way search tree T: has at least two children contains

More information

Conquer Strategies. Partitioning and Divide-and- Partitioning Strategies + + Using separate send()s and recv()s. Slave

Conquer Strategies. Partitioning and Divide-and- Partitioning Strategies + + Using separate send()s and recv()s. Slave Partitioning and Divide-and- Conquer Strategies Partitioning Strategies Partitioning simply divides the problem into parts Example - Adding a sequence of numbers We might consider dividing the sequence

More information

CSE 530A. B+ Trees. Washington University Fall 2013

CSE 530A. B+ Trees. Washington University Fall 2013 CSE 530A B+ Trees Washington University Fall 2013 B Trees A B tree is an ordered (non-binary) tree where the internal nodes can have a varying number of child nodes (within some range) B Trees When a key

More information

(2,4) Trees. 2/22/2006 (2,4) Trees 1

(2,4) Trees. 2/22/2006 (2,4) Trees 1 (2,4) Trees 9 2 5 7 10 14 2/22/2006 (2,4) Trees 1 Outline and Reading Multi-way search tree ( 10.4.1) Definition Search (2,4) tree ( 10.4.2) Definition Search Insertion Deletion Comparison of dictionary

More information

Binary Trees

Binary Trees Binary Trees 4-7-2005 Opening Discussion What did we talk about last class? Do you have any code to show? Do you have any questions about the assignment? What is a Tree? You are all familiar with what

More information

Geometric Structures 2. Quadtree, k-d stromy

Geometric Structures 2. Quadtree, k-d stromy Geometric Structures 2. Quadtree, k-d stromy Martin Samuelčík samuelcik@sccg.sk, www.sccg.sk/~samuelcik, I4 Window and Point query From given set of points, find all that are inside of given d-dimensional

More information

Lecture 7. Transform-and-Conquer

Lecture 7. Transform-and-Conquer Lecture 7 Transform-and-Conquer 6-1 Transform and Conquer This group of techniques solves a problem by a transformation to a simpler/more convenient instance of the same problem (instance simplification)

More information

Spatial Data Structures

Spatial Data Structures 15-462 Computer Graphics I Lecture 17 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) April 1, 2003 [Angel 9.10] Frank Pfenning Carnegie

More information

Parallelizing Adaptive Triangular Grids with Refinement Trees and Space Filling Curves

Parallelizing Adaptive Triangular Grids with Refinement Trees and Space Filling Curves Parallelizing Adaptive Triangular Grids with Refinement Trees and Space Filling Curves Daniel Butnaru butnaru@in.tum.de Advisor: Michael Bader bader@in.tum.de JASS 08 Computational Science and Engineering

More information

Question Bank Subject: Advanced Data Structures Class: SE Computer

Question Bank Subject: Advanced Data Structures Class: SE Computer Question Bank Subject: Advanced Data Structures Class: SE Computer Question1: Write a non recursive pseudo code for post order traversal of binary tree Answer: Pseudo Code: 1. Push root into Stack_One.

More information

Binary Trees, Binary Search Trees

Binary Trees, Binary Search Trees Binary Trees, Binary Search Trees Trees Linear access time of linked lists is prohibitive Does there exist any simple data structure for which the running time of most operations (search, insert, delete)

More information

Spatial Data Structures

Spatial Data Structures CSCI 420 Computer Graphics Lecture 17 Spatial Data Structures Jernej Barbic University of Southern California Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees [Angel Ch. 8] 1 Ray Tracing Acceleration

More information

Sorting and Selection

Sorting and Selection Sorting and Selection Introduction Divide and Conquer Merge-Sort Quick-Sort Radix-Sort Bucket-Sort 10-1 Introduction Assuming we have a sequence S storing a list of keyelement entries. The key of the element

More information

Parallel Implementation of 3D FMA using MPI

Parallel Implementation of 3D FMA using MPI Parallel Implementation of 3D FMA using MPI Eric Jui-Lin Lu y and Daniel I. Okunbor z Computer Science Department University of Missouri - Rolla Rolla, MO 65401 Abstract The simulation of N-body system

More information

Trees. Q: Why study trees? A: Many advance ADTs are implemented using tree-based data structures.

Trees. Q: Why study trees? A: Many advance ADTs are implemented using tree-based data structures. Trees Q: Why study trees? : Many advance DTs are implemented using tree-based data structures. Recursive Definition of (Rooted) Tree: Let T be a set with n 0 elements. (i) If n = 0, T is an empty tree,

More information

Module 4: Index Structures Lecture 13: Index structure. The Lecture Contains: Index structure. Binary search tree (BST) B-tree. B+-tree.

Module 4: Index Structures Lecture 13: Index structure. The Lecture Contains: Index structure. Binary search tree (BST) B-tree. B+-tree. The Lecture Contains: Index structure Binary search tree (BST) B-tree B+-tree Order file:///c /Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture13/13_1.htm[6/14/2012

More information

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday Announcements Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday 1 Spatial Data Structures Hierarchical Bounding Volumes Grids Octrees BSP Trees 11/7/02 Speeding Up Computations

More information

Solving the N-Body Problem with the ALiCE Grid System

Solving the N-Body Problem with the ALiCE Grid System Solving the N-Body Problem with the ALiCE Grid System Dac Phuong Ho 1, Yong Meng Teo 2 and Johan Prawira Gozali 2 1 Department of Computer Network, Vietnam National University of Hanoi 144 Xuan Thuy Street,

More information

Spatial Data Structures

Spatial Data Structures 15-462 Computer Graphics I Lecture 17 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) March 28, 2002 [Angel 8.9] Frank Pfenning Carnegie

More information

Fast Methods with Sieve

Fast Methods with Sieve Fast Methods with Sieve Matthew G Knepley Mathematics and Computer Science Division Argonne National Laboratory August 12, 2008 Workshop on Scientific Computing Simula Research, Oslo, Norway M. Knepley

More information

doc. RNDr. Tomáš Skopal, Ph.D. Department of Software Engineering, Faculty of Information Technology, Czech Technical University in Prague

doc. RNDr. Tomáš Skopal, Ph.D. Department of Software Engineering, Faculty of Information Technology, Czech Technical University in Prague Praha & EU: Investujeme do vaší budoucnosti Evropský sociální fond course: Searching the Web and Multimedia Databases (BI-VWM) Tomáš Skopal, 2011 SS2010/11 doc. RNDr. Tomáš Skopal, Ph.D. Department of

More information

Week 3: MPI. Day 04 :: Domain decomposition, load balancing, hybrid particlemesh

Week 3: MPI. Day 04 :: Domain decomposition, load balancing, hybrid particlemesh Week 3: MPI Day 04 :: Domain decomposition, load balancing, hybrid particlemesh methods Domain decompositon Goals of parallel computing Solve a bigger problem Operate on more data (grid points, particles,

More information

Spatial Data Structures

Spatial Data Structures CSCI 480 Computer Graphics Lecture 7 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids BSP Trees [Ch. 0.] March 8, 0 Jernej Barbic University of Southern California http://www-bcf.usc.edu/~jbarbic/cs480-s/

More information

Cluster Analysis. Ying Shen, SSE, Tongji University

Cluster Analysis. Ying Shen, SSE, Tongji University Cluster Analysis Ying Shen, SSE, Tongji University Cluster analysis Cluster analysis groups data objects based only on the attributes in the data. The main objective is that The objects within a group

More information

Design and Analysis of Algorithms Lecture- 9: B- Trees

Design and Analysis of Algorithms Lecture- 9: B- Trees Design and Analysis of Algorithms Lecture- 9: B- Trees Dr. Chung- Wen Albert Tsao atsao@svuca.edu www.408codingschool.com/cs502_algorithm 1/12/16 Slide Source: http://www.slideshare.net/anujmodi555/b-trees-in-data-structure

More information

2-3 Tree. Outline B-TREE. catch(...){ printf( "Assignment::SolveProblem() AAAA!"); } ADD SLIDES ON DISJOINT SETS

2-3 Tree. Outline B-TREE. catch(...){ printf( Assignment::SolveProblem() AAAA!); } ADD SLIDES ON DISJOINT SETS Outline catch(...){ printf( "Assignment::SolveProblem() AAAA!"); } Balanced Search Trees 2-3 Trees 2-3-4 Trees Slide 4 Why care about advanced implementations? Same entries, different insertion sequence:

More information

Data Partitioning. Figure 1-31: Communication Topologies. Regular Partitions

Data Partitioning. Figure 1-31: Communication Topologies. Regular Partitions Data In single-program multiple-data (SPMD) parallel programs, global data is partitioned, with a portion of the data assigned to each processing node. Issues relevant to choosing a partitioning strategy

More information

Treewidth and graph minors

Treewidth and graph minors Treewidth and graph minors Lectures 9 and 10, December 29, 2011, January 5, 2012 We shall touch upon the theory of Graph Minors by Robertson and Seymour. This theory gives a very general condition under

More information

Spatial Data Structures for Computer Graphics

Spatial Data Structures for Computer Graphics Spatial Data Structures for Computer Graphics Page 1 of 65 http://www.cse.iitb.ac.in/ sharat November 2008 Spatial Data Structures for Computer Graphics Page 1 of 65 http://www.cse.iitb.ac.in/ sharat November

More information

Course Review. Cpt S 223 Fall 2009

Course Review. Cpt S 223 Fall 2009 Course Review Cpt S 223 Fall 2009 1 Final Exam When: Tuesday (12/15) 8-10am Where: in class Closed book, closed notes Comprehensive Material for preparation: Lecture slides & class notes Homeworks & program

More information

DATA STRUCTURE : A MCQ QUESTION SET Code : RBMCQ0305

DATA STRUCTURE : A MCQ QUESTION SET Code : RBMCQ0305 Q.1 If h is any hashing function and is used to hash n keys in to a table of size m, where n

More information

TREES. Trees - Introduction

TREES. Trees - Introduction TREES Chapter 6 Trees - Introduction All previous data organizations we've studied are linear each element can have only one predecessor and successor Accessing all elements in a linear sequence is O(n)

More information

Partitioning and Divide-and-Conquer Strategies

Partitioning and Divide-and-Conquer Strategies Partitioning and Divide-and-Conquer Strategies Chapter 4 slides4-1 Partitioning Partitioning simply divides the problem into parts. Divide and Conquer Characterized by dividing problem into subproblems

More information

CSE 554 Lecture 5: Contouring (faster)

CSE 554 Lecture 5: Contouring (faster) CSE 554 Lecture 5: Contouring (faster) Fall 2016 CSE554 Contouring II Slide 1 Review Iso-contours Points where a function evaluates to be a given value (iso-value) Smooth thresholded boundaries Contouring

More information

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE A6-R3: DATA STRUCTURE THROUGH C LANGUAGE NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be answered in the TEAR-OFF

More information

CS 542G: Barnes-Hut. Robert Bridson. November 5, 2008

CS 542G: Barnes-Hut. Robert Bridson. November 5, 2008 CS 54G: Barnes-Hut Robert Bridson November 5, 008 The Gravitational Potential While it s perfectly possible to derive all the following at the level of forces, it can be both convenient and useful to re-express

More information

Enzo-P / Cello. Formation of the First Galaxies. San Diego Supercomputer Center. Department of Physics and Astronomy

Enzo-P / Cello. Formation of the First Galaxies. San Diego Supercomputer Center. Department of Physics and Astronomy Enzo-P / Cello Formation of the First Galaxies James Bordner 1 Michael L. Norman 1 Brian O Shea 2 1 University of California, San Diego San Diego Supercomputer Center 2 Michigan State University Department

More information

Parallel Physically Based Path-tracing and Shading Part 3 of 2. CIS565 Fall 2012 University of Pennsylvania by Yining Karl Li

Parallel Physically Based Path-tracing and Shading Part 3 of 2. CIS565 Fall 2012 University of Pennsylvania by Yining Karl Li Parallel Physically Based Path-tracing and Shading Part 3 of 2 CIS565 Fall 202 University of Pennsylvania by Yining Karl Li Jim Scott 2009 Spatial cceleration Structures: KD-Trees *Some portions of these

More information

1. [1 pt] What is the solution to the recurrence T(n) = 2T(n-1) + 1, T(1) = 1

1. [1 pt] What is the solution to the recurrence T(n) = 2T(n-1) + 1, T(1) = 1 Asymptotics, Recurrence and Basic Algorithms 1. [1 pt] What is the solution to the recurrence T(n) = 2T(n-1) + 1, T(1) = 1 1. O(logn) 2. O(n) 3. O(nlogn) 4. O(n 2 ) 5. O(2 n ) 2. [1 pt] What is the solution

More information

CS521 \ Notes for the Final Exam

CS521 \ Notes for the Final Exam CS521 \ Notes for final exam 1 Ariel Stolerman Asymptotic Notations: CS521 \ Notes for the Final Exam Notation Definition Limit Big-O ( ) Small-o ( ) Big- ( ) Small- ( ) Big- ( ) Notes: ( ) ( ) ( ) ( )

More information

Chapter 11: Indexing and Hashing

Chapter 11: Indexing and Hashing Chapter 11: Indexing and Hashing Basic Concepts Ordered Indices B + -Tree Index Files B-Tree Index Files Static Hashing Dynamic Hashing Comparison of Ordered Indexing and Hashing Index Definition in SQL

More information

Lecture 26. Introduction to Trees. Trees

Lecture 26. Introduction to Trees. Trees Lecture 26 Introduction to Trees Trees Trees are the name given to a versatile group of data structures. They can be used to implement a number of abstract interfaces including the List, but those applications

More information

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection Algorithms ROBERT SEDGEWICK KEVIN WAYNE GEOMETRIC APPLICATIONS OF BSTS Algorithms F O U R T H E D I T I O N ROBERT SEDGEWICK KEVIN WAYNE 1d range search line segment intersection kd trees interval search

More information

9. Three Dimensional Object Representations

9. Three Dimensional Object Representations 9. Three Dimensional Object Representations Methods: Polygon and Quadric surfaces: For simple Euclidean objects Spline surfaces and construction: For curved surfaces Procedural methods: Eg. Fractals, Particle

More information

Parallel Algorithms: Adaptive Mesh Refinement (AMR) method and its implementation

Parallel Algorithms: Adaptive Mesh Refinement (AMR) method and its implementation Parallel Algorithms: Adaptive Mesh Refinement (AMR) method and its implementation Massimiliano Guarrasi m.guarrasi@cineca.it Super Computing Applications and Innovation Department AMR - Introduction Solving

More information

Advanced Tree Data Structures

Advanced Tree Data Structures Advanced Tree Data Structures Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park Binary trees Traversal order Balance Rotation Multi-way trees Search Insert Overview

More information

Trees. Truong Tuan Anh CSE-HCMUT

Trees. Truong Tuan Anh CSE-HCMUT Trees Truong Tuan Anh CSE-HCMUT Outline Basic concepts Trees Trees A tree consists of a finite set of elements, called nodes, and a finite set of directed lines, called branches, that connect the nodes

More information

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Spatial Data Structures and Speed-Up Techniques Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Spatial data structures What is it? Data structure that organizes

More information

Advanced Set Representation Methods

Advanced Set Representation Methods Advanced Set Representation Methods AVL trees. 2-3(-4) Trees. Union-Find Set ADT DSA - lecture 4 - T.U.Cluj-Napoca - M. Joldos 1 Advanced Set Representation. AVL Trees Problem with BSTs: worst case operation

More information

Lecture 25 of 41. Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees

Lecture 25 of 41. Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: http://bit.ly/hgvxlh / http://bit.ly/evizre Public

More information

Triangle Rasterization

Triangle Rasterization Triangle Rasterization Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 2/07/07 1 From last time Lines and planes Culling View frustum culling Back-face culling Occlusion culling

More information

More Hidden Surface Removal

More Hidden Surface Removal Lecture 8 More Hidden Surface Removal Efficient Painter - binary space partition (BSP) tree Efficient Ray Casting - spatial partitioning (uniform, octrees) - bounding volumes Recall last lecture... front

More information

Trees. Reading: Weiss, Chapter 4. Cpt S 223, Fall 2007 Copyright: Washington State University

Trees. Reading: Weiss, Chapter 4. Cpt S 223, Fall 2007 Copyright: Washington State University Trees Reading: Weiss, Chapter 4 1 Generic Rooted Trees 2 Terms Node, Edge Internal node Root Leaf Child Sibling Descendant Ancestor 3 Tree Representations n-ary trees Each internal node can have at most

More information

Introduction. for large input, even access time may be prohibitive we need data structures that exhibit times closer to O(log N) binary search tree

Introduction. for large input, even access time may be prohibitive we need data structures that exhibit times closer to O(log N) binary search tree Chapter 4 Trees 2 Introduction for large input, even access time may be prohibitive we need data structures that exhibit running times closer to O(log N) binary search tree 3 Terminology recursive definition

More information

CSC Design and Analysis of Algorithms

CSC Design and Analysis of Algorithms CSC : Lecture 7 CSC - Design and Analysis of Algorithms Lecture 7 Transform and Conquer I Algorithm Design Technique CSC : Lecture 7 Transform and Conquer This group of techniques solves a problem by a

More information

Lecture 6: Analysis of Algorithms (CS )

Lecture 6: Analysis of Algorithms (CS ) Lecture 6: Analysis of Algorithms (CS583-002) Amarda Shehu October 08, 2014 1 Outline of Today s Class 2 Traversals Querying Insertion and Deletion Sorting with BSTs 3 Red-black Trees Height of a Red-black

More information

Course Review. Cpt S 223 Fall 2010

Course Review. Cpt S 223 Fall 2010 Course Review Cpt S 223 Fall 2010 1 Final Exam When: Thursday (12/16) 8-10am Where: in class Closed book, closed notes Comprehensive Material for preparation: Lecture slides & class notes Homeworks & program

More information

Speeding Up Ray Tracing. Optimisations. Ray Tracing Acceleration

Speeding Up Ray Tracing. Optimisations. Ray Tracing Acceleration Speeding Up Ray Tracing nthony Steed 1999, eline Loscos 2005, Jan Kautz 2007-2009 Optimisations Limit the number of rays Make the ray test faster for shadow rays the main drain on resources if there are

More information

Spatial Data Structures for GIS Visualization. Ed Grundy

Spatial Data Structures for GIS Visualization. Ed Grundy Spatial Data Structures for GIS Visualization Ed Grundy GIS Data Elevation maps Satellite imagery (as texture data) Other data we may wish to visualise, such as temperature, population, etc In GIS terms

More information

Quadtrees and Meshing

Quadtrees and Meshing Computational Geometry Lecture INSTITUT FÜR THEORETISCHE INFORMATIK FAKULTÄT FÜR INFORMATIK Tamara Mchedlidze Darren Strash 14.12.2015 Motivation: Meshing PC Board Layouts To simulate the heat produced

More information

GPU accelerated heterogeneous computing for Particle/FMM Approaches and for Acoustic Imaging

GPU accelerated heterogeneous computing for Particle/FMM Approaches and for Acoustic Imaging GPU accelerated heterogeneous computing for Particle/FMM Approaches and for Acoustic Imaging Ramani Duraiswami University of Maryland, College Park http://www.umiacs.umd.edu/~ramani With Nail A. Gumerov,

More information

Geometric Search. range search space partitioning trees intersection search. range search space partitioning trees intersection search.

Geometric Search. range search space partitioning trees intersection search. range search space partitioning trees intersection search. Overview Geometric Search range search space partitioning trees intersection search Types of data. Points, lines, circles, rectangles, planes, polygons,... This lecture. Intersection among N objects. Example

More information

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection Algorithms ROBERT SEDGEWICK KEVIN WAYNE GEOMETRIC APPLICATIONS OF BSTS Algorithms F O U R T H E D I T I O N ROBERT SEDGEWICK KEVIN WAYNE 1d range search line segment intersection kd trees interval search

More information

FMM Data Structures. Content. Introduction Hierarchical Space Subdivision with 2 d -Trees Hierarchical Indexing System Parent & Children Finding

FMM Data Structures. Content. Introduction Hierarchical Space Subdivision with 2 d -Trees Hierarchical Indexing System Parent & Children Finding FMM Data Structures Nail Gumerov & Ramani Duraiswami UMIACS [gumerov][ramani]@umiacs.umd.edu CSCAMM FAM4: 4/9/4 Duraiswami & Gumerov, -4 Content Introduction Hierarchical Space Subdivision with d -Trees

More information

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection Algorithms ROBERT SEDGEWICK KEVIN WAYNE GEOMETRIC APPLICATIONS OF BSTS Algorithms F O U R T H E D I T I O N ROBERT SEDGEWICK KEVIN WAYNE 1d range search line segment intersection kd trees interval search

More information

ExaFMM. Fast multipole method software aiming for exascale systems. User's Manual. Rio Yokota, L. A. Barba. November Revision 1

ExaFMM. Fast multipole method software aiming for exascale systems. User's Manual. Rio Yokota, L. A. Barba. November Revision 1 ExaFMM Fast multipole method software aiming for exascale systems User's Manual Rio Yokota, L. A. Barba November 2011 --- Revision 1 ExaFMM User's Manual i Revision History Name Date Notes Rio Yokota,

More information

ij?. Master of Science Mark R. Lattanzi n APPROVED: Ü Dr. James D. Arthur Dr. Lenwood S. Heath

ij?. Master of Science Mark R. Lattanzi n APPROVED: Ü Dr. James D. Arthur Dr. Lenwood S. Heath ij?. TABLE DRIVEN QUADTREE TRAVERSAL ALGORITHMS by Mark R. Lattanzi n Thesis submitted to the Faculty of the ' Virginia Polytechnic Institute and State University for partial fulfillment of the requirements

More information

UNIVERSITY OF WATERLOO Faculty of Mathematics

UNIVERSITY OF WATERLOO Faculty of Mathematics UNIVERSITY OF WATERLOO Faculty of Mathematics Exploring the application of Space Partitioning Methods on river segments S.S. Papadopulos & Associates Bethesda, MD, US Max Ren 20413992 3A Computer Science/BBA

More information

A Scalable Adaptive Mesh Refinement Framework For Parallel Astrophysics Applications

A Scalable Adaptive Mesh Refinement Framework For Parallel Astrophysics Applications A Scalable Adaptive Mesh Refinement Framework For Parallel Astrophysics Applications James Bordner, Michael L. Norman San Diego Supercomputer Center University of California, San Diego 15th SIAM Conference

More information

CSC Design and Analysis of Algorithms. Lecture 7. Transform and Conquer I Algorithm Design Technique. Transform and Conquer

CSC Design and Analysis of Algorithms. Lecture 7. Transform and Conquer I Algorithm Design Technique. Transform and Conquer // CSC - Design and Analysis of Algorithms Lecture 7 Transform and Conquer I Algorithm Design Technique Transform and Conquer This group of techniques solves a problem by a transformation to a simpler/more

More information