Coordinates

Coordinates in IPKISS can be specified in the 2D and 3D cartesian coordinate system with the help of:

class ipkiss3.all.Coord2(*args)

2-D coordinate

Parameters
Coord2tuple2 of float

(x,y) of the coordinates.

transform(transformation)

Apply a transformation to the coordinate

Parameters
transformationtransformation

Transformation(s) that are applied to the coordinate.

transform_copy(transformation)

Returns a transformed copy of the coordinate.

Parameters
transformationtransformation

Transformation(s) that are applied to the coordinate.

Returns
Coord2

Transformed coordinate.

move(position)

Move the coordinate by a displacement vector

Parameters
positiontuple2 of float

Displacement vector by which the coordinate is moved.

Returns
Coord2

Transformed coordinate.

move_copy(position)

Return a moved copy of the coordinate by a displacement vector.

Parameters
positiontuple2 of float

Displacement vector by which the coordinate is moved.

Returns
Coord2

Copy of the moved coordinate.

modified_copy(**override_args)

Create a copy and override the properties given as keyword arguments.

snap_to_grid(grids_per_unit=None)

Snap the coordinate to the given or current grid

Parameters
grids_per_unitfloat

number of grid points per unit. Imported from settings if not specified

distance(other)

Returns the distance to other coordinate.

Parameters
otherCoord2

Other coordinate to which the distance is calculated.

Returns
float

distance between the coordinate object and the other coordinate

angle_deg(other=(0.0, 0.0))

The angle of the coordinate with with other as origin in degrees.

Parameters
otherCoord2

Origin for which the angle in degrees is calculated. default = (0,0) .

Returns
float

Angle in degrees the coordinate with basis other.

angle_rad(other=(0.0, 0.0))

The angle of the coordinate with with other as origin in radians.

Parameters
otherCoord2

Origin for which the angle in degrees is calculated. default = (0,0) .

Returns
float

Angle in radians the coordinate with basis other.

dot(other)

Returns the complex dot (scalar) product of the coordinate with ‘other’.

Parameters
otherCoord2

Complex coordinate with which the complex dot (scalar) is calulated.

Returns
complex float

dot (scalar) product between the coordinate and ‘other’.

id_string()

identification string

Returns
string

identification string

convert_to_array()

returns [x,y]

Returns
array of float

[x,y] where x and y are the coordinates.

class ipkiss3.all.Coord3(*args)

3-D coordinate

Parameters
Coord3tuple3 of float

(x,y,z) of the coordinates.

transform(transformation)

Apply a transformation to the coordinate

Parameters
transformationtransformation

Transformation(s) that are applied to the coordinate.

transform_copy(transformation)

Returns a transformed copy of the coordinate.

Parameters
transformationtransformation

Transformation(s) that are applied to the coordinate.

Returns
Coord2

Transformed coordinate.

move(position)

Move the coordinate by a displacement vector

Parameters
positiontuple3 of float

Displacement vector by which the coordinate is moved.

Returns
Coord3

Transformed coordinate.

move_copy(position)

Return a moved copy of the coordinate by a displacement vector.

Parameters
positiontuple3 of float

Displacement vector by which the coordinate is moved.

Returns
Coord3

Copy of the moved coordinate.

modified_copy(**override_args)

Create a copy and override the properties given as keyword arguments.

snap_to_grid(grids_per_unit=None)

Snap the coordinate to the given or current grid

Parameters
grids_per_unitfloat

number of grid points per unit. Imported from settings if not specified

distance(other)

Returns the distance to other coordinate.

Parameters
otherCoord3

Other coordinate to which the distance is calculated.

Returns
float

distance between the coordinate object and the other coordinate

dot(other)

Returns the complex dot (scalar) product of the coordinate with ‘other’.

Parameters
otherCoord3

Complex coordinate with which the complex dot (scalar) is calulated.

Returns
complex float

dot (scalar) product between the coordinate and ‘other’.

See also

cross

vectorial product.

cross(other)

Returns the complex cross (vectorial) product of the coordinate with other.

Parameters
otherCoord3

Complex coordinate with which the complex cross (vectorial) is calulated.

Returns
Coord3

cross (vectorial) product between the coordinate and ‘other’.

See also

dot

scalar product.

id_string()

identification string

Returns
string

identification string

convert_to_array()

returns [x,y,z]

Returns
array of float

[x,y,z] where x and y and z are the coordinates.