CMirror

class ipkiss3.all.CMirror

Mirror around point mirror_center (= 180 degree turn).

Parameters:
mirror_center: Coord2, optional

point mirror center, is incorporated in the default translation

mirror_plane_y: float, optional

y ordinate of x axis to mirror around

mirror_plane_x: float, optional

x abscissa of y axis to mirror around

magnification_center: Coord2, optional

magnification center, will be incorporated in the default translation

rotation_center: Coord2, optional

rotation center, will be incorporated in the default translation

absolute_rotation: optional
absolute_magnification: optional
v_mirror: optional
magnification: optional
rotation: optional
translation: optional

Examples

import ipkiss3.all as i3
import pylab as plt

sh = i3.Shape([(4.0, 2.0), (11.0, 3.0), (16.0, 9.0), (6.0, 6.0)])

sh2 = sh.transform_copy(i3.CMirror(mirror_center=(17.0, 10.0)))

plt.plot(sh.x_coords(), sh.y_coords(), 'bo-')
plt.plot(sh2.x_coords(), sh2.y_coords(), 'ro-')
plt.scatter(17.0, 10.0)
plt.show()
apply_to_coord(coord)

apply transformation to coordinate

reverse_on_coord(coord)

apply reverse transformation to coordinate

apply_to_array(coords)

apply transformation to numpy array

reverse_on_array(coords)

internal use: applies reverse transformation to a numpy array

apply_to_angle_deg(angle)

apply transformation to absolute angle (degrees)

reverse_on_angle_deg(angle)

apply reverse transformation to absolute angle (degrees)

is_identity()

returns True if the transformation does nothing