Opened 9 months ago

Closed 8 months ago

#30321 closed enhancement (fixed)

Improve tikz picture methods of Polyhedron

Reported by: jipilab Owned by:
Priority: major Milestone: sage-9.2
Component: geometry Keywords: polytope, tikz
Cc: gh-kliem, gh-LaisRast Merged in:
Authors: Jean-Philippe Labbé Reviewers: Jonathan Kliem
Report Upstream: N/A Work issues:
Branch: c25f1e3 (Commits, GitHub, GitLab) Commit: c25f1e3e607e505b6d26fe19214c0184dc00ec7e
Dependencies: Stopgaps:

Status badges

Description

This ticket provides a wrapper of the tikz method of projections of polyhedron to polyhedron directly. Along the way, we clean-up a bit the code and add how to reproduce the picture inside of the output:

sage: co = polytopes.cuboctahedron()
sage: Img = co.tikz([0,0,1], 0)
sage: print('\n'.join(Img.splitlines()[:9]))
\begin{tikzpicture}%
    [x={(1.000000cm, 0.000000cm)},
    y={(0.000000cm, 1.000000cm)},
    z={(0.000000cm, 0.000000cm)},
    scale=1.000000,
    back/.style={loosely dotted, thin},
    edge/.style={color=blue!95!black, thick},
    facet/.style={fill=blue!95!black,fill opacity=0.800000},
    vertex/.style={inner sep=1pt,circle,draw=green!25!black,fill=green!75!black,thick}]
sage: print('\n'.join(Img.splitlines()[12:21]))
%% with the command: ._tikz_3d_in_3d and parameters:
%% view = [0, 0, 1]
%% angle = 0
%% scale = 1
%% edge_color = blue!95!black
%% facet_color = blue!95!black
%% opacity = 0.8
%% vertex_color = green
%% axis = False

Change History (7)

comment:1 Changed 9 months ago by jipilab

  • Status changed from new to needs_review

comment:2 Changed 8 months ago by gh-kliem

You are missing the quickref for polyhedra, aren't you?

comment:3 Changed 8 months ago by gh-kliem

  • Reviewers set to Jonathan Kliem

Can you please add the method to polyhedra quickref.

comment:4 Changed 8 months ago by jipilab

  • Branch changed from u/jipilab/improve_tikz to u/jipilab/improve_tikz2
  • Commit changed from c7faefe3d6199cdf8f99b9084944be5e52e05203 to c25f1e3e607e505b6d26fe19214c0184dc00ec7e

New commits:

c25f1e3Improvements in tikz method

comment:5 Changed 8 months ago by jipilab

I added the method in the visualization tutorial.

comment:6 Changed 8 months ago by gh-kliem

  • Status changed from needs_review to positive_review

I see. Not even plot is in the quickref, because there is a seperate visualization tutorial.

LGTM.

comment:7 Changed 8 months ago by vbraun

  • Branch changed from u/jipilab/improve_tikz2 to c25f1e3e607e505b6d26fe19214c0184dc00ec7e
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.