Skip to content

Commit

Permalink
markdown and admonition formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
philipc2 committed Dec 10, 2023
1 parent 933ad62 commit f184414
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 11 deletions.
21 changes: 16 additions & 5 deletions notebooks/02-methods/02-rendering-techniques.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"\n",
"Rendering each face as a polygon will lead to visuals that look like this, which are extremely high-quality and represent the exact geometry of each face.\n",
"\n",
" \n",
"\n",
"<img src=\"../images/rendering/polygons.png\" alt=\"Continents\" width=\"400\"/>"
]
Expand All @@ -41,6 +42,7 @@
"source": [
"Another example of Vector Geometries is encountered when adding features to a visualization, such as Contents or Borders. The geometries of these features are drawn onto our screen.\n",
"\n",
"&nbsp;\n",
"\n",
"<img src=\"../images/rendering/contients.jpg\" alt=\"Continents\" width=\"600\"/>"
]
Expand Down Expand Up @@ -97,9 +99,12 @@
"\n",
"While there is definitely merit in rendering each geometric shape directly, this operation is extremely computationally expensive for large datasets.\n",
"\n",
"Rasterization is a technique in computer graphics that converts vector (a.k.a geometric shapes) graphics into a raster image, which is simply a series of pixels.\n",
"Rasterization is a technique in computer graphics that converts vector (a.k.a geometric shapes) graphics into a raster image, which can be thought of as a regularly-sampled array of pixel values used for rendering.\n",
"\n",
"The figure below shows a simplified example of rasterization \"approximates\" the geometry of different elements.\n",
"\n",
"&nbsp;\n",
"\n",
"The figure below shows how rasterization approximates the geometry of geometries.\n",
"\n",
"\n",
"<img src=\"../images/rendering/raster_example.png\" alt=\"Rasterization Example\" width=\"1000\"/>"
Expand All @@ -111,17 +116,23 @@
"collapsed": false
},
"source": [
"Below is an example of rasterized polygons plotted against the expected geometry.\n",
"For unstructured grids, rasterization looks something like this:\n",
"\n",
"&nbsp;\n",
"\n",
"<img src=\"../images/rendering/raster-vs-vector.png\" alt=\"raster and vector\" width=\"400\"/>"
]
},
{
"cell_type": "markdown",
"source": [
"The black edges outline the expected geometry of each face (a.k.a polygon).\n",
"\n",
"We can observe the jaggedness in the shading, which is the product of rasterization approximating each face."
],
"metadata": {
"collapsed": false
},
"source": []
}
}
],
"metadata": {
Expand Down
10 changes: 6 additions & 4 deletions notebooks/03-uxarray-vis/03-polygons.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,10 @@
{
"cell_type": "markdown",
"source": [
":::{important}\n",
"For large datasets (i.e. 1,000,000 or more faces), it's not recommended to directly plot Polygons.\n",
":::{attention}\n",
"For moderately to high resolution grids, it's not recommended to directly plot polygons.\n",
"\n",
"Plotting each polygon is extremely computationally expensive to render and may not provide the most visually-appealing plots.\n",
":::"
],
"metadata": {
Expand All @@ -234,7 +236,7 @@
"\n",
"Instead of plotting the geometry of each polygon directly, we can rasterize our set of polygons to obtain a raster plot.\n",
"\n",
":::{remember}\n",
":::{hint}\n",
"A raster plot of any set of geometric elements (in this case Polygons) renders each data into a regularly shaped array as opposed to rendering each shape directly.\n",
":::\n"
],
Expand Down Expand Up @@ -286,7 +288,7 @@
"You can select whether to include or exclude these antimeridian polygons by using the `exclude_antimeridian` parameter. \n",
"\n",
"\n",
":::{important}\n",
":::{attention}\n",
"For larger, higher-resolution, grids, it's suggested to keep `exclude_antimeridian=True` to decrease the time needed to process the grid for visualization.\n",
":::\n"
],
Expand Down
13 changes: 11 additions & 2 deletions notebooks/03-uxarray-vis/04-points.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
"\n",
"Instead of plotting the geometry of each point directly, we can rasterize our set of points to obtain a raster plot.\n",
"\n",
":::{remember}\n",
":::{hint}\n",
"A raster plot of any set of geometric elements (in this case Points) renders each data into a regularly shaped array as opposed to rendering each shape directly.\n",
":::"
],
Expand Down Expand Up @@ -262,13 +262,22 @@
{
"cell_type": "markdown",
"source": [
":::{Important}\n",
":::{attention}\n",
"Visualization at higher resolutions, including a discussion about Point Rasterization, is discussed in the \"Visualuzation at Scale\" notebook.\n",
":::"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [],
"metadata": {
"collapsed": false
}
}
],
"metadata": {
Expand Down

0 comments on commit f184414

Please sign in to comment.