What are regions anyway?
Whether it’s a 3D character model in a game or the 2D curves that form the letter B in a font, when we want to represent an object in some space we turn to geometric regions.
While the ways we represent regions can seem so different, they share an underlying definition that let’s us analyze and operate on them in a unified manner.
In short, regions are just a defined area within a space. It doesn’t matter if the space is 2D, 3D, 37D, whatever. As long as we can say that any given point is either inside or outside the region, then we’re good. You can even use non-Euclidean spaces, if you’re into that kind of thing.
There is a separate concept of intrinsic geometry that is independent of any specific space. Instead, it describes the measurements and connections between elements of the region and uses that to derive properties of the region. But I’m pretty sure you need a be a licensed mathematician to legally use them.
There is a separate concept of intrinsic geometry that is independent of any specific space. Instead, it describes the measurements and connections between elements of the region and uses that to derive properties of the region. But I’m pretty sure you need a be a licensed mathematician to legally use them.
More formally, we can say a region is defined as a set of points. In case you’re not familiar, a set is just a fancy name for an unordered list with no duplicate elements. For a point to be within a region, it must be a member of its point set. Using this definition, we can piggyback off of set theory to do some cool stuff.
In the rest of this post I’m going to cover the variety of ways we represent regions and how it all comes back to point sets. Also, to save on time I’m going to avoid talking about the additional information like colors and surface normals that regions often carry with them.
Point Clouds
Let’s start with the most straightforward region type — point clouds! A point cloud is a literal list of points, so it can clearly be mapped to a point set.
We can try to represent continuous shapes like circles or spheres by just adding more points.
This sort of works, and for some applications like rendering a 3D scanned object it might be okay. However, it has a few significant downsides.
- Requires a lot of memory
- Lacks connectivity information (what are the neighboring points? what is the topology?)
- Contains gaps (problem when zooming in or performing ray casts)
In short, point clouds are a simple but expensive way to approximate a region. Can we instead define a set that accurately represents continuous regions?
Yes! Though to do so we need to use an infinite set of points. As you probably guessed, we can’t just list a set of infinite points with our finite time and memory. Instead, we need to specify our regions according to some rules.
For example, we can define a unit circle as the set of all points at distance 1 from the origin, which written mathematically looks like this:
Alternatively, we could use the functions and to directly generate all the points on the circle.
While these two representations produce equivalent point sets, they represent the two main categories of methods for representing infinite point sets.
References
-
Geometry Lecture Video: https://www.youtube.com/watch?v=MakhXtIX2YM
-
Hyperbolica: https://store.steampowered.com/app/1256230/Hyperbolica/