#8670: Provide projections methods for word paths
-----------------------------+----------------------------------------------
   Reporter:  slabbe         |       Owner:  slabbe    
       Type:  enhancement    |      Status:  needs_work
   Priority:  major          |   Milestone:  sage-4.6.2
  Component:  combinatorics  |    Keywords:            
     Author:                 |    Upstream:  N/A       
   Reviewer:                 |      Merged:            
Work_issues:                 |  
-----------------------------+----------------------------------------------
Changes (by tjolivet):

  * status:  needs_review => needs_work


Old description:

> Nice mathematical objects can be obtained when projecting appropriately a
> discrete path (Rauzy fractals for instance).
>
> This patch introduces 3 projection functions for word path. It also adds
> 1 function to `WordMorphism` and 2 matrix rotation functions to
> `sage/plot/plot3d/transforms.pyx`.
>
> The first 1000 points of the Rauzy fractal :
>
> {{{
>     sage: s = WordMorphism('1->12,2->13,3->1')
>     sage: D = s.fixed_point('1')
>     sage: v = s.pisot_vector()
>     sage: P = WordPaths('123',[(1,0,0),(0,1,0),(0,0,1)])
>     sage: w = P(D[:1000])
>     sage: w.projected_plot(v)
> }}}
>
> See more examples in doctests.

New description:

 Nice mathematical objects can be obtained when projecting appropriately a
 discrete path (Rauzy fractals for instance).

 This patch introduces 3 projection functions for word path. It also adds 1
 function to `WordMorphism` and 2 matrix rotation functions to
 `sage/plot/plot3d/transforms.pyx`.

 The first 1000 points of the Rauzy fractal :

 {{{
     sage: s = WordMorphism('1->12,2->13,3->1')
     sage: D = s.fixed_point('1')
     sage: v = s.pisot_vector()
     sage: P = WordPaths('123',[(1,0,0),(0,1,0),(0,0,1)])
     sage: w = P(D[:1000])
     sage: w.projected_plot(v)
 }}}
 See more examples in doctests.

--

Comment:

 Hi,

 Here are a few remarks:

 (1) There is a doctest failure:

   `File "/home/timo/sage-4.6.1/devel/sage-
 trac_8670/sage/plot/plot3d/transform.pyx", line 325:    sage:
 rotate_vector_on_axis(v, 0, ring=RealField(10)) * vExpected:    (5.5,
 0.0020, 0.0020, 0.00)Got:    (5.5, 0.00098, 0.00098, 0.00)`

 This should be fixed by using "`...`", and could be done for the other
 occurrences of printed floats.

 (2) I think that the rotations matrices should be in a file in
 sage/matrix/. I remember having looked for something like
 `rotate_arbitrary`, but I didn't find it because it was in plot3d/ and not
 in matrix/.

 (3) The documentation for `rotate_vector_on_axis` could be a little bit
 clearer (the description).

 Otherwise this is a nice and useful patch.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8670#comment:8>
Sage <http://www.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