equal
deleted
inserted
replaced
70 mat.setPhong(0,float(ln[4]),float(ln[5]),float(ln[6])) |
70 mat.setPhong(0,float(ln[4]),float(ln[5]),float(ln[6])) |
71 mat.setTransmissivity(float(ln[7]),float(ln[8])) |
71 mat.setTransmissivity(float(ln[7]),float(ln[8])) |
72 elif ln[0] == 's': # Sphere |
72 elif ln[0] == 's': # Sphere |
73 center = (float(ln[1]), float(ln[2]), float(ln[3])) |
73 center = (float(ln[1]), float(ln[2]), float(ln[3])) |
74 radius = float(ln[4]) |
74 radius = float(ln[4]) |
75 rt.addShape(Sphere(centre=center, radius=radius, material=mat)) |
75 rt.addShape(Sphere(center=center, radius=radius, material=mat)) |
76 elif ln[0] == 'p': # Polygon |
76 elif ln[0] == 'p': # Polygon |
77 vertex_count = int(ln[1]) |
77 vertex_count = int(ln[1]) |
78 vertices = [] |
78 vertices = [] |
79 for i in range(vertex_count): |
79 for i in range(vertex_count): |
80 ln = f.readline().split() |
80 ln = f.readline().split() |