AffineSpace

AffineSpace[{p1,,pk+1}]

represents the affine space passing through the points pi.

AffineSpace[p,{v1,,vk}]

represents the affine space passing through p in the directions vi.

Details

  • AffineSpace is also known as a point, line, plane, -flat, -plane, etc.
  • AffineSpace can be used as a geometric region and a graphics primitive.
  • AffineSpace represents the region or . The dimension is k if the pi are affinely independent or the vi are linearly independent.
  • AffineSpace can be used in Graphics and Graphics3D.
  • AffineSpace will be clipped by PlotRange when rendering.
  • Graphics rendering is affected by directives such as Opacity and color as well as:
  • PointSize0-dimensional ()
    Thickness,Dashing1-dimensional ()
    FaceForm2-dimensional ()
  • For a two-dimensional AffineSpace, FaceForm[front,back] can be used to specify different styles for the front and back, where the front is defined to be in the direction of the normal Cross[v1,v2] or Cross[p2-p1,p3-p1], depending on which input form is used.

Examples

open allclose all

Basic Examples  (3)

An AffineSpace in 2D:

And in 3D:

Different styles applied to an affine space region:

Determine if points belong to a given affine space region:

Scope  (17)

Graphics  (7)

Specification  (2)

Define an affine space in 3D using points:

Define the same affine space using a single point and two tangent vectors:

An affine space in 3D defined by a single point and one tangent vector:

Affine spaces varying in direction:

Styling  (2)

Color directives specify the color of the affine space:

FaceForm and EdgeForm can be used to specify the styles of the faces and edges:

Coordinates  (3)

Specify coordinates by fractions of the plot range:

Specify scaled offsets from the ordinary coordinates:

Points and vectors can be Dynamic:

Regions  (10)

Embedding dimension is the dimension of the coordinates:

Geometric dimension is the dimension of the region itself:

Point membership test:

Get the conditions for membership:

An affine space has infinite measure and undefined centroid:

Distance from a point:

Signed distance from a point:

Nearest point in the region:

Nearest points:

An affine space is unbounded:

Find the region range:

Integrate over an affine space:

Optimize over an affine space:

Solve equations over an affine space:

Applications  (24)

Coordinate Systems  (4)

Visualize coordinate axes:

In 3D:

Visualize coordinate planes:

Add drop lines to a plot:

Add drop planes to a plot:

Visualizing Transformations  (3)

Visualize the axis of rotation for RotationTransform:

Visualize rotated coordinate axes in 3D:

Visualize a reflection plane:

Define a reflection plane:

Define a ReflectionTransform using a point on the plane and its normal vector:

Visualize the reflection of a unit cube about the plane:

Illustrating Plots  (3)

Illustrate asymptotes:

Indicate Mean on a Histogram:

Partition space in a BubbleChart:

Combine the graphics:

Finding Intersections  (10)

Find the intersection of two lines:

Plot it:

Find the intersections of a line and a circle:

Plot it:

Find all pairwise intersections between five random lines:

Use BooleanCountingFunction to express that exactly two conditions are true:

Plot it:

Find the intersection of a line and a plane:

Plot it:

Find the intersections of a line and a sphere:

Plot it:

Find the intersections of a line and the boundary of a tetrahedron:

Plot it:

Find the altitude of a triangle:

Visualize altitude in red:

Find the plane in which a triangle is embedded:

AffineSpace can use the same parametrization as Triangle:

Find the plane in which a polygon is embedded:

To find the plane, take the first three points (or any three points not on a line):

Find the intersection points of a sphere, a plane, and a surface defined by :

Visualize intersection points:

Arrangements of Lines, Planes and Spaces  (4)

Parallel lines have parallel direction vectors:

Parallel vectors have angle or :

Parallel planes in 3D have parallel normal vectors:

The normals are parallel:

Perpendicular lines have orthogonal tangent vectors and orthogonal normal vectors:

Tangent vectors are orthogonal:

And so are their normals:

Perpendicular planes have orthogonal normal vectors:

The normal vectors are orthogonal:

AffineSpace[p,vv1] is parallel to AffineSpace[q,vv2] if either all vectors belong to the linear space generated by or all vectors belong to the linear space generated by :

To test whether two affine spaces are parallel, check that the rank of the union of and is equal to the maximum of ranks of and :

Test whether a plane and a 3D affine subspace of the 4D space are parallel:

Properties & Relations  (6)

AffineSpace is a special case of ConicHullRegion:

InfiniteLine is a special case of AffineSpace:

InfinitePlane is a special case of AffineSpace:

Hyperplane is a special case of AffineSpace:

ParametricRegion can represent any AffineSpace in :

In :

ImplicitRegion can represent any AffineSpace in :

In :

Neat Examples  (4)

A random collection of lines:

Organized collection of lines:

A random collection of planes:

Sweep an infinite plane around an axis:

Wolfram Research (2015), AffineSpace, Wolfram Language function, https://reference.wolfram.com/language/ref/AffineSpace.html.

Text

Wolfram Research (2015), AffineSpace, Wolfram Language function, https://reference.wolfram.com/language/ref/AffineSpace.html.

CMS

Wolfram Language. 2015. "AffineSpace." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AffineSpace.html.

APA

Wolfram Language. (2015). AffineSpace. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AffineSpace.html

BibTeX

@misc{reference.wolfram_2024_affinespace, author="Wolfram Research", title="{AffineSpace}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/AffineSpace.html}", note=[Accessed: 24-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_affinespace, organization={Wolfram Research}, title={AffineSpace}, year={2015}, url={https://reference.wolfram.com/language/ref/AffineSpace.html}, note=[Accessed: 24-April-2024 ]}