From: Bruce S. <Bru...@nc...> - 2011-10-14 22:49:37
|
You're right, that 4th argument for FacetedTriangle isn't used and can be deleted. Or, if you want to call FacetedTriangle with both vertex locations and color specfications, you could revise the routine like this: def FacetedTriangle(self, v1, v2, v3, c1, c2, c3): self.vertices.append(pos=v1, color=c1) self.vertices.append(pos=v2, color=c2) self.vertices.append(pos=v3, color=c3) Then you would say self.FacetedTriangle(v1, v2, v3, c1, c2, c3). Bruce Sherwood On Fri, Oct 14, 2011 at 3:07 PM, Poul Riis <Pou...@sk...> wrote: > > Here is a small section of the original faces_heightfield example: > class Model: > def __init__(self): > self.frame = frame() > self.model = faces(frame=self.frame, color=color.cyan) > self.vertices = [] > def FacetedTriangle(self, v1, v2, v3, color=color.white): > """Add a triangle to the model""" > for v in (v1,v2,v3): > self.vertices.append(v) > I cannot see why the color=color.white is there - it seems to have no > effect!? Replacing white with red doesn't change anything. > Rather, I would like to input something like c1,c2,c3 (three colors for the > vertices) in the FacetedTriangle. But how exactly? > I regret that I'm such a poor programmer but it could be a great help if > someone would implement this change in faces_heightfield. > Poul Riis |