Changeset 8065:2eb2fa701a7c


Ignore:
Timestamp:
01/16/08 09:15:30 (5 years ago)
Author:
William Stein <wstein@…>
Branch:
default
Message:

trac-1734 -- added another doctest for Texture.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sage/plot/plot3d/texture.py

    r8063 r8065  
    6363 
    6464class Texture_class(SageObject): 
    65      
     65    """ 
     66    We create a translucent texture: 
     67 
     68        sage: from sage.plot.plot3d.texture import Texture 
     69        sage: t = Texture(opacity=0.6) 
     70        sage: t 
     71        <class 'sage.plot.plot3d.texture.Texture_class'> 
     72        sage: t.opacity 
     73        0.600000000000000 
     74        sage: t.jmol_str('obj') 
     75        'color obj translucent 0.4 [102,102,255]' 
     76        sage: t.mtl_str() 
     77        'newmtl texture2\nKa 0.2 0.2 0.5\nKd 0.4 0.4 1.0\nKs 0.0 0.0 0.0\nillum 1\nNs 1\nd 0.600000000000000' 
     78        sage: t.tachyon_str() 
     79        'Texdef texture2\n  Ambient 0.333333333333 Diffuse 0.666666666667 Specular 0.0 Opacity 0.600000000000000\n   Color 0.4 0.4 1.0\n   TexFunc 0' 
     80        sage: t.x3d_str() 
     81        "<Appearance><Material diffuseColor='0.4 0.4 1.0' shininess='1' specularColor='0.0 0.0 0.0'/></Appearance>" 
     82    """ 
    6683    def __init__(self, id, color=(.4, .4, 1), opacity=1, ambient=0.5, diffuse=1, specular=0, shininess=1, **kwds): 
    6784        self.id = id 
Note: See TracChangeset for help on using the changeset viewer.