#15547: Fix the creation of tikzpictures of projections of polytopes
-------------------------------------+-------------------------------------
Reporter: jipilab | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.3
Component: geometry | Resolution:
Keywords: tikz, projection | Merged in:
Authors: jipilab | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jipilab/ticket15547 | 26045b67c8afb164dc00ee510b1f33a8f97105f0
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by jipilab):
* status: needs_work => needs_review
Old description:
> Right now, the tikz method for the projection of a 2d polytope in 3d
> relies on the dimension of the projection and not the dimension of the
> actual polytope. This is incompatible with the way that the tikz method
> works in this case. Moreover, the drawing of back-edges of 3d-polytopes
> (in 3d) is broken.
>
> The first error can be reproduced:
>
> {{{
> sage: P = Polyhedron(vertices=[[1,0,0],[0,1,0],[0,0,1]])
> sage: P.ambient_dim()
> 3
> sage: P.dim()
> 2
> sage: PProj = P.projection()
> sage: PProj.polyhedron_ambient_dim
> 3
> sage: PProj.dimension
> 3
> }}}
>
> To fix the issue, I believe one should add an attribute "polyhedron_dim"
> to the projection to know what the dimension of the polyhedron actually
> is. Something like:
>
> {{{
> sage: PProj.polyhedron_dim
> 2
> }}}
>
> Then the tikz method will use this attribute to decide which algorithm to
> apply.
>
> The second problem is an indexing issue in the creation of potential back
> edges. There is a trivial fix to that.
New description:
Right now, the tikz method for the projection of a 2d polytope in 3d
relies on the dimension of the projection and not the dimension of the
actual polytope. This is incompatible with the way that the tikz method
works in this case. Moreover, the drawing of back-edges of 3d-polytopes
(in 3d) is broken.
The first error can be reproduced:
{{{
sage: P = Polyhedron(vertices=[[1,0,0],[0,1,0],[0,0,1]])
sage: P.ambient_dim()
3
sage: P.dim()
2
sage: PProj = P.projection()
sage: PProj.polyhedron_ambient_dim
3
sage: PProj.dimension
3
}}}
To fix the issue, I believe one should add an attribute "polyhedron_dim"
to the projection to know what the dimension of the polyhedron actually
is. Something like:
{{{
sage: PProj.polyhedron_dim
2
}}}
Then the tikz method will use this attribute to decide which algorithm to
apply.
The second problem is an indexing issue in the creation of potential back
edges. There is a trivial fix to that.
The doc of _init_from_2d and _init_from_3d should also mention that it is
possible to have lower dimensional polytopes.
--
--
Ticket URL: <http://trac.sagemath.org/ticket/15547#comment:11>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.