Ticket #12395: 12395.patch

File 12395.patch, 4.4 KB (added by roed, 8 years ago)
  • sage/plot/plot3d/parametric_surface.pyx

    # HG changeset patch
    # User David Roe <roed@math.harvard.edu>
    # Date 1328173350 28800
    # Node ID 1e46dd355bbf5054f81aa28713e70af2116a9f4a
    # Parent  0949955ce010317822ec2b8b4462d742730d364d
    #12395: Adds ... to some texture variables in 3d plotting.
    
    diff --git a/sage/plot/plot3d/parametric_surface.pyx b/sage/plot/plot3d/parametric_surface.pyx
    a b  
    178178            sage: P = plot3d(x^2-y^2, (x, -2, 2), (y, -2, 2))
    179179            sage: s = P.tachyon_repr(P.default_render_params())
    180180            sage: s[:2]
    181             ['TRI V0 -2 -2 0 V1 -2 -1.89744 0.399737 V2 -1.89744 -1.89744 0', 'texture229']
     181            ['TRI V0 -2 -2 0 V1 -2 -1.89744 0.399737 V2 -1.89744 -1.89744 0', 'texture...']
    182182        """
    183183        self.triangulate(render_params)
    184184        return IndexFaceSet.tachyon_repr(self, render_params)
     
    194194            sage: P = plot3d(x^2-y^2, (x, -2, 2), (y, -2, 2))
    195195            sage: s = P.obj_repr(P.default_render_params())
    196196            sage: s[:2]+s[2][:3]+s[3][:3]
    197             ['g obj_1', 'usemtl texture230', 'v -2 -2 0', 'v -2 -1.89744 0.399737', 'v -2 -1.79487 0.778435', 'f 1 2 42 41', 'f 2 3 43 42', 'f 3 4 44 43']
     197            ['g obj_1', 'usemtl texture...', 'v -2 -2 0', 'v -2 -1.89744 0.399737', 'v -2 -1.79487 0.778435', 'f 1 2 42 41', 'f 2 3 43 42', 'f 3 4 44 43']
    198198        """
    199199        self.triangulate(render_params)
    200200        return IndexFaceSet.obj_repr(self, render_params)
  • sage/plot/plot3d/shapes2.py

    diff --git a/sage/plot/plot3d/shapes2.py b/sage/plot/plot3d/shapes2.py
    a b  
    704704
    705705            sage: P = point3d((1,2,3),size=3,color='purple')
    706706            sage: P.tachyon_repr(P.default_render_params())
    707             'Sphere center 1.0 2.0 3.0 Rad 0.015 texture139'
     707            'Sphere center 1.0 2.0 3.0 Rad 0.015 texture...'
    708708        """
    709709        transform = render_params.transform
    710710        if transform is None:
     
    721721
    722722            sage: P = point3d((1,2,3),size=3,color='purple')
    723723            sage: P.obj_repr(P.default_render_params())[0][0:2]
    724             ['g obj_1', 'usemtl texture141']
     724            ['g obj_1', 'usemtl texture...']
    725725        """
    726726        T = render_params.transform
    727727        if T is None:
     
    829829
    830830            sage: L = line3d([(cos(i),sin(i),i^2) for i in srange(0,10,.01)],color='red')
    831831            sage: L.tachyon_repr(L.default_render_params())[0]
    832             'FCylinder base 1.0 0.0 0.0 apex 0.999950000417 0.00999983333417 0.0001 rad 0.005 texture181'
     832            'FCylinder base 1.0 0.0 0.0 apex 0.999950000417 0.00999983333417 0.0001 rad 0.005 texture...'
    833833        """
    834834        T = render_params.transform
    835835        cmds = []
  • sage/plot/plot3d/texture.py

    diff --git a/sage/plot/plot3d/texture.py b/sage/plot/plot3d/texture.py
    a b  
    242242        sage: t.jmol_str('obj')
    243243        'color obj translucent 0.4 [102,102,255]'
    244244        sage: t.mtl_str()
    245         'newmtl texture44\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'
     245        'newmtl texture...\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'
    246246        sage: t.x3d_str()
    247247        "<Appearance><Material diffuseColor='0.4 0.4 1.0' shininess='1' specularColor='0.0 0.0 0.0'/></Appearance>"
    248248    """
     
    324324            sage: from sage.plot.plot3d.texture import Texture
    325325            sage: t = Texture(opacity=0.6)
    326326            sage: t.tachyon_str()
    327             'Texdef texture49\n  Ambient 0.333333333333 Diffuse 0.666666666667 Specular 0.0 Opacity 0.600000000000000\n   Color 0.4 0.4 1.0\n   TexFunc 0'
     327            'Texdef texture...\n  Ambient 0.333333333333 Diffuse 0.666666666667 Specular 0.0 Opacity 0.600000000000000\n   Color 0.4 0.4 1.0\n   TexFunc 0'
    328328        """
    329329        total_color = float(sum(self.ambient) + sum(self.diffuse) + sum(self.specular))
    330330        if total_color == 0:
     
    361361            sage: from sage.plot.plot3d.texture import Texture
    362362            sage: t = Texture(opacity=0.6)
    363363            sage: t.mtl_str()
    364             'newmtl texture23\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'
     364            'newmtl texture...\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'
    365365        """
    366366        return "\n".join(["newmtl %s" % self.id,
    367367                   "Ka %s %s %s" % self.ambient,