# HG changeset patch
# User Math 480 Student
# Date 1331268459 28800
# Node ID ccafba4090f86a7eab7ea982dc55655814038a07
# Parent  c239be1054e01526a1b0b62da6691061b9dd5587
Documentation patch for Ticket 8393

diff --git a/sage/plot/plot3d/plot3d.py b/sage/plot/plot3d/plot3d.py
--- a/sage/plot/plot3d/plot3d.py
+++ b/sage/plot/plot3d/plot3d.py
@@ -562,8 +562,81 @@
 
 class TrivialTriangleFactory:
     def triangle(self, a, b, c, color = None):
+        r"""
+        This function returns a list of the a,b,c inputs representing the corners
+        of a triangle.
+
+        INPUT:
+
+         - ``a,b,c`` - triples (x,y,z) of integers used by TrianglePlot to represent corners
+           of a triangle in 3d-space.
+         
+         - ``color`` - (default:None) string denoting color type.
+
+        OUTPUT:
+    
+        list -- contains list of the triples a,b,c
+
+        EXAMPLES:
+
+        This example illustrates what happens to the data submitted to the triangle function.
+
+        sage: from sage.plot.plot3d import plot3d
+        sage: y=plot3d.TrivialTriangleFactory()
+        sage: r=y.triangle([1,1,1],[1,2,4],[3,-3,2], color='purple')
+        sage: r
+        [[1,1,1],[1,2,4],[3,-3,2]]
+
+        NOTES:
+    
+        This class may be superfluous since TrianglePlot implents
+        similar classes and definitions for tracking its triangles.
+
+        AUTHORS:
+
+        - Matthew Wiebe (2012-03-03)
+        """
         return [a,b,c]
+
     def smooth_triangle(self, a, b, c, da, db, dc, color = None):
+        r"""
+        This function returns a list of the a,b,c inputs representing the corners
+        of a triangle.
+
+        INPUT:
+
+        - ``a,b,c`` - triples (x,y,z) of integers used by TrianglePlot
+          to represent corners of a triangle in 3d-space.
+
+        - ``da,db,dc`` - triples (dx,dy,dz) of integers used by TrianglePlot
+          to represent the normals of a triangle in 3d-space.
+        
+         - ``color`` - (default:None) A string denoting color type.
+
+        OUTPUT:
+
+        list -- contains list of the triples a,b,c
+
+        EXAMPLES:
+
+        This example illustrates what happens to the data submitted to the smooth_triangle function.
+        
+        sage: from sage.plot.plot3d import plot3d
+        sage: y=plot3d.TrivialTriangleFactory()
+        sage: r=y.smooth_triangle([1,1,1],[1,2,4],[3,-3,2],[0,1,0],[2,1,0],[0,1,1] color='black')
+        sage: r
+        [[1,1,1],[1,2,4],[3,-3,2]]
+        
+        NOTES: 
+        This class has similar functionality to the triangle function and
+        is also superfluous because TrianglePlot already implements a smooth
+        triangle function.
+
+
+        AUTHORS:
+
+        - Matthew Wiebe (2012-03-03)
+        """
         return [a,b,c]
 
 import parametric_plot3d
@@ -975,8 +1048,46 @@
     return plot3d(f, urange, vrange, transformation=Cylindrical('radius', ['azimuth', 'height']), **kwds)
 
 def axes(scale=1, radius=None, **kwds):
+    r"""
+    This function adds a x, y and z axis arrow pointing in one direction along the axis
+    centered at (0,0,0) to a 3d plot.
+
+    INPUT:
+
+    - ``scale`` - rational (default:1) defines the length of the arrows. 
+
+    - ``radius`` - rational (default:None) defines the thickness of the arrows.
+
+    - ``**kwds`` - standard graphics parameters.
+
+    OUPUT:
+
+    Graphics3dGroup -- this defines three arrows, one for each axis, that extend from the origin
+        in the magnitude and direction of scale.
+
+    EXAMPLES:
+
+    This example illustrates how to apply axes to a plot.
+    
+    sage: from sage.plot.plot3d import axes
+    sage: def f(x,y):
+    sage:    return math.sin(y*x)
+    sage: p=plot3d(f,(-3,3),(-3,3), adaptive=True, color=['purple','gold'])
+    sage: S=p + axes(3,3, color='black')
+    sage: S.show()
+
+    NOTES:
+        
+    The scale can be negative and the arrows will point in the negative direction for
+    each axis. Also if radius is not given, the radius is one hundredth of scale.
+
+    AUTHORS:
+
+    -Matthew Wiebe (2012-03-03)
+    """
     if radius is None:
         radius = scale/100.0
     return Graphics3dGroup([arrow3d((0,0,0),(scale,0,0), radius, **kwds), 
                             arrow3d((0,0,0),(0,scale,0), radius, **kwds), 
                             arrow3d((0,0,0),(0,0,scale), radius, **kwds)])
+
