coords.Coords.flare#

Coords.flare(xf, f, dir=(0, 2), end=0, exp=1.0)#

Create a flare at the end of a Coords block.

A flare is a local change of geometry (widening, narrowing) at the end of a structure.

Parameters#

xf: float

Length over which the local change occurs, measured along dir[0].

f: float

Maximum amplitude of the flare, in the direction dir[1].

dir: tuple of two ints (0,1,2)

Two axis designations. The first axis defines the direction along which the flare decays. The second is the direction of the coordinate modification.

end: 0 or 1

With end=0, the flare exists at the end with the smallest coordinates in dir[0]] direction; with end=1, at the end with the highest coordinates.

exp: float

Exponent setting the speed of decay of the flare. The default makes the flare change linearly over the length f.

Returns#

Coords

A Coords with same shape as the input, but having a localized change of coordinates at one end of the point set.

Examples#

>>> Coords(np.arange(6).reshape(-1,1)).flare(3., 1.6, dir=(0,1), end=0)
Coords([[0.    , 1.6   , 0.    ],
        [1.    , 1.0667, 0.    ],
        [2.    , 0.5333, 0.    ],
        [3.    , 0.    , 0.    ],
        [4.    , 0.    , 0.    ],
        [5.    , 0.    , 0.    ]])