Package sage :: Package plot :: Package plot3d :: Module texture :: Class Texture_class
[hide private]
[frames] | no frames]

Class Texture_class

source code

                      object --+    
                               |    
structure.sage_object.SageObject --+
                                   |
                                  Texture_class


    We create a translucent texture:

        sage: from sage.plot.plot3d.texture import Texture
        sage: t = Texture(opacity=0.6)
        sage: t
        <class 'sage.plot.plot3d.texture.Texture_class'>
        sage: t.opacity
        0.600000000000000
        sage: t.jmol_str('obj')
        'color obj translucent 0.4 [102,102,255]'
        sage: t.mtl_str()
        'newmtl texture2
Ka 0.2 0.2 0.5
Kd 0.4 0.4 1.0
Ks 0.0 0.0 0.0
illum 1
Ns 1
d 0.600000000000000'
        sage: t.tachyon_str()
        'Texdef texture2
  Ambient 0.333333333333 Diffuse 0.666666666667 Specular 0.0 Opacity 0.600000000000000
   Color 0.4 0.4 1.0
   TexFunc 0'
        sage: t.x3d_str()
        "<Appearance><Material diffuseColor='0.4 0.4 1.0' shininess='1' specularColor='0.0 0.0 0.0'/></Appearance>"
    



Instance Methods [hide private]
 
__init__(self, id, color=(0.4, 0.4, 1), opacity=1, ambient=0.5, diffuse=1, specular=0, shininess=1, **kwds)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
tachyon_str(self) source code
 
x3d_str(self) source code
 
mtl_str(self) source code
 
jmol_str(self, obj)
EXAMPLES: ...
source code

Inherited from structure.sage_object.SageObject: __hash__, __new__, __repr__, _axiom_, _axiom_init_, _gap_, _gap_init_, _gp_, _gp_init_, _interface_, _interface_init_, _interface_is_cached_, _kash_, _kash_init_, _macaulay2_, _macaulay2_init_, _magma_, _magma_init_, _maple_, _maple_init_, _mathematica_, _mathematica_init_, _maxima_, _maxima_init_, _octave_, _octave_init_, _pari_, _pari_init_, _r_init_, _sage_, _singular_, _singular_init_, category, db, dump, dumps, plot, rename, reset_name, save, version

Inherited from object: __delattr__, __getattribute__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, id, color=(0.4, 0.4, 1), opacity=1, ambient=0.5, diffuse=1, specular=0, shininess=1, **kwds)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

jmol_str(self, obj)

source code 

EXAMPLES: 
    sage: sum([dodecahedron(center=[2.5*x, 0, 0], color=(1, 0, 0, x/10)) for x in range(11)]).show(aspect_ratio=[1,1,1], frame=False, zoom=2)