>>> %pylab inline Populating the interactive namespace from numpy and matplotlib
Nội dung chính ShowShow
- âm mưu đa giác
- buildgv []¶
- Các lớp Geomview
- Geomvect class¶
- geomomase¶
- điểm trong
- âm mưu hộp
- Các chức năng tiện ích¶
- góc cạnh
- DPTSEG [P, PT, PH] ¶
- sự biểu lộ
- Ptonseg [PTA, PHE, PT] ¶
- giao nhau¶
- Các chức năng hữu ích
File "", line 2 Populating the interactive namespace from numpy and matplotlib ^ SyntaxError: invalid syntax
>>> from pylayers.util.geomutil import * >>> from pylayers.util.plotutil import * >>> import matplotlib.pyplot as plt >>> import shapely.geometry as shg
Geomutil là một mô -đun tập hợp các chức năng hình học khác nhau được sử dụng trong các mô -đun của trụ khác. is a module which gathers different geometrical functions used in other module of pylayers. is a module which gathers different geometrical functions used in other module of pylayers.
Lớp này thực hiện biểu đồ tầm nhìn, của một đa giác.
Lớp đa giác là một lớp con của lớp đa giác hình dạng. Nó cho phép khởi tạo một đa giác với các đối tượng khác nhau [list, np.array, sh.multipoint]
>>> points = shg.MultiPoint[[[0, 0], [1, 1], [2, 0], [1, 0],[0,-2]]] >>> poly1 = Polygon[points] >>> poly2 = Polygon[p=[[3,4,4,3],[1,1,2,2]]] >>> N = 7 >>> phi = np.linspace[0,2*np.pi,N] >>> x = 3*np.cos[phi]+5 >>> y = 3*np.sin[phi]+5 >>> nppoints = np.vstack[[x,y]] >>> poly3 = Polygon[nppoints]
âm mưu đa giác
>>> fig = plt.figure[] >>> ax = fig.gca[] >>> plt.axis['off'] >>> plt.axis['equal'] >>> fig,ax=poly1.plot[color='green',fig=fig,ax=ax] >>> fig,ax=poly2.plot[color='red',fig=fig,ax=ax] >>> fig,ax=poly3.plot[color='#000000',fig=fig,ax=ax]
buildgv []¶
Các lớp Geomview
Geomvect class¶
geomomase¶điểm trong
Geomvect class¶
geomomase¶
geomomase¶
điểm trong
>>> v1 = np.array[[1,0,0]] >>> v2 = np.array[[0,1,0]] >>> v3 = np.array[[0,0,1]] >>> M = np.vstack[[v1,v2,v3]] >>> gv = GeomVect['test'] >>> gv.geomBase[M] >>> #gv.show3[]
điểm trong
âm mưu hộp
>>> gv1 = GeomVect['test1'] >>> gv1.points[np.random.rand[3,10]] >>> #gv1.show3[]
Các chức năng tiện ích¶
>>> geo = Geomoff['test2'] >>> pt = poly3.ndarray[].T >>> pt1 = np.hstack[[pt,np.zeros[[7,1]]]]
góc cạnh
File "", line 2 Populating the interactive namespace from numpy and matplotlib ^ SyntaxError: invalid syntax0
File "", line 2 Populating the interactive namespace from numpy and matplotlib ^ SyntaxError: invalid syntax1
File "", line 2 Populating the interactive namespace from numpy and matplotlib ^ SyntaxError: invalid syntax2
File "", line 2 Populating the interactive namespace from numpy and matplotlib ^ SyntaxError: invalid syntax3
File "", line 2 Populating the interactive namespace from numpy and matplotlib ^ SyntaxError: invalid syntax4
âm mưu hộp
File "", line 2 Populating the interactive namespace from numpy and matplotlib ^ SyntaxError: invalid syntax5
Các chức năng tiện ích¶
góc cạnh
DPTSEG [P, PT, PH] ¶
File "", line 2 Populating the interactive namespace from numpy and matplotlib ^ SyntaxError: invalid syntax6
File "", line 2 Populating the interactive namespace from numpy and matplotlib ^ SyntaxError: invalid syntax7
sự biểu lộ
File "", line 2 Populating the interactive namespace from numpy and matplotlib ^ SyntaxError: invalid syntax8
DPTSEG [P, PT, PH] ¶
sự biểu lộ
Ptonseg [PTA, PHE, PT] ¶sự biểu lộ
>>> from pylayers.util.geomutil import * >>> from pylayers.util.plotutil import * >>> import matplotlib.pyplot as plt >>> import shapely.geometry as shg2
Ptonseg [PTA, PHE, PT] ¶
giao nhau¶
>>> from pylayers.util.geomutil import * >>> from pylayers.util.plotutil import * >>> import matplotlib.pyplot as plt >>> import shapely.geometry as shg3
>>> from pylayers.util.geomutil import * >>> from pylayers.util.plotutil import * >>> import matplotlib.pyplot as plt >>> import shapely.geometry as shg4
Các chức năng hữu ích
>>> from pylayers.util.geomutil import * >>> from pylayers.util.plotutil import * >>> import matplotlib.pyplot as plt >>> import shapely.geometry as shg5
>>> from pylayers.util.geomutil import * >>> from pylayers.util.plotutil import * >>> import matplotlib.pyplot as plt >>> import shapely.geometry as shg6
giao nhau¶
Các chức năng hữu ích
>>> from pylayers.util.geomutil import * >>> from pylayers.util.plotutil import * >>> import matplotlib.pyplot as plt >>> import shapely.geometry as shg7
>>> from pylayers.util.geomutil import * >>> from pylayers.util.plotutil import * >>> import matplotlib.pyplot as plt >>> import shapely.geometry as shg8
>>> from pylayers.util.geomutil import * >>> from pylayers.util.plotutil import * >>> import matplotlib.pyplot as plt >>> import shapely.geometry as shg9
>>> points = shg.MultiPoint[[[0, 0], [1, 1], [2, 0], [1, 0],[0,-2]]] >>> poly1 = Polygon[points] >>> poly2 = Polygon[p=[[3,4,4,3],[1,1,2,2]]] >>> N = 7 >>> phi = np.linspace[0,2*np.pi,N] >>> x = 3*np.cos[phi]+5 >>> y = 3*np.sin[phi]+5 >>> nppoints = np.vstack[[x,y]] >>> poly3 = Polygon[nppoints]0
>>> from pylayers.util.geomutil import * >>> from pylayers.util.plotutil import * >>> import matplotlib.pyplot as plt >>> import shapely.geometry as shg8
>>> points = shg.MultiPoint[[[0, 0], [1, 1], [2, 0], [1, 0],[0,-2]]] >>> poly1 = Polygon[points] >>> poly2 = Polygon[p=[[3,4,4,3],[1,1,2,2]]] >>> N = 7 >>> phi = np.linspace[0,2*np.pi,N] >>> x = 3*np.cos[phi]+5 >>> y = 3*np.sin[phi]+5 >>> nppoints = np.vstack[[x,y]] >>> poly3 = Polygon[nppoints]2
>>> points = shg.MultiPoint[[[0, 0], [1, 1], [2, 0], [1, 0],[0,-2]]] >>> poly1 = Polygon[points] >>> poly2 = Polygon[p=[[3,4,4,3],[1,1,2,2]]] >>> N = 7 >>> phi = np.linspace[0,2*np.pi,N] >>> x = 3*np.cos[phi]+5 >>> y = 3*np.sin[phi]+5 >>> nppoints = np.vstack[[x,y]] >>> poly3 = Polygon[nppoints]3
>>> points = shg.MultiPoint[[[0, 0], [1, 1], [2, 0], [1, 0],[0,-2]]] >>> poly1 = Polygon[points] >>> poly2 = Polygon[p=[[3,4,4,3],[1,1,2,2]]] >>> N = 7 >>> phi = np.linspace[0,2*np.pi,N] >>> x = 3*np.cos[phi]+5 >>> y = 3*np.sin[phi]+5 >>> nppoints = np.vstack[[x,y]] >>> poly3 = Polygon[nppoints]4