symfem.geometry

Geometry.

Module Contents

Functions

_is_close(→ bool)

Check if a Sympy expression is close to an int.

parse_set_of_points_input(→ SetOfPoints)

Convert an input set of points to the correct format.

parse_point_input(→ PointType)

Convert an input point to the correct format.

_vsub(→ PointType)

Subtract.

_vdot(→ sympy.core.expr.Expr)

Compute dot product.

point_in_interval(→ bool)

Check if a point is inside an interval.

point_in_triangle(→ bool)

Check if a point is inside a triangle.

point_in_quadrilateral(→ bool)

Check if a point is inside a quadrilateral.

point_in_tetrahedron(→ bool)

Check if a point is inside a tetrahedron.

Attributes

PointType

SetOfPoints

PointTypeInput

SetOfPointsInput

symfem.geometry.PointType
symfem.geometry.SetOfPoints
symfem.geometry.PointTypeInput
symfem.geometry.SetOfPointsInput
symfem.geometry._is_close(a: sympy.core.expr.Expr, b: int) bool

Check if a Sympy expression is close to an int.

Parameters:
  • a – A Sympy expression

  • b – An integer

Returns:

Is the sympy expression close to the integer?

symfem.geometry.parse_set_of_points_input(points: SetOfPointsInput) SetOfPoints

Convert an input set of points to the correct format.

Parameters:

points – A set of points in some input format

Returns:

A set of points

symfem.geometry.parse_point_input(point: PointTypeInput) PointType

Convert an input point to the correct format.

Parameters:

point – A point in some input fotmat

Returns:

A point

symfem.geometry._vsub(v: PointType, w: PointType) PointType

Subtract.

Parameters:
  • v – A vector

  • w – A vector

Returns:

The vector v - w

symfem.geometry._vdot(v: PointType, w: PointType) sympy.core.expr.Expr

Compute dot product.

Parameters:
  • v – A vector

  • w – A vector

Returns:

The dot product of v and w

symfem.geometry.point_in_interval(point: PointType, interval: SetOfPoints) bool

Check if a point is inside an interval.

Parameters:
  • point – The point

  • interval – The vertices of the interval

Returns:

Is the point inside the interval?

symfem.geometry.point_in_triangle(point: PointType, triangle: SetOfPoints) bool

Check if a point is inside a triangle.

Parameters:
  • point – The point

  • traingle – The vertices of the triangle

Returns:

Is the point inside the triangle?

symfem.geometry.point_in_quadrilateral(point: PointType, quad: SetOfPoints) bool

Check if a point is inside a quadrilateral.

Parameters:
  • point – The point

  • traingle – The vertices of the quadrilateral

Returns:

Is the point inside the quadrilateral?

symfem.geometry.point_in_tetrahedron(point: PointType, tetrahedron: SetOfPoints) bool

Check if a point is inside a tetrahedron.

Parameters:
  • point – The point

  • traingle – The vertices of the tetrahedron

Returns:

Is the point inside the tetrahedron?