Skip to content

tip_angles

tip_angles(V, F, use_small_angle_approx=True)

Computes the angles formed by each vertex within its respective face (the tip angle).

Parameters:

Name Type Description Default
V (n,d) numpy array

vertex list of a triangle mesh

required
F (m,3) numpy int array

face index list of a triangle mesh

required
use_small_angle_approx bool, optional (default

If True, uses a different, more more stable formula for small angles.

True

Returns:

Type Description

tip angles for each vertex referenced in F

Examples:

from gpytoolbox import regular_square_mesh, tip_angles
v, f = regular_square_mesh(10)
alpha = tip_angles(v,f)
Source code in src/gpytoolbox/tip_angles.py
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
def tip_angles(V, F,
    use_small_angle_approx=True):
    """Computes the angles formed by each vertex within its respective face
    (the tip angle).

    Parameters
    ----------
    V : (n,d) numpy array
        vertex list of a triangle mesh
    F : (m,3) numpy int array
        face index list of a triangle mesh
    use_small_angle_approx : bool, optional (default: True)
        If True, uses a different, more more stable formula for small angles.

    Returns
    -------
    α : (m,3) numpy array
        tip angles for each vertex referenced in `F`

    Examples
    --------
    ```python
    from gpytoolbox import regular_square_mesh, tip_angles
    v, f = regular_square_mesh(10)
    alpha = tip_angles(v,f)
    ```

    """

    l_sq = halfedge_lengths_squared(V,F)
    return tip_angles_intrinsic(l_sq,F,use_small_angle_approx)