From 295d6f2f4605cce89b07652ec672c57df8443192 Mon Sep 17 00:00:00 2001
From: Philip Chmielowiec <67855069+philipc2@users.noreply.github.com>
Date: Fri, 8 Dec 2023 01:29:39 -0600
Subject: [PATCH] rendering techniques notebook
---
.../02-methods/02-rendering-techniques.ipynb | 117 +++++++-----------
1 file changed, 42 insertions(+), 75 deletions(-)
diff --git a/notebooks/02-methods/02-rendering-techniques.ipynb b/notebooks/02-methods/02-rendering-techniques.ipynb
index 416c4c1d..e6468617 100644
--- a/notebooks/02-methods/02-rendering-techniques.ipynb
+++ b/notebooks/02-methods/02-rendering-techniques.ipynb
@@ -7,13 +7,17 @@
"# Rendering Techniques\n",
"---\n",
"\n",
- "Since Unstructured Grids are significantly more complex than Structured (a.k.a. Regular) Grids, the choice of rendering technique plays an important role in obtaining high-resolution, accurate, and scalable visualizations. \n",
+ "Since Unstructured Grids require significantly more overhead to represent compared to Structured (a.k.a. Regular) grids, the choice of rendering technique plays an important in obtaining high-resolution, accurate, and scalable visualuations. \n",
+ "\n",
"\n",
"This notebook introduces relevant concepts and techniques that will be mentioned and used throughout this Cookbook."
]
},
{
"cell_type": "markdown",
+ "metadata": {
+ "collapsed": false
+ },
"source": [
"## Vector (Shape) Geometries\n",
"\n",
@@ -26,70 +30,40 @@
"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",
- ""
- ],
- "metadata": {
- "collapsed": false
- }
+ ""
+ ]
},
{
"cell_type": "markdown",
+ "metadata": {
+ "collapsed": false
+ },
"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",
"\n",
- ""
- ],
- "metadata": {
- "collapsed": false
- }
+ ""
+ ]
},
{
"cell_type": "markdown",
- "source": [
- "The following examples show examples of how different elements of an unstructured grid can be represented geometrically."
- ],
"metadata": {
"collapsed": false
- }
+ },
+ "source": [
+ "The following code snippets show how we can represent each of the main unstructured grid geometries.\n"
+ ]
},
{
"cell_type": "code",
"execution_count": null,
- "outputs": [],
- "source": [
- "import shapely as sp"
- ],
- "metadata": {
- "collapsed": false
- }
- },
- {
- "cell_type": "markdown",
- "source": [
- "A point is represented using a pair of Longitude and Latitude Values"
- ],
"metadata": {
"collapsed": false
- }
- },
- {
- "cell_type": "markdown",
- "source": [
- "sp.Point([0.0, 0.0])"
- ],
- "metadata": {
- "collapsed": false
- }
- },
- {
- "cell_type": "markdown",
+ },
+ "outputs": [],
"source": [
- "An Edge is represented using a pair of points. "
- ],
- "metadata": {
- "collapsed": false
- }
+ "import shapely as sp"
+ ]
},
{
"cell_type": "code",
@@ -102,59 +76,52 @@
"collapsed": false
}
},
- {
- "cell_type": "markdown",
- "source": [
- "A Polygon is represented in terms of it's exterior coordinates, each of which are points."
- ],
- "metadata": {
- "collapsed": false
- }
- },
{
"cell_type": "code",
"execution_count": null,
+ "metadata": {
+ "collapsed": false
+ },
"outputs": [],
"source": [
"sp.Polygon([[100, 40], [100, 50], [90, 50], [90, 40], [100, 40]])"
- ],
- "metadata": {
- "collapsed": false
- }
+ ]
},
{
"cell_type": "markdown",
+ "metadata": {
+ "collapsed": false
+ },
"source": [
"## Rasterization\n",
"\n",
- "Rendering each geometry directly is an expensive operation for even moderately large datasets. \n",
+ "While there is definitely merit in rendering each geometric shape directly, this operation is extremely computationally expensive for large datasets.\n",
"\n",
- "Rasterization todo..\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",
"\n",
+ "The figure below shows how rasterization approximates the geometry of geometries.\n",
"\n",
- ""
- ],
- "metadata": {
- "collapsed": false
- }
+ "\n",
+ ""
+ ]
},
{
"cell_type": "markdown",
- "source": [
- "Below is an example of rastered polygons plotted against the expected geometry.\n",
- "\n",
- ""
- ],
"metadata": {
"collapsed": false
- }
+ },
+ "source": [
+ "Below is an example of rasterized polygons plotted against the expected geometry.\n",
+ "\n",
+ ""
+ ]
},
{
"cell_type": "markdown",
- "source": [],
"metadata": {
"collapsed": false
- }
+ },
+ "source": []
}
],
"metadata": {
@@ -173,7 +140,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.11"
+ "version": "3.11.5"
},
"nbdime-conflicts": {
"local_diff": [