Well, your Triad class also doesn't work with show(). So, there is no 
difference in behavior as such between your Triangle and Triad. Your Triad 
is working when combined with other graphics objects.

You can see what "show" implements by running

sage: show??

You will notice that it executes the ".show()" method if it exists. So, all 
you have to do is implement the ".show()" method. Since the graphics class 
has it implemented properly, all you need to do is call the one in the 
graphics class. So, your Triangle class (for example) can have this 
additional method:

class Triangle():
    def __init__(self, points, edgeColor='black', faceColor='white'):
        self.f1 = polygon3d(points, color=faceColor)
        self.l123 = line3d(points, thickness=10, color=edgeColor)
       
    def plot3d(self):
        return self.f1 + self.l123
        
    def show(self, *args, **kwds):
        return self.plot3d().show(*args, **kwds)


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to