GeometricTest

GeometricTest[obj,prop]

tests whether the geometric object obj satisfies prop.

GeometricTest[{obj1,obj2,},prop]

tests whether the obji satisfy prop.

GeometricTest[objs,prop1,prop2,]

tests whether objs satisfy each of the propi.

Details

  • When possible, GeometricTest gives conditions for objects containing variables to satisfy the given property.
  • GeometricTest attempts to evaluate a condition to True or False, whereas GeometricAssertion is an inert representation of the condition. »
  • The propi can either be predicates that apply to individual geometric objects or relations that hold between geometric objects.
  • If prop is a predicate, then GeometricTest[{obj1,obj2,},prop] is equivalent to GeometricTest[obj1,prop]&&GeometricTest[obj2,prop]&&.
  • GeometricTest[objs,prop1,prop2,] is equivalent to GeometricTest[objs,prop1]&&GeometricTest[objs,prop2]&&.
  • The following predicates for polygons can be used:
  • "Clockwise"the vertices are in clockwise order
    "Convex"the polygon is convex
    "Counterclockwise"the vertices are in counterclockwise order
    "Cyclic"the vertices lie on a circle
    "Equiangular"the interior angles are all equal
    "Equilateral"the side lengths are all equal
    "Parallelogram"the polygon is a parallelogram
    "Rectangle"the polygon is a rectangle
    "Regular"the polygon is regular
    "Simple"the polygon is simple
  • The following predicates for lines can be used:
  • "Horizontal"the line is horizontal
    "Vertical"the line is vertical
    "Leftward"the line is oriented to the left
    "Rightward"the line is oriented to the right
    "Upward"the line is oriented upward
    "Downward"the line is oriented downward
  • The following predicates for geometric objects can be used:
  • {"Inside",circle}the object is inside the circle
    {"Outside",circle}the object is outside the circle
  • The following relations between points can be used:
  • "Clockwise"the points are in clockwise order if successively joined
    "Collinear"the points lie on a line
    "Counterclockwise"the points are in counterclockwise order if successively joined
    "CyclicallyOrdered"the points are in either clockwise or counterclockwise order
    "Distinct"the points are distinct
    {"EqualAngles",pt}successive angles subtended at pt are equal
  • The following relations between lines can be used:
  • "Antiparallel"the lines are parallel but in opposite directions
    "Concurrent"the lines intersect at a common point
    {"Concurrent",pt}the lines intersect at the point pt
    "MatchingParallel"the lines are parallel and in the same direction
    "Nondegenerate"the lines lie on distinct infinite lines
    "Parallel"the lines are parallel (with any relative orientation)
    "Perpendicular"the lines are perpendicular
  • The following relations between geometric objects can be used:
  • "Congruent"the objects are congruent
    "PairwiseTangent"the objects are tangent to each other, in pairs
    {"SameSide",line}the objects are on the same side of the line
    "Similar"the objects are similar
    "Tangent"the objects are all tangent to each other at a common point
    {"Tangent",pt}the objects are all tangent at the point pt
  • The following relation between two lists of geometric objects can be used:
  • {"OppositeSides",line}the two lists of objects are on opposite sides of the line

Examples

open allclose all

Basic Examples  (3)

Determine if three points are collinear:

Find conditions for three abstract points to be collinear:

Find conditions for a triangle to be equilateral:

Find conditions for two lines to be perpendicular:

Scope  (7)

Find conditions for a predicate to hold for a geometric object:

Find conditions for multiple predicates to hold for a single object:

Some predicates require a parameter, here Circle[{c,d},r]:

Find conditions for one predicate to hold for multiple objects:

Find conditions for a relation to hold between geometric objects:

Combine predicates and relations:

Find conditions for two lists of objects to lie on opposite sides of a line:

Specify one object on each side:

Properties & Relations  (7)

Some properties optionally take parameters:

Specify the point of concurrency to be the origin:

GeometricTest determines whether a condition holds:

GeometricAssertion is a static representation of the condition, irrespective of its truth or falsehood:

Find conditions for a quadrilateral to be convex:

These conditions can be asserted in GeometricScene using GeometricAssertion:

The conditions can be extracted using the subvalue "AlgebraicFormulation":

These are the same conditions as were returned by GeometricTest:

An instance of a convex quadrilateral can be generated using RandomInstance:

CollinearPoints is similar to GeometricTest with the predicate "Collinear":

ConvexPolygonQ is similar to GeometricTest with the predicate "Convex":

PositivelyOrientedPoints is analogous to the predicate "Counterclockwise":

NegativelyOrientedPoints is is analogous to the predicate "Clockwise":

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_geometrictest, author="Wolfram Research", title="{GeometricTest}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/GeometricTest.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_geometrictest, organization={Wolfram Research}, title={GeometricTest}, year={2021}, url={https://reference.wolfram.com/language/ref/GeometricTest.html}, note=[Accessed: 21-December-2024 ]}