• $R$, the field of real numbers,

• $C$, the field of complex numbers, and

• $GF (2)$, a field that consists of 0 and 1. Problem 1.4.5: Show that, for any two distinct points z1 and z2, • there is a translation that maps z1 to z2, • there is a translation that maps z2 to z1, and • there is no translation that both maps z1 to z2 and z2 to z1. Sol: 一二從加減法就可得到,三從假設一二皆存在可推出悖論。


In [ ]:
from plotting import plot
S = {2 + 2j,3 + 2j,1.75 + 1j,2 + 1j,2.25 + 1j,2.5+1j,2.75+1j,3+1j,3.25+1j}
#plot(S)
#plot({1+2j+z for z in S}, 4)

Problem 1.4.6: Draw a diagram representing the complex number z0 = −3 + 3i using two arrows with their tails located at different points.


In [ ]:
a = -3+3j
b = 1+2j
c = -4+1j
plot([a,b,c+c])#看不太出效果...思考如何改進

Task 1.4.8 畫出旋轉90度並縮短1/2的所有向量的S,請用簡便的乘$/frac{1/2}$


In [ ]:
from plotting import plot
S = {2 + 2j,3 + 2j,1.75 + 1j,2 + 1j,2.25 + 1j,2.5+1j,2.75+1j,3+1j,3.25+1j}
S1 = [x*0.5j for x in S]
plot(S1)

同1.4.9 畫出再位移上1右二


In [1]:
from plotting import plot
S = {2 + 2j,3 + 2j,1.75 + 1j,2 + 1j,2.25 + 1j,2.5+1j,2.75+1j,3+1j,3.25+1j}
S1 = [x*0.5j for x in S]
S2 = [x+2-1j for x in S1]
plot(S2)

1.4.10


In [3]:
from image import file2image
from image import image2display
from plotting import plot
img = file2image("img01.png")
#image2display(img)
width = len(img[0])
height = len(img)
lt = []
[[lt.append(x+(187*1j-y*1j)) for x in range(width) if sum(img[y][x])<360]for y in range(height)]
plot(lt,188)

1.4.11


In [4]:
from plotting import plot
def f(pt_c):
    return pt_c.imag + pt_c.real*1j
S = {2 + 2j,3 + 2j,1.75 + 1j,2 + 1j,2.25 + 1j,2.5+1j,2.75+1j,3+1j,3.25+1j}
S1 = [f(x) for x in S]
plot(S1)

In [5]:
from image import file2image
from image import image2display
from plotting import plot
img = file2image("img01.png")
#image2display(img)
width = len(img[0])
height = len(img)
lt = []
[[lt.append(x+(187*1j-y*1j)) for x in range(width) if sum(img[y][x])<360]for y in range(height)]
def f(pt_c):
    return pt_c.imag + pt_c.real*1j
lt1  = [f(x) for x in lt]
plot(lt1,188)

In [10]:
#Euler's formular?
#1.4.17
from math import pi, e
from plotting import plot
n = 20
pts = [e**(x*2*pi*1j/n) for x in range(n)]
plot(pts)

In [11]:
#1.4.18
from plotting import plot
from math import pi, e
def f(pt_c):
    return pt_c*e**(pi/4*1j)
S = {2 + 2j,3 + 2j,1.75 + 1j,2 + 1j,2.25 + 1j,2.5+1j,2.75+1j,3+1j,3.25+1j}
S1 = [f(x) for x in S]
plot(S1)

In [15]:
from image import file2image
from image import image2display
from plotting import plot
from math import pi, e
img = file2image("img01.png")
#image2display(img)
width = len(img[0])
height = len(img)
lt = []
[[lt.append(x+(187*1j-y*1j)) for x in range(width) if sum(img[y][x])<360]for y in range(height)]
def f(pt_c):
    return pt_c*e**(pi/4*1j)
lt1  = [f(x) for x in lt]
plot(lt1,188)

In [19]:
#1.4.20
from image import file2image
from image import image2display
from plotting import plot
from math import pi, e
img = file2image("img01.png")
#image2display(img)
width = len(img[0])
height = len(img)
lt = []
[[lt.append((x+(187*1j-y*1j))) for x in range(width) if sum(img[y][x])<360]for y in range(height)]
def f(pt_c):
    return pt_c*e**(pi/4*1j)-99*1j
lt1  = [f(x) for x in lt]
plot(lt1,188)

The text about GF(2) is not so clear, so I need to check it out later.


In [ ]: