Re: 3d surface plot animation
Bruce Sherwood <[email protected]>
| Newsgroups | gmane.comp.python.visualpython.user |
|---|---|
| Message-ID | <CAFDG03jUOLfe6G2+8Oi0wOEw5FYewSU4oys6_rPC-iJt9qNP=A@mail.gmail.com> |
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 <Poul.Riis-pIBpe43/vk1knbxzx/[email protected]> 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
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct