#27690 closed enhancement (fixed)

unicode art for knots

Reported by: chapoton Owned by:
Priority: major Milestone: sage-8.8
Component: algebraic topology Keywords:
Cc: mmarco Merged in:
Authors: Frédéric Chapoton Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: a2963ae (Commits) Commit: a2963aef5d77d21909ea93582c3c2b5c2c53d91f
Dependencies: Stopgaps:

Description (last modified by chapoton)

plus a way to build a knot from a signed Gauss code

An example of unicode art:

sage: W = Knots()
sage: unicode_art(W.from_table(8,10))
   ╭─────╮ 
   │    ╭─╮
   │╭────╯│
  ╭─│╮  │ │
 ╭─╯││  │ │
 │╰─╯│  │ │
 │   ╰─╮│ │
 │    ╭─╯ │
╭│─────╯  │
│╰────╯   │
╰─────────╯

Change History (10)

comment:1 Changed 13 months ago by chapoton

  • Branch set to u/chapoton/27690
  • Commit set to 3cc430c83bdc50e3abc629800c7adacae8847dbf
  • Description modified (diff)
  • Status changed from new to needs_review

New commits:

3cc430cunicode art for knots

comment:2 Changed 13 months ago by chapoton

  • Description modified (diff)

comment:3 Changed 13 months ago by git

  • Commit changed from 3cc430c83bdc50e3abc629800c7adacae8847dbf to 77c79bf3866c869115cf7403f3ad130b95a7457e

Branch pushed to git repo; I updated commit sha1. New commits:

77c79bftrac 27690 some details (sort)

comment:4 Changed 13 months ago by git

  • Commit changed from 77c79bf3866c869115cf7403f3ad130b95a7457e to a2963aef5d77d21909ea93582c3c2b5c2c53d91f

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

a2963aeunicode art for knots

comment:5 Changed 13 months ago by chapoton

  • Cc mmarco added

comment:6 Changed 13 months ago by mmarco

This looks like a very interesting addition. But I will be on holidays until next week, so can't review it until then.

comment:7 Changed 13 months ago by tscrim

This is impressive. I would argue this looks a little better than its plot:

sage: B = BraidGroup(5)
sage: K = Knot(B([-1,2,3,3,-2,1,1,1,2,-3,4,2,1,3]))
sage: unicode_art(K)
 ╭────────────────╮ 
 │╭────────────────╮
 ││╭─────────╮    ││
 │││   ╭──────╮   ││
 │╰│───│╮    ││   ││
 │ ╰╮  ││    ││   ││
 │  │╭╮││    ││   ││
 │  ││╰╯│    ││   ││
 │  ││  ╰──╮ ││   ││
 │  ││    ╭─╮││   ││
 │  ╰│─────╯│││   ││
 │   ╰───╮│ │││   ││
 │       ││ ││╰──╮││
 │       ││ ││  ╭─╯│
 │       ││ ││ ╭─╯ │
 │       ││ ╰───╯  │
 │       ╰│──╯ │   │
╭─────────╯    │   │
│╰─────────────╯   │
╰──────────────────╯

One question, would it be possible to make this work for links as well?

comment:8 Changed 13 months ago by chapoton

I will not do much more work on this. It may be doable for links, but I will not do that.

comment:9 Changed 13 months ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

I confirmed that this does not work OOTB for links. This is good with me. Thanks.

comment:10 Changed 13 months ago by vbraun

  • Branch changed from u/chapoton/27690 to a2963aef5d77d21909ea93582c3c2b5c2c53d91f
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.