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.
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:
-
PointSize 0-dimensional (
)Thickness,Dashing 1-dimensional (
)FaceForm 2-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 all close allBasic Examples (3)
An AffineSpace in 2D:
Graphics[AffineSpace[{0, 0}, {{1, -1}}]]Graphics3D[AffineSpace[{0, 0, 0}, {{-10, -5, 0}, {1, 1, 1}}]]Different styles applied to an affine space region:
ℛ = AffineSpace[{0, 0, 0}, {{1, -1, 0}, {1, 1, 1}}];{Graphics3D[{Pink, ℛ}], Graphics3D[{EdgeForm[Thick], Pink, ℛ}], Graphics3D[{EdgeForm[Dashed], Pink, ℛ}], Graphics3D[{EdgeForm[Directive[Thick, Dashed, Blue]], Pink, ℛ}]}Determine if points belong to a given affine space region:
ℛ = AffineSpace[{0, 0, 0}, {{1, -1, 0}, {1, 1, 1}}];{RegionMember[ℛ, {1, 1, 1}], RegionMember[ℛ, {-1, 0, 0}]}Scope (17)
Graphics (7)
Specification (2)
Define an affine space in 3D using points:
ill = Graphics3D[{PointSize[Medium], Point[{{1, 0, 0}, {1, 1, 1}, {0, 0, 1}}]}, PlotRange -> 2, Axes -> True];Show[ill, Graphics3D[AffineSpace[{{1, 0, 0}, {1, 1, 1}, {0, 0, 1}}]]]Define the same affine space using a single point and two tangent vectors:
ill = Graphics3D[{PointSize[Medium], Point[{{1, 0, 0}}], Arrowheads[Medium], Thick, Arrow[{{1, 0, 0}, {1, 1, 1}}], Arrow[{{1, 0, 0}, {0, 0, 1}}]}, PlotRange -> 2, Axes -> True];Show[ill, Graphics3D[AffineSpace[{1, 0, 0}, {{0, 1, 1}, {-1, 0, 1}}]]]An affine space in 3D defined by a single point and one tangent vector:
ill = Graphics3D[{PointSize[Medium], Point[{{1, 0, 0}}], Arrowheads[Medium], Thick, Arrow[{{1, 0, 0}, {1, 1, 1}}]}, PlotRange -> 2, Axes -> True];Show[ill, Graphics3D[AffineSpace[{1, 0, 0}, {{0, 1, 1}}]]]Affine spaces varying in direction:
Table[Graphics3D[AffineSpace[{0, 0, 0}, {{1, 0, 0}, {1, Cos[θ], Sin[θ]}}], ImageSize -> Tiny, PlotLabel -> θ], {θ, 0, π, π / 4}]Styling (2)
Color directives specify the color of the affine space:
Table[Graphics3D[{c, AffineSpace[{1, 0, 0}, {{0, 1, 1}, {-1, 0, 1}}]}], {c, {Red, Green, Yellow, Blue}}]FaceForm and EdgeForm can be used to specify the styles of the faces and edges:
Graphics3D[{FaceForm[Pink], EdgeForm[Directive[Dashed, Thick, Blue]], AffineSpace[{1, 0, 0}, {{0, 1, 1}, {-1, 0, 1}}]}]Coordinates (3)
Specify coordinates by fractions of the plot range:
Graphics3D[AffineSpace[{Scaled[{0.5, 0, 0}], Scaled[{0, 0.5, 0}], Scaled[{0.5, 0.5, 0.5}]}], PlotRange -> {{0, 10}, {0, 10}, {0, 10}}, Axes -> True]Specify scaled offsets from the ordinary coordinates:
Graphics3D[AffineSpace[{Scaled[{0, 0, 0.2}, {2, 0, 0}], Scaled[{0, 0, 0.5}, {0, 1, 0}], Scaled[{0, 0, 0.5}, {1, 1, 1}]}], PlotRange -> {{0, 2}, {0, 2}, {0, 2}}, Axes -> True]Points and vectors can be Dynamic:
DynamicModule[{θ = 0}, {Slider[Dynamic[θ], {0, Pi}], Graphics3D[AffineSpace[{0, 0, 0}, {{1, 0, 0}, Dynamic[{1, Cos[θ], Sin[θ]}]}]]}]Regions (10)
Embedding dimension is the dimension of the coordinates:
RegionEmbeddingDimension[AffineSpace[{{Subscript[x, 0], Subscript[y, 0], Subscript[z, 0]}, {Subscript[x, 1], Subscript[y, 1], Subscript[z, 1]}, {Subscript[x, 2], Subscript[y, 2], Subscript[z, 2]}}]]RegionEmbeddingDimension[AffineSpace[{Subscript[x, 0], Subscript[y, 0], Subscript[z, 0]}, {{Subscript[vx, 1], Subscript[vy, 1], Subscript[vz, 1]}, {Subscript[vx, 2], Subscript[vy, 2], Subscript[vz, 2]}}]]Geometric dimension is the dimension of the region itself:
RegionDimension[AffineSpace[{{Subscript[x, 0], Subscript[y, 0], Subscript[z, 0]}, {Subscript[x, 1], Subscript[y, 1], Subscript[z, 1]}, {Subscript[x, 2], Subscript[y, 2], Subscript[z, 2]}}]]RegionDimension[AffineSpace[{{Subscript[x, 0], Subscript[y, 0], Subscript[z, 0]}, {Subscript[x, 1], Subscript[y, 1], Subscript[z, 1]}, {Subscript[x, 2], Subscript[y, 2], Subscript[z, 2]}}]]ℛ = AffineSpace[{{0, 0, 0}, {1, 0, 0}, {0, 1, 0}}];{RegionMember[ℛ, {2, 2, 0}], RegionMember[ℛ, {0, 0, 1}]}Get the conditions for membership:
RegionMember[ℛ, {x, y, z}]An affine space has infinite measure and undefined centroid:
ℛ = AffineSpace[{{0, 0, 0}, {1, 0, 0}, {0, 1, 0}}];RegionMeasure[ℛ]RegionCentroid[ℛ]ℛ = AffineSpace[{{0, 0, 0}, {1, 0, 0}, {0, 1, 0}}];RegionDistance[ℛ, {0, 0, -3}]SignedRegionDistance[ℛ, {0, 0, -3}]ℛ = AffineSpace[{{0, 0, 0}, {1, 0, 0}, {0, 3, 1}}];RegionNearest[ℛ, {1, 2, 3}]pts = Flatten[Table[{Cos[k 2 π / 8]Cos[j π / 8], Sin[k 2 π / 8]Cos[j π / 8], Sin[j π / 8]}, {k, 0, 7}, {j, -3, 3}], 1];
nst = RegionNearest[ℛ, #]& /@ pts;Legended[Graphics3D[{{Opacity[0.5], ℛ}, {Thin, Gray, Line[Transpose[{pts, nst}]]}, {Red, Point[pts]}, {Blue, Point[nst]}}, Boxed -> False], PointLegend[{Red, Blue}, {"start", "nearest"}]]ℛ = AffineSpace[{{Subscript[x, 0], Subscript[y, 0], Subscript[z, 0]}, {Subscript[x, 1], Subscript[y, 1], Subscript[z, 1]}, {Subscript[x, 2], Subscript[y, 2], Subscript[z, 2]}}];BoundedRegionQ[ℛ]RegionBounds[ℛ]Integrate over an affine space:
ℛ = AffineSpace[{{0, 0, 0}, {1, 0, 0}, {0, 1, 1}}];Integrate[Exp[-x^2 - y^2], {x, y, z}∈ℛ]Optimize over an affine space:
ℛ = AffineSpace[{0, 0, 2}, {{1, 0, 0}, {0, 1, 0}}];Minimize[{x^2 + y^2 + z^2 + 1, {x, y, z}∈ℛ}, {x, y, z}]Solve equations over an affine space:
ℛ = AffineSpace[{0, 0, 0}, {{1, 2, 0}, {0, 0, 3}}];Reduce[x^2 + y^2 + z^2 == 1 && {x, y, z}∈ℛ, {x, y, z}]Applications (24)
Coordinate Systems (4)
v = {{1, 0}, {0, 1}};axes = Table[AffineSpace[{0, 0}, {n}], {n, v}];Graphics[Transpose[{{Red, Blue}, axes}], Frame -> True]v = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};axes = Table[AffineSpace[{0, 0, 0}, {n}], {n, v}];Graphics3D[Transpose[{{Red, Blue, Green}, axes}], Boxed -> False, Axes -> True]vpairs = Subsets[IdentityMatrix[3], {2}];planes = Table[AffineSpace[{0, 0, 0}, v], {v, vpairs}];Graphics3D[{Opacity[0.4], Transpose[{{Red, Green, Blue}, planes}]}, Boxed -> False]v1 = AffineSpace[{Pi / 4, 0}, {{0, 1}}];
v2 = AffineSpace[{0, Sin[Pi / 4]}, {{1, 0}}];Plot[Sin[x], {x, 0, 2Pi}, Epilog -> {Dashed, Red, v1, Green, v2}]plane[x_] := Graphics3D[{Opacity[0.2, Blue], AffineSpace[{x, 0, 0}, {{0, 1, 0}, {0, 0, 1}}]}];plot = Plot3D[2Sin[x + y ^ 2], {x, -3, 3}, {y, -2, 2}, Mesh -> None, Boxed -> False];Show[plot, plane[-1], plane[1]]Visualizing Transformations (3)
Visualize the axis of rotation for RotationTransform:
v = {4, 2, -5};
p = {2, 2, 3 / 2};axis = AffineSpace[p, {v}];rt[θ_] := RotationTransform[θ, v, p];g = Graphics3D[Table[{GeometricTransformation[Sphere[], rt[θ]]}, {θ, 0, 2Pi, 2Pi / 8}], Boxed -> False];Show[g, Graphics3D[{Thick, Blue, Dashed, axis}]]Visualize rotated coordinate axes in 3D:
axes = Table[AffineSpace[{0, 0, 0}, {UnitVector[3, n]}], {n, 3}];labels = Table[Text[{"x", "y", "z"}[[n]], UnitVector[3, n], {-1, -1}], {n, 3}];labeledAxes = {axes, labels};Graphics3D[{Gray, labeledAxes, Red, GeometricTransformation[labeledAxes, EulerMatrix[{(π/6), (π/4), (π/4)}]]}, Boxed -> False, PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}]pt = {1, 1, 1};
v1 = {3, -1, -2};
v2 = {-1, 3, -2};ip = AffineSpace[pt, {v1, v2}];Define a ReflectionTransform using a point on the plane and its normal vector:
n = Cross[Normalize[v1], Normalize[v2]];rt = ReflectionTransform[n, pt];Visualize the reflection of a unit cube about the plane:
c = Cuboid[];Graphics3D[{Opacity[0.5], {Yellow, ip}, {Blue, c}, {Red, GeometricTransformation[c, rt]}}]Illustrating Plots (3)
asym = AffineSpace[{0, 0}, {{1, 1}}];Plot[(x ^ 2 + x + 1/x + 1), {x, -1, 7}, Epilog -> {Red, Dashed, asym}, PlotRange -> 7]ParametricPlot[{t + Cos[14 t] / t, t + Sin[14 t] / t}, {t, 0.01, 10}, Epilog -> {Red, Dashed, asym}]data = RandomVariate[NormalDistribution[5, 9], 200];m = {Dashed, Red, AffineSpace[{Mean[data], 0}, {{0, 1}}]};Histogram[data, Epilog -> m]Partition space in a BubbleChart:
b = BubbleChart3D[RandomReal[1, {10, 4}]];p = AffineSpace[{0, 0, 0}, {{0, 0, 1}, {1, 1, 0}}];Show[b, Graphics3D[{Opacity@0.7, p}]]Finding Intersections (10)
Find the intersection of two lines:
line1 = AffineSpace[{0, 0}, {{1, 1}}];
line2 = AffineSpace[{{0, 1}, {1, 0}}];sol = Solve[{x, y}∈line1∧{x, y}∈line2, {x, y}]Graphics[{{Lighter[Blue, 0.5], line1, line2}, {Red, Point[{x, y} /. sol]}}, Axes -> True, ImageSize -> Small]Find the intersections of a line and a circle:
line = AffineSpace[{0, 0}, {{1, 1}}];
circle = Circle[{0, 0}, 1];sol = Solve[{x, y}∈line∧{x, y}∈circle, {x, y}]Graphics[{{Lighter[Blue, 0.5], line, circle}, {Red, Point[{x, y} /. sol]}}, ImageSize -> Small]Find all pairwise intersections between five random lines:
lines = AffineSpace /@ RandomReal[1, {5, 2, 2}];Use BooleanCountingFunction to express that exactly two conditions are true:
sol = NSolve[{x, y}∈BooleanRegion[BooleanCountingFunction[{2}, 5], lines], {x, y}]Graphics[{{Lighter[Blue, 0.5], lines}, {Red, PointSize[Medium], Point[{x, y} /. sol]}}]Find the intersection of a line and a plane:
line = AffineSpace[{{-1, -1, 1}, {1, -1, 1}}];
plane = AffineSpace[{{2, 0, 0}, {0, -2, 0}, {0, 0, 2}}];sol = Solve[{{x, y, z}∈line, {x, y, z}∈plane}, {x, y, z}]Graphics3D[{{line, Opacity[0.4], plane}, {Red, PointSize[Large], Point[{x, y, z} /. sol]}}, PlotRange -> {{-2, 2}, {-2, 2}, {-2, 2}}, Axes -> True, Boxed -> False]Find the intersections of a line and a sphere:
line = AffineSpace[{{-1, 1, 1}, {1, 1, 1}}];
sphere = Sphere[{0, 0, 0}, 3];sol = Solve[{{x, y, z}∈line, {x, y, z}∈sphere}, {x, y, z}]Graphics3D[{{line, Opacity[0.4], sphere}, {Red, PointSize[Large], Point[{x, y, z} /. sol]}}, PlotRangePadding -> 0.5]Find the intersections of a line and the boundary of a tetrahedron:
line = AffineSpace[{{-1, 1 / 3, 1 / 2}, {1, 1 / 3, 1 / 2}}];
tet = RegionBoundary@Tetrahedron[{{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}}];sol = Solve[{x, y, z}∈RegionIntersection[line, tet], {x, y, z}]Graphics3D[{{line, Opacity[0.5], Tetrahedron[{{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}}]}, {Red, PointSize[Medium], Point[{x, y, z} /. sol]}}, PlotRangePadding -> {0.3, 0, 0}, Boxed -> False]Find the altitude of a triangle:
{a, b, c} = {{0, 0}, {3, 0}, {-1, 2}};base = AffineSpace[{a, b}];foot = RegionNearest[base, c];altitude = Line[{c, foot}];Graphics[{{LightBlue, Triangle[{a, b, c}]}, {Thick, Darker@LightBlue, base}, {PointSize@Medium, Red, Point[{c, foot}]}, {Dashed, Red, altitude}}]Find the plane in which a triangle is embedded:
{Subscript[p, 1], Subscript[p, 2], Subscript[p, 3]} = {{1, 0, 0}, {1, 1, 1}, {0, 0, 1}};AffineSpace can use the same parametrization as Triangle:
Subscript[ℛ, 1] = Triangle[{Subscript[p, 1], Subscript[p, 2], Subscript[p, 3]}];
Subscript[ℛ, 2] = AffineSpace[{Subscript[p, 1], Subscript[p, 2], Subscript[p, 3]}];Graphics3D[{Red, Subscript[ℛ, 1], Opacity[0.5, Yellow], Subscript[ℛ, 2]}, PlotRange -> {{-2, 2}, {-2, 2}, {-2, 2}}]Find the plane in which a polygon is embedded:
p0 = {1, 1, 1};
e1 = Normalize[{2, 1, 1}];e2 = Normalize[{-1, 1, 2}];pl = With[{p = 5}, Table[p0 + Cos[2Pi k / p]e1 + Sin[2Pi k / p]e2, {k, p}]];To find the plane, take the first three points (or any three points not on a line):
Subscript[ℛ, 1] = Polygon[pl];
Subscript[ℛ, 2] = AffineSpace[pl[[1 ;; 3]]];Graphics3D[{Red, Subscript[ℛ, 1], Opacity[0.5, Yellow], Subscript[ℛ, 2]}, PlotRange -> {{-2, 2}, {-2, 2}, {-2, 2}}]Find the intersection points of a sphere, a plane, and a surface defined by
:
Subscript[ℛ, 1] = Sphere[];
Subscript[ℛ, 2] = AffineSpace[{{0, 0, 0}, {0, 1, 0}, {1, 0, 1}}];pts = Solve[2 x y == z^2 && {x, y, z}∈Subscript[ℛ, 1] && {x, y, z}∈Subscript[ℛ, 2], {x, y, z}, Reals]Visualize intersection points:
intersections = {PointSize[Large], Red, Point[{x, y, z} /. pts]};r1 = {Opacity[0.5, LightBlue], Subscript[ℛ, 1]};r2 = {Opacity[0.5, Yellow], Subscript[ℛ, 2]};r3 = ContourPlot3D[2 x y == z^2, {x, -1.2, 1.2}, {y, -1.2, 1.2}, {z, -1.2, 1.2}, Mesh -> None, ContourStyle -> Opacity[0.5]];Show[{Graphics3D[{r1, r2, intersections}], r3}, Boxed -> False]Arrangements of Lines, Planes and Spaces (4)
Parallel lines have parallel direction vectors:
v1 = {1, 1};v2 = 2 * v1;v3 = -v1;Graphics[{AffineSpace[{0, 0}, {v1}], AffineSpace[{0, 1}, {v2}], AffineSpace[{0, 2}, {v3}]}, PlotRange -> {{-3, 3}, {0, 3}}]Parallel vectors have angle
or
:
{VectorAngle[v1, v2], VectorAngle[v1, v3]}Parallel planes in 3D have parallel normal vectors:
v1 = {{2, 1, 13}, {6, 15, 24}};v2 = {{8, 0, 57}, {10, 57, 0}};v3 = {{2, 1, 13}, {-4, -14, -11}};Graphics3D[{AffineSpace[{0, 0, 0}, v1], AffineSpace[{0, 0, 1}, v2], AffineSpace[{0, 0, 2}, v3]}, PlotRange -> 1]nv1 = Cross@@v1;nv2 = Cross@@v2;nv3 = Cross@@v3;{VectorAngle[nv1, nv2], VectorAngle[nv1, nv3]}Perpendicular lines have orthogonal tangent vectors and orthogonal normal vectors:
{v1, v2} = {{1, 1}, {1, -1}};Graphics[{AffineSpace[{0, 0}, {v1}], AffineSpace[{0, 0}, {v2}]}]Tangent vectors are orthogonal:
Dot[v1, v2]Dot[Cross[v1], Cross[v2]]Perpendicular planes have orthogonal normal vectors:
{v1, v2} = {{{2, 1, 13}, {6, 15, 24}}, {{-57, 0, 8}, {0, 1, 0}}};Graphics3D[Table[AffineSpace[{0, 0, 0}, v], {v, {v1, v2}}]]The normal vectors are orthogonal:
{n1, n2} = {Cross@@v1, Cross@@v2}Dot[n1, n2]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
:
vv1 = {{1, 0, 1}, {0, 1, 1}};
vv2 = {{1, 1, 2}};Graphics3D[{AffineSpace[{1, 1, 1}, vv1], AffineSpace[{0, 0, 0}, vv2]}]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
:
MatrixRank[Union[vv1, vv2]]Max[MatrixRank /@ {vv1, vv2}]Test whether a plane and a 3D affine subspace of the 4D space are parallel:
vv1 = {{5, 5, 5, 5}, {4, 4, 6, 6}};
vv2 = {{1, 2, 3, 4}, {4, 3, 2, 1}, {3, 2, 3, 2}};MatrixRank[Union[vv1, vv2]] == Max[MatrixRank /@ {vv1, vv2}]Properties & Relations (6)
AffineSpace is a special case of ConicHullRegion:
p = {1, 2, 1};v = {{-2, 3, 1}, {2, 2, 2}};Subscript[ℛ, 1] = AffineSpace[p, v];
Subscript[ℛ, 2] = ConicHullRegion[p, v];RegionEqual[Subscript[ℛ, 1], Subscript[ℛ, 2]]InfiniteLine is a special case of AffineSpace:
pl = {{1, 2}, {3, 4}};RegionEqual[AffineSpace[pl], InfiniteLine[pl]]InfinitePlane is a special case of AffineSpace:
Subscript[ℛ, 1] = AffineSpace[{0, 0, 0}, {{1, 0, 0}, {0, 1, 0}}];
Subscript[ℛ, 2] = InfinitePlane[{0, 0, 0}, {{1, 0, 0}, {0, 1, 0}}];RegionEqual[Subscript[ℛ, 1], Subscript[ℛ, 2]]Hyperplane is a special case of AffineSpace:
p = {0, 0, 0};n = {0, 0, 1};
{v1, v2} = NullSpace[{n}];Subscript[ℛ, 1] = AffineSpace[p, {v1, v2}];
Subscript[ℛ, 2] = Hyperplane[n, p];RegionEqual[Subscript[ℛ, 1], Subscript[ℛ, 2]]ParametricRegion can represent any AffineSpace in
:
p = {1, 0};v = {1, 2};Subscript[ℛ, 1] = ParametricRegion[p + a v, {a}];Subscript[ℛ, 2] = AffineSpace[p, {v}];RegionEqual[Subscript[ℛ, 1], Subscript[ℛ, 2]]p = {0, 0, 0, 5, 1};v1 = {1, 2, 3, 0, 0};v2 = {1, 1, 1, 5, 1};v3 = {1, 1, 1, 1, 1};Subscript[ℛ, 1] = ParametricRegion[p + a v1 + b v2 + c v3, {a, b, c}];Subscript[ℛ, 2] = AffineSpace[p, {v1, v2, v3}];RegionEqual[Subscript[ℛ, 1], Subscript[ℛ, 2]]ImplicitRegion can represent any AffineSpace in
:
p = {1, 2};v = {1, 1};
eqns = And[(p.# == {x, y}.#)& /@ NullSpace[{v}]]Subscript[ℛ, 1] = ImplicitRegion[eqns, {x, y}];
Subscript[ℛ, 2] = AffineSpace[p, {v}];RegionEqual[Subscript[ℛ, 1], Subscript[ℛ, 2]]p = {1, 2, 1, 1, 1};v1 = {3, 4, 2, 2, 2};v2 = {1, 2, 2, 3, 4};
eqns = And@@((p.# == {x1, x2, x3, x4, x5}.#)& /@ NullSpace[{v1, v2}])Subscript[ℛ, 1] = ImplicitRegion[eqns, {x1, x2, x3, x4, x5}];Subscript[ℛ, 2] = AffineSpace[p, {v1, v2}];RegionEqual[Subscript[ℛ, 1], Subscript[ℛ, 2]]Neat Examples (4)
Graphics[Table[{Hue[RandomReal[]], AffineSpace[RandomReal[1, {2, 2}]]}, {50}]]Graphics3D[Table[{Hue[RandomReal[]], AffineSpace[RandomReal[1, {2, 3}]]}, {100}], BoxRatios -> 1]Organized collection of lines:
Graphics[Table[AffineSpace[{0, 0}, {{Cos[θ], Sin[θ]}}], {θ, 0., π, π / 50}]]Graphics[Table[AffineSpace[{Cos[θ], Sin[θ]}, {{-Sin[θ], Cos[θ]}}], {θ, 0, 2π, π / 20}], PlotRange -> 2]A random collection of planes:
Graphics3D[Table[{Hue[RandomReal[]], AffineSpace[RandomReal[1, {3, 3}]]}, {25}], Lighting -> "Neutral", PlotRange -> 1]Sweep an infinite plane around an axis:
Table[Graphics3D[{Opacity[0.3], ColorData["Rainbow"][Rescale[θ, {0, π / 2}]], AffineSpace[{0, 0, 0}, {{1, 0, 0}, {1, Cos[θ], Sin[θ]}}]}], {θ, 0, π, π / 12}]//ShowSee Also
Related Guides
History
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_2026_affinespace, author="Wolfram Research", title="{AffineSpace}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/AffineSpace.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_affinespace, organization={Wolfram Research}, title={AffineSpace}, year={2015}, url={https://reference.wolfram.com/language/ref/AffineSpace.html}, note=[Accessed: 13-June-2026]}