Point

class dolfin.cpp.mesh.Point(*args)

Bases: object

A Point represents a point in \(\mathbb{R}^3\) with coordinates \(x, y, z,\) or alternatively, a vector in \(\mathbb{R}^3\), supporting standard operations like the norm, distances, scalar and vector products etc.

Overloaded versions

  • Point(x=0.0, y=0.0, z=0.0)

    Create a point at (x, y, z). Default value (0, 0, 0).

    Arguments
    x (float)

    The x-coordinate.

    y (float)

    The y-coordinate.

    z (float)

    The z-coordinate.

  • Point(dim, x)

    Create point from array

    Arguments
    dim (int)

    Dimension of the array.

    x (float)

    The array to create a Point from.

  • Point(x)

    Create point from Array

    Arguments
    x (Array<double>)

    Array of coordinates.

  • Point(p)

    Copy constructor

    Arguments
    p (Point)

    The object to be copied.

coordinates()

Overloaded versions

  • coordinates()

    Return coordinate array

    Returns
    list of doubles

    The coordinates.

  • coordinates()

    Return coordinate array (const. version)

    Returns
    list of doubles

    The coordinates.

cross()

Compute cross product with given vector

Arguments
p (Point)
Another point.
Returns
Point
The cross product.
distance()

Compute distance to given point

Arguments
p (Point)
The point to compute distance to.
Returns
float
The distance.
Example

Note

No example code available for this function.

dot()

Compute dot product with given vector

Arguments
p (Point)
Another point.
Returns
float
The dot product.
Example

Note

No example code available for this function.

norm()

Compute norm of point representing a vector from the origin

Returns
float
The (Euclidean) norm of the vector from the origin to the point.
Example

Note

No example code available for this function.

rotate()

Rotate around a given axis

Arguments
a (Point)
The axis to rotate around. Must be unit length.
theta (_double_)
The rotation angle.
Returns
Point
The rotated point.
squared_distance()

Compute squared distance to given point

Arguments
p (Point)
The point to compute distance to.
Returns
float
The squared distance.
Example

Note

No example code available for this function.

squared_norm()

Compute norm of point representing a vector from the origin

Returns
float
The squared (Euclidean) norm of the vector from the origin of the point.
Example

Note

No example code available for this function.

str()

Return informal string representation (pretty-print)

Arguments
verbose (bool)
Flag to turn on additional output.
Returns
str
An informal representation of the function space.
thisown

The membership flag

x()

Return x-coordinate

Returns
float
The x-coordinate.
y()

Return y-coordinate

Returns
float
The y-coordinate.
z()

Return z-coordinate

Returns
float
The z-coordinate.