#-*-coding:utf-8-*-
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
def readXYZfile(filename, Separator):
data = [[], [], []]
f = open(filename,'r')
line = f.readline()
num = 0
while line: #按行读入点云
c,d,e = line.split(Separator)
data[0].append(c) #X坐标
data[1].append(d) #Y坐标
data[2].append(e) #Z坐标
num = num + 1
line = f.readline()
f.close()
#string型转float型
x = [ float(data[0] ) for data[0] in data[0] ]
z = [ float(data[1] ) for data[1] in data[1] ]
y = [ float(data[2] ) for data[2] in data[2] ]
print("读入点的个数为:{}个。".format(num))
point = [x,y,z]
return point
#三维离散