4/18/2023 0 Comments Are contour lines in art 2d![]() Marching Squares is embarrassingly parallel: each square’s segments can be generated independently from all other squares. ![]() The specific coordinates of the start and end point are determined by linearly interpolating the contour level between the pixel values at either end of that side. ![]() This determines the start and end sides for a segment. First, the value at each vertex is compared against the given contour level based on which of its vertices are above or below the level, the square will fall into one of 2 4 = 16 possible cases. There are two steps that go into determining a square. Given an input raster and a particular contour level, the Marching Squares algorithm generates appropriate contour segment(s) that start and end on the sides of a square, if any. A segment is the atomic unit of a contour line and is a straight path between two vertices. Marching SquaresĪ square is a 2 x 2 array of pixels, where the center of each pixel is a vertex of the square. In addition, the linestring primitive enables other geospatial vector operations such as Douglas-Peucker simplification, densification, smoothing, topology enforcement, etc. This data format is more efficient since it eliminates duplicative vertices between adjacent segments and allows the use of more compact encoding schemes (e.g. A more complex task is exporting these contour lines as an ordered series of connected vertices, which is the standard for geospatial vector formats used in GIS. Visually rendering contour lines for graphics purposes is a relatively straightforward process, as is discussed below. Thus the performance of any contour line generation tool must function at scale. In geographic information systems (GIS), it is not uncommon for the input digital elevation models to be very large: sections of the USGS National Elevation Dataset are distributed as raster tiles, each around 60,000 by 80,000 pixels, or over 4 gigapixels per raster tile. In most cases, this is not an arbitrary collection of points, but a gridded array of evenly spaced pixels, where each pixel is the atomic unit of input data. The input data to generate contour lines is a 2D scalar field. In all cases, tightly packed lines denote rapid change, while sparse lines denote little change. are better visualized using contour lines. Another example is numerical modeling, where scalar fields of pressure, stress, temperature, intensity, etc. For example, topographic maps show contour lines generated from digital elevation models, where each line represents a path of constant elevation. Background Inputs and OutputsĬontour lines are a useful visualization technique for scalar fields. This is a major improvement over popular open-source geographic information system (GIS) software which currently performs this single-threaded. By using blocked spatial decomposition and different dimensions of parallelism during different phases, we were able to achieve 9.5x speedup with 16 threads. While the fundamental Marching Squares algorithm for drawing each line segment is embarrassingly parallel, the process of joining line segments into arbitrarily long vectors is much more complex. We implemented a parallelized 2D contour line generation program in OpenMP. 618-final Parallelized Generation and Smoothing of 2D Contour LinesĬMU 15-618 Fall 2018 - Final Project Reportĭan Mahr (dmahr) and Justin Wang (jcwang1)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |