>>> from punt2DTG import Punt2DTG >>> from punt2D import Punt2D >>> import math >>> t1 = Punt2DTG(1, 4) >>> t1.translacio(4, 5) >>> print(t1) Punt2D(5.0, 9.0) >>> t1.translacio(2.2, 2.1) >>> print(t1) Punt2D(7.2, 11.1) >>> t1 = Punt2DTG(1, 4) >>> t1.escalat(Punt2D(0, 0), 1.5) >>> print(t1) Punt2D(1.5, 6.0) >>> p1 = Punt2DTG(3, 0) >>> c1 = Punt2DTG(1, 1) >>> p1.rotacio(c1, math.pi) >>> print(p1) Punt2D(-1.0, 2.0) --fi-enunciat >>> t1 = Punt2DTG(23, 8) >>> t1.translacio(3.4, 10) >>> print(t1) Punt2D(26.4, 18.0) >>> t1 = Punt2DTG(1, 4) >>> t1.escalat(t1.copia(), 3) >>> print(t1) Punt2D(1.0, 4.0) >>> t2 = Punt2DTG(-2, 5) >>> t2.escalat(Punt2D(0, 0), 4) >>> print(t2) Punt2D(-8.0, 20.0) >>> p2 = Punt2DTG(1, 1) >>> p2.rotacio(Punt2D(0, 0), math.pi/2) >>> print(p2) Punt2D(-1.0, 1.0) >>> p3 = Punt2DTG(2, -3) >>> c3 = Punt2DTG(-1, -2) >>> p3.rotacio(c3, 1.5) >>> print(p3) Punt2D(0.2, 0.9)