3 dimensional geometries can be converted to 2 dimensions by mapping them to a plane. Not all 3 dimensional geometries can be converted to 2 dimensions as it requires for them to have a 2 dimensional counterpart. This rules out iso cubes, planes, and tetrahedrons. Spheres are a special case that will get converted to circles with the same radius. As no ellipsoid geometry exist the plane of circles is ignored and mapping a 3D circles thus creates a 2D circle of the same radius irrespective of the supporting plane of the circle.

## Usage

map_to(x, target, ...)

# S3 method for euclid_geometry
map_to(x, target, ...)

## Arguments

x

A vector of geometries to project or map

target

A vector of planes

...

Arguments passed on to methods

## Value

A vector of geometries in 2 dimensions

Other Projections: normal(), project()

## Examples

# Map a 3D point cloud to a plane defined by three random points
p <- point(sample(10), sample(10), sample(10))
support <- p[sample(10, 3)]
map_to(p, plane(support[1], support[2], support[3]))
#> <2D points [10]>
#>  [1] <x:-0.108, y:-0.00278> <x:-0.192, y:-0.0292>  <x:-0.258, y:-0.00454>
#>  [4] <x:-0.375, y:-0.0247>  <x:-0.125, y:-0.02>    <x:-0.325, y:-0.00833>
#>  [7] <x:-0.425, y:-0.0154>  <x:-0.0417, y:-0.0139> <x:-0.442, y:-0.0109>
#> [10] <x:-0.458, y:-0.0268>