#6543: [with patch, needs work] improve doctests for tachyon
----------------------------------------+-----------------------------------
 Reporter:  mhampton                    |       Owner:  mhampton                
        
     Type:  enhancement                 |      Status:  new                     
        
 Priority:  major                       |   Milestone:  sage-4.1.1              
        
Component:  graphics                    |    Keywords:  tachyon, graphics, 3d, 
raytracer
 Reviewer:  boothby, wstein, wcauchois  |      Author:                          
        
   Merged:                              |  
----------------------------------------+-----------------------------------

Comment(by mvngu):

 * There is no documentation for the function `smooth_triangle()`. Can you
 explain what that function does?
  * There is no docstring for the class `FractalLandscape`. The function
 `__init__()` seems to explain what that class does. But at the moment and
 with the version of Sphinx currently shipped with Sage, docstrings of
 functions starting with an underscore character don't show up in the
 generated reference manual.
  * There is no docstring for the class `TachyonSmoothTriangle`. A
 docstring for that class would be nice.
  * Can you comment out the class `TachyonPlot` instead of deleting it? It
 might not be used and incomplete. But someone might want to polish it up
 in the future.
  * And here is a list of typos found in the rebased patch:
  {{{
 diff -r b0afd5bab6d9 sage/plot/plot3d/tachyon.py
 --- a/sage/plot/plot3d/tachyon.py
 +++ b/sage/plot/plot3d/tachyon.py
 @@ -243,6 +243,7 @@
          which is just the scene string input to tachyon.

          EXAMPLES::
 +
              sage: q = Tachyon()
              sage: q.light((1,1,1), 1,(1,1,1))
              sage: q.texture('s')
 @@ -300,9 +301,10 @@

      def show(self, verbose=0, extra_opts=''):
          """
 -        Creates a png file of the scene.
 +        Creates a PNG file of the scene.

          EXAMPLES::
 +
              sage: q = Tachyon()
              sage: q.light((-1,-1,10), 1,(1,1,1))
              sage: q.texture('s')
 @@ -338,7 +340,7 @@
      def _camera(self):
          """
          An internal function that writes the tachyon string for the
 -        camera and other rendering information (raydepth, antialiasing).
 +        camera and other rendering information (ray depth, antialiasing).

          EXAMPLES::

 @@ -367,7 +369,8 @@
          """
          Returns the complete tachyon scene file as a string.

 -        EXAMPLES:
 +        EXAMPLES::
 +
              sage: t = Tachyon(xres=500,yres=500, camera_center=(2,0,0))
              sage: t.light((4,3,2), 0.2, (1,1,1))
              sage: t.texture('t2', ambient=0.1, diffuse=0.9, specular=0.5,
 opacity=1.0, color=(1,0,0))
 @@ -528,6 +531,7 @@
          center, radius, and texture.

          EXAMPLES::
 +
              sage: t = Tachyon()
              sage: t.texture('sphere_texture')
              sage: t.sphere((1,2,3), .1, 'sphere_texture')
 @@ -551,7 +555,7 @@

      def cylinder(self, center, axis, radius, texture):
          """
 -        Creates the scene information for a infinite cylinder with the
 +        Creates the scene information for an infinite cylinder with the
          given center, axis direction, radius, and texture.

          EXAMPLES::
 @@ -1138,7 +1142,7 @@

      def str(self):
          """
 -        Returns the scene string of the axis-aligned box..
 +        Returns the scene string of the axis-aligned box.

          EXAMPLES::
  }}}
  * I got the following 16 warnings when building the reference manual. All
 of these warnings relate to the modifications made by the rebased patch.
 There shouldn't be any warnings at all when building the reference manual.
  {{{
 WARNING: /scratch/mvngu/sandbox-1/sage-4.1.1.rc2/local/lib/python2.6/site-
 packages/sage/plot/plot3d/tachyon.py:docstring of
 sage.plot.plot3d.tachyon.Axis_aligned_box.str:9: (WARNING/2) Literal block
 ends without a blank line; unexpected unindent.
 WARNING: /scratch/mvngu/sandbox-1/sage-4.1.1.rc2/local/lib/python2.6/site-
 packages/sage/plot/plot3d/tachyon.py:docstring of
 sage.plot.plot3d.tachyon.Cylinder.str:10: (WARNING/2) Literal block ends
 without a blank line; unexpected unindent.
 WARNING: /scratch/mvngu/sandbox-1/sage-4.1.1.rc2/local/lib/python2.6/site-
 packages/sage/plot/plot3d/tachyon.py:docstring of
 sage.plot.plot3d.tachyon.FCylinder.str:9: (WARNING/2) Literal block ends
 without a blank line; unexpected unindent.
 WARNING: /scratch/mvngu/sandbox-1/sage-4.1.1.rc2/local/lib/python2.6/site-
 packages/sage/plot/plot3d/tachyon.py:docstring of
 sage.plot.plot3d.tachyon.FractalLandscape.str:9: (WARNING/2) Literal block
 ends without a blank line; unexpected unindent.
 WARNING: /scratch/mvngu/sandbox-1/sage-4.1.1.rc2/local/lib/python2.6/site-
 packages/sage/plot/plot3d/tachyon.py:docstring of
 sage.plot.plot3d.tachyon.Plane.str:9: (WARNING/2) Literal block ends
 without a blank line; unexpected unindent.
 WARNING: /scratch/mvngu/sandbox-1/sage-4.1.1.rc2/local/lib/python2.6/site-
 packages/sage/plot/plot3d/tachyon.py:docstring of
 sage.plot.plot3d.tachyon.Ring.str:9: (WARNING/2) Literal block ends
 without a blank line; unexpected unindent.
 WARNING: /scratch/mvngu/sandbox-1/sage-4.1.1.rc2/local/lib/python2.6/site-
 packages/sage/plot/plot3d/tachyon.py:docstring of
 sage.plot.plot3d.tachyon.Sphere.str:11: (WARNING/2) Literal block ends
 without a blank line; unexpected unindent.
 WARNING: /scratch/mvngu/sandbox-1/sage-4.1.1.rc2/local/lib/python2.6/site-
 packages/sage/plot/plot3d/tachyon.py:docstring of
 sage.plot.plot3d.tachyon.Tachyon.light:8: (WARNING/2) Block quote ends
 without a blank line; unexpected unindent.
 WARNING: /scratch/mvngu/sandbox-1/sage-4.1.1.rc2/local/lib/python2.6/site-
 packages/sage/plot/plot3d/tachyon.py:docstring of
 sage.plot.plot3d.tachyon.Tachyon.sphere:11: (WARNING/2) Literal block ends
 without a blank line; unexpected unindent.
 WARNING: /scratch/mvngu/sandbox-1/sage-4.1.1.rc2/local/lib/python2.6/site-
 packages/sage/plot/plot3d/tachyon.py:docstring of
 sage.plot.plot3d.tachyon.TachyonSmoothTriangle.str:9: (WARNING/2) Literal
 block ends without a blank line; unexpected unindent.
 WARNING: /scratch/mvngu/sandbox-1/sage-4.1.1.rc2/local/lib/python2.6/site-
 packages/sage/plot/plot3d/tachyon.py:docstring of
 sage.plot.plot3d.tachyon.TachyonSmoothTriangle.str:11: (WARNING/2)
 Definition list ends without a blank line; unexpected unindent.
 WARNING: /scratch/mvngu/sandbox-1/sage-4.1.1.rc2/local/lib/python2.6/site-
 packages/sage/plot/plot3d/tachyon.py:docstring of
 sage.plot.plot3d.tachyon.TachyonTriangle.str:9: (WARNING/2) Literal block
 ends without a blank line; unexpected unindent.
 WARNING: /scratch/mvngu/sandbox-1/sage-4.1.1.rc2/local/lib/python2.6/site-
 packages/sage/plot/plot3d/tachyon.py:docstring of
 sage.plot.plot3d.tachyon.TachyonTriangle.str:11: (WARNING/2) Definition
 list ends without a blank line; unexpected unindent.
 WARNING: /scratch/mvngu/sandbox-1/sage-4.1.1.rc2/local/lib/python2.6/site-
 packages/sage/plot/plot3d/tachyon.py:docstring of
 sage.plot.plot3d.tachyon.TachyonTriangleFactory.smooth_triangle:12:
 (WARNING/2) Literal block ends without a blank line; unexpected unindent.
 WARNING: /scratch/mvngu/sandbox-1/sage-4.1.1.rc2/local/lib/python2.6/site-
 packages/sage/plot/plot3d/tachyon.py:docstring of
 sage.plot.plot3d.tachyon.TachyonTriangleFactory.triangle:12: (WARNING/2)
 Literal block ends without a blank line; unexpected unindent.
 WARNING: /scratch/mvngu/sandbox-1/sage-4.1.1.rc2/local/lib/python2.6/site-
 packages/sage/plot/plot3d/tachyon.py:docstring of
 sage.plot.plot3d.tachyon.TachyonTriangleFactory.triangle:14: (WARNING/2)
 Definition list ends without a blank line; unexpected unindent.
  }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6543#comment:5>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to