Yuto Horikawa
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- robots: noindex, nofollow lang: ja dir: ltr breaks: true slideOptions: theme: white transition: slide --- <style> .reveal, .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, "Microsoft JhengHei", Meiryo, sans-serif; } h1, h2, h3, h4, h5, h6 { text-transform: none !important; } .color-yellow{ color: yellow; } .alert { padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; text-align: left; padding: 10px 0; } .alert-info { color: #31708f; background-color: #d9edf7; border-color: #bce8f1; } .alert-success { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; } .alert-danger { color: #a94442; background-color: #f2dede; border-color: #ebccd1; } .reveal .slides span { text-align: left; display: inline-block; } p, li { font-size: 0.88em !important; } li>p { font-size: 1em !important; } </style> # JuliaTokai #10 (2021/05/15) ###### tags: `JuliaTokai` `prezentation` --- # Rotations.jlで学ぶ<br>3次元の回転 [堀川 由人, ほりたみゅ, @Hyrodium](https://hyrodium.github.io) ---- ### おしながき * 自己紹介 * 3次元の回転って? * Rotations.jlの紹介 * 面白い結果(a) $\operatorname{SO}(3)$の可視化 * 面白い結果(b) Thomson問題の拡張 * まとめ --- ## 自己紹介 幾何学がスキ! ![](https://hyrodium.github.io/assets/logo.png =300x) ![](https://media0.giphy.com/media/BWClhsM6ACc7QaPNDc/giphy.gif?cid=790b761199dc032c147fd3e0de271eb710c7d2a1b936172e&rid=giphy.gif&ct=g =300x) [堀川 由人, ほりたみゅ, @Hyrodium](https://hyrodium.github.io) * 過去の関連発表 * Rotations.jlとの関わり ---- ### 過去の関連発表 $\operatorname{SO}(3)$と$\operatorname{SU}(2)$の対応関係について話しました * [逆数の作図からCayley変換まで / 第1回日曜数学会](https://www.slideshare.net/yutohorikawa/cayley-57826500) ![](https://i.imgur.com/Je0Pm8K.png =x150) ![](https://i.imgur.com/mD7m3C4.png =x150) ![](https://i.imgur.com/xQ8nvQV.png =x150) * [Riemann球面に内接する直方体 / 第4回日曜数学会](https://www.slideshare.net/yutohorikawa/riemann-57827572) ![](https://i.imgur.com/mSLbPqn.png =x150) ![](https://i.imgur.com/W9Gku2d.png =x150) ![](https://i.imgur.com/XW6aBP0.png =x150) ---- ### Rotations.jlとの関わり 3次元回転をJuliaで扱うためのパッケージ * 1ヶ月前(2021/04/08)からcontribution開始 * PR 8つ (merged 3つ) * issue 7つ * 3次元回転を完全に理解したぞ! * 今日はその報告です --- ## 3次元の回転って? * そもそも回転とは * $\operatorname{SO}(3)$の性質 ①-⑥ ---- ### そもそも回転とは * 原点の位置を変えない合同変換 * (普通は)Eudlid空間での合同変換 * ただし鏡像は除く * 線形代数の言葉で言えば… * 直交行列による変換 ($R^{-1}=R^{\top}$となる行列) * ただし行列式は1 * 一般には$n$次の回転行列まで考えれる * $\operatorname{SO}(n)$と書く * Rotations.jlでは(基本的に)3次のみ扱う ---- ### $\operatorname{SO}(3)$の性質① 元の可視化 $\color{red}{x},\color{green}{y},\color{blue}{z}$軸の正規直交基底の"姿勢"が$\operatorname{SO}(3)$の元 ![](https://i.imgur.com/HIPjM9b.png =450x) ![](https://i.imgur.com/HUF1YaG.png =x100) ---- ### $\operatorname{SO}(3)$の性質② 空間の次元 * 与えられた姿勢への到達に、3回の座標軸回転が必要 * Euler角と呼ばれる (回転順序によって12種類存在) * $\color{blue}{z}\text{-}\color{red}{x}\text{-}\color{blue}{z}, \color{red}{x}\text{-}\color{green}{y}\text{-}\color{red}{x}, \color{green}{y}\text{-}\color{blue}{z}\text{-}\color{green}{y}, \color{blue}{z}\text{-}\color{green}{y}\text{-}\color{blue}{z}, \color{red}{x}\text{-}\color{blue}{z}\text{-}\color{red}{x}, \color{green}{y}\text{-}\color{red}{x}\text{-}\color{green}{y}$ 狭義Euler角 * $\color{red}{x}\text{-}\color{green}{y}\text{-}\color{blue}{z}, \color{green}{y}\text{-}\color{blue}{z}\text{-}\color{red}{x}, \color{blue}{z}\text{-}\color{red}{x}\text{-}\color{green}{y}, \color{red}{x}\text{-}\color{blue}{z}\text{-}\color{green}{y}, \color{blue}{z}\text{-}\color{green}{y}\text{-}\color{red}{x}, \color{green}{y}\text{-}\color{red}{x}\text{-}\color{blue}{z}$ Tait–Bryan角 * つまり$\operatorname{SO}(3)$は3次元の空間! $\dim(\operatorname{SO}(3))=3$ * より一般に$\dim(\operatorname{SO}(n))=n(n-1)/2$ ![](https://media1.giphy.com/media/P8hnZXBWvNcpBYUmNE/giphy.gif?cid=790b7611b23ea0d9b90d0c376d5794e5844af2aef3b1fcf5&rid=giphy.gif&ct=g =250x) ![](https://media0.giphy.com/media/gMUpeF3bfOs7j5aY04/giphy.gif?cid=790b7611617f153c1f101642bb5d31a4a423463df37ed36d&rid=giphy.gif&ct=g =250x)\ $\color{red}{x}\text{-}\color{green}{y}\text{-}\color{blue}{z}回転 / \color{red}{x}\text{-}\color{green}{y}\text{-}\color{red}{x}$回転 ---- ### $\operatorname{SO}(3)$の性質③ 行列表示 ![](https://i.imgur.com/HIPjM9b.png =x180) ![](https://i.imgur.com/HUF1YaG.png =x150) * 3次元なのにパラメータが9つあるように見える * $xy$平面上の円周$S^1$と同じ状況 * 行列表示すると過剰にパラメータが発生 * :arrow_up: 計算量 * :arrow_down: 計算精度 * 行列表示以外の"良い"パラメータが欲しい! ---- ### $\operatorname{SO}(3)$の性質④ 固有値と固有ベクトル * $R\in \operatorname{SO}(3)$の固有値は$\{1,e^{i\theta},e^{-i\theta}\}$で表示可能 * 固有値$1$に対応する固有ベクトルが回転軸 * $\theta$が回転角 * 任意の回転は「軸回りの回転」として表示可能! * 回転軸(2次元)+回転量(1次元)なのでちゃんと3次元 * [Rodriguesの回転公式](https://ja.wikipedia.org/wiki/%E3%83%AD%E3%83%89%E3%83%AA%E3%82%B2%E3%82%B9%E3%81%AE%E5%9B%9E%E8%BB%A2%E5%85%AC%E5%BC%8F) ![](https://media4.giphy.com/media/8Zz6CB6PkVkeyRE6kE/giphy.gif?cid=790b761191754df7698c0550a00c62f0008964a6845f84bd&rid=giphy.gif&ct=g =240x) ![](https://i.imgur.com/jf0nDyz.png =x240) ---- ### $\operatorname{SO}(3)$の性質⑤ 準同型な空間など この辺りから数学的に込み入ってきますが… * $\operatorname{SO}(3)$と$\operatorname{SU}(2)$は$1:2$に対応(準同型) * $\operatorname{SU}(2)$は$\det$が1のユニタリ行列全体 * (詳細は以前の発表スライド参照) * $\operatorname{SU}(2)$は「単位長さ四元数全体」と対応(同型) * つまり4つの実数で3次元の回転を表現可能 * パラメータ減ってハッピー!(9→4) * 「単位長さ四元数」は3次元球面$S^3$と対応(同相) * $S^3\subset\mathbb{R}^4$なので普通の球面ではない * 立体射影で$S^3\leftrightarrow\mathbb{R}^3\cup\{\infty\}$の対応(同相) * パラメータ減ってハッピー!(4→3) ---- ### $\operatorname{SO}(3)$の性質⑥ まとめ * $\operatorname{SO}(3)$は3次元Lie群! * 3次行列として表示可能 * しかし計算には都合が悪い * 良い感じのパラメータ(座標)が欲しい! * 直感的に理解しやすい * コンピュータが計算しやすい * 数学的なモチベーション → https://twitter.com/phykm/status/1388747029304672261 * 行列表示 / Euler角 / 軸回り回転 / 四元数 / $\mathbb{R}^3\cup\{\infty\}$ --- ## Rotations.jlの紹介 * Juliaで3次元回転を扱うためのパッケージ比較 * Rotations.jlで定義される型 * 使い方の例 ---- ### Juliaで3次元回転を扱うための<br>パッケージ比較 * [Rotations.jl](https://github.com/JuliaGeometry/Rotations.jl) * 回転は3次元行列 * 最新版`v1.0.2` * [ReferenceFrameRotations.jl](https://github.com/JuliaSpace/ReferenceFrameRotations.jl) * (まだ詳しく触ってないので何とも…) * 最新版`v0.5.7` ---- <!-- .slide: style="font-size: 30px;" --> ### Rotations.jlで定義されている型 * 行列表示 * `RotMatrix` * Euler角 * `RotX`, `RotY`, `RotZ` * `RotXY`, `RotYX`, `RotZY`, `RotYZ`, `RotXZ`, `RotZX` * `RotXYZ`, `RotXYX`, (他10種) * 軸回り回転 * `AngleAxis` * `RotationVec` * 四元数 * `UnitQuaternion` * $S^3$の立体射影 * `MRP` (Modified Rodrigues Parameters) * $S^3$の原点からの射影 * `RodriguesParam` `<: Rotation <: StaticMatrix <: AbstractMatrix` これらの他にも2次元回転の型もある ---- ### 使い方の例 ```julia= using Rotations # ランダムに回転行列を生成 (Haar測度) R_uq = rand(UnitQuaternion{Float64}) # 行列に変換 Matrix(R_uq) # 別のパラメータに変換 (MRP) R_mrp = MRP(R_uq) # 別のパラメータに変換 (Euler角) R_xyz = RotXYZ(R_uq) ``` このスライドのgifもRotations.jlで計算してます (レンダリングはPOV-Ray) --- ## 面白い結果(a) $\operatorname{SO}(3)$の可視化 `MRP`を使えば頑張れば$\operatorname{SO}(3)$を3次元球として描ける! * ① 可視化の概要 * ② 座標軸まわりの回転 * ③ 非可換性の可視化 * ④ $xy$回転曲面の可視化 * ⑤ ジンバルロック * ⑥ 有限部分群 ---- ### $\operatorname{SO}(3)$の可視化① `MRP`で可視化する! ![](https://media2.giphy.com/media/lSsUc96YbwPLOsSjOE/giphy.gif?cid=790b7611b0181c53504884200c283991728139cda5b7bfe2&rid=giphy.gif&ct=g =350x) ![](https://i.imgur.com/HIPjM9b.png =350x) 数学的に込み入ったことは抜きにして… 3次元球内の一点が、一つの姿勢($\operatorname{SO}(3)$の元)を表す! ---- ### $\operatorname{SO}(3)$の可視化②-x $x$軸回転 ![](https://media4.giphy.com/media/icJFrVwEFNNyN7JKlP/giphy.gif?cid=790b7611d74e9cb86466d218c100be524ab1a92101734922&rid=giphy.gif&ct=g) 原点が単位行列 ---- ### $\operatorname{SO}(3)$の可視化②-y $y$軸回転 ![](https://media2.giphy.com/media/sWSgE73h7GHvIhrAGo/giphy.gif?cid=790b76118dfc6a0b557324a7336f05baf1d7fcead95a8b5d&rid=giphy.gif&ct=g) 球面上の点がちょうど「180°回転」に相当する ---- ### $\operatorname{SO}(3)$の可視化②-z $z$軸回転 ![](https://media3.giphy.com/media/R7cZqkkimdIne1uhBG/giphy.gif?cid=790b7611be345994e975cf706e1696e65c5922260d1902aa&rid=giphy.gif&ct=g) * 一般に左図での「球面内の点と原点を結ぶ直線」は右図での「回転軸」に一致する * 逆元は原点対称の点 ---- ### $\operatorname{SO}(3)$の可視化③ $\operatorname{SO}(3)$の非可換性:$\color{magenta}{R_x(t)R_y(t)}$と$\color{cyan}{R_y(t)R_x(t)}$の比較 ![](https://media4.giphy.com/media/fjmvMyManZVb6b1FP9/giphy.gif?cid=790b761192273ed5c1a37387015f5cd4602f6ea127dc50cb&rid=giphy.gif&ct=g) MRP(左)の方が基底の図示(右)よりも把握しやすい ---- ### $\operatorname{SO}(3)$の可視化④ $\{R_x(s)R_y(t) \mid s,t\in\mathbb{R}\}$は群を成さないが… 曲面としては描画できる ![](https://media3.giphy.com/media/zHPoJ4UXjHJEkrQGIB/giphy.gif?cid=790b7611a3fdb81d2ecb4353590d9b0eb640dc6f3065b16b&rid=giphy.gif&ct=g =x350) ![](https://media1.giphy.com/media/Zxf1aKEoBuxCQqNkty/giphy.gif?cid=790b7611f6b31808980cb4e60de91783275a381ca289aa07&rid=giphy.gif&ct=g =x350) ---- ### $\operatorname{SO}(3)$の可視化⑤ [ジンバルロック](https://ja.wikipedia.org/wiki/%E3%82%B8%E3%83%B3%E3%83%90%E3%83%AB)(`RotXYX`) ![](https://media3.giphy.com/media/nvj1I9ztgHV3LPrefo/giphy.gif?cid=790b76114d1e1433c255c0aec69065664ae45a48b01573cd&rid=giphy.gif&ct=g =350x) $x$軸上でめっちゃ密 😷 → Jacobianがゼロ → Euler角は$\operatorname{SO}(3)$の全体座標に不適格 ---- ### $\operatorname{SO}(3)$の可視化⑥-4/4 $\operatorname{SO}(3)$の有限部分群と言えば…正多面体群! * 正4面体群の位数は12 * $\operatorname{SU}(2)$で考えれば24個←正24胞体の頂点に一致! ![](https://media3.giphy.com/media/f5mSX3OK0yH1aoT7fR/giphy.gif?cid=790b761141deee0f8a4e67cc588bf1c57ff434172c4d5fb3&rid=giphy.gif&ct=g =400x) ![](https://media3.giphy.com/media/3o6gaRVJG8FmmonsLC/giphy.gif?cid=790b76115df6dbbcab8dbe159135ae4aa4b56f969917461f&rid=giphy.gif&ct=g =400x) ---- ### $\operatorname{SO}(3)$の可視化⑥-6/8 * 正6面体群(=正8面体群)の位数は24 * $\operatorname{SU}(2)$で考えれば48個←正24胞体の頂点と胞中心に一致! ![](https://media0.giphy.com/media/RLfAyxWG9TJ2dtysdE/giphy.gif?cid=790b7611a29ab211462ffdbd3becd31ad402c3538fbaea78&rid=giphy.gif&ct=g =400x) ![](https://media3.giphy.com/media/xT0BKjGsKdlWBJe2C4/giphy.gif?cid=790b761192bc7487acf894a28fab3ba02760f1f3cc4dc0b8&rid=giphy.gif&ct=g =400x) ---- ### $\operatorname{SO}(3)$の可視化⑥-12/20 * 正12面体群(=正20面体群)の位数は60 * $\operatorname{SU}(2)$で考えれば120個←正600胞体の頂点に一致! ![](https://media4.giphy.com/media/ucfKbc8MeNHOvP4AbE/giphy.gif?cid=790b7611021d04f25095614e233b557744a3bb4119504f10&rid=giphy.gif&ct=g =400x) ![](https://media4.giphy.com/media/3o6gaTLI9ho5ADW86c/giphy.gif?cid=790b76119d768ecbf6c7702b345585533f66ef1bfb8f8945&rid=giphy.gif&ct=g =400x) --- ## 面白い結果(b) Thomson問題の拡張 * Thomson問題とは * $\operatorname{SO}(3)$への拡張 * 計算結果 ---- ### Thomson問題とは① 概要 > トムソン問題(トムソンもんだい、英: Thomson problem) は、静電エネルギーが最小になるよう単位球面上に N 個の電子を配置する問題である(電子間力はクーロンの法則に従うものとする)。 [Wikipedia](https://ja.wikipedia.org/wiki/%E3%83%88%E3%83%A0%E3%82%BD%E3%83%B3%E5%95%8F%E9%A1%8C)より ---- ### Thomson問題とは② 計算例 ![](https://media4.giphy.com/media/YTgjQYAXEcAjk8isE6/giphy.gif?cid=790b761175a3a5c6a6aad25c0e91bd3cf47fc3664be6d62f&rid=giphy.gif&ct=g =x150) ![](https://media4.giphy.com/media/VXeYgsxen7ngUqYyqs/giphy.gif?cid=790b7611bf0a9199788d469884fa2fb4ed24a9ec78ba3f2e&rid=giphy.gif&ct=g =x150) ![](https://media3.giphy.com/media/xwuBoAtHfKxVHREuWR/giphy.gif?cid=790b761151d0f45e3325de7d08bd809c7434984131dcde56&rid=giphy.gif&ct=g =x150) ![](https://media0.giphy.com/media/yLQ4JoFb9UdeVr9ka1/giphy.gif?cid=790b76114594a2b40ca2c9d3707ccae2716cadd659502341&rid=giphy.gif&ct=g =x150) ![](https://media2.giphy.com/media/LvbOSmXFDFn7COClaW/giphy.gif?cid=790b76117c78facde3277d3a1c99b9818148f8edb5e3eab5&rid=giphy.gif&ct=g =x150) * 4,6,8,12,20点で計算 * 4,6,12点の場合のみ、正多面体の頂点に一致 ---- ### $\operatorname{SO}(3)$への拡張 * そもそも$\operatorname{SO}(3)$にどうやって距離いれるの? * 2点間を結ぶ回転行列の回転角にしよう! * Lie代数$\mathfrak{so}(3)$に内積($\operatorname{SO}(3)$にRiemann計量)を入れて「最短曲線の長さ」を距離とすることと同じ * じゃあエネルギーは? * Thomson問題に倣って(1/距離)を2点間のエネルギーにしよう! ---- ### 計算結果 * 12,24,60点で正多面体群が出てくると期待されるが… * 正多面体群になるのは24,60点のみだった! <small/>(数値的に実験しただけで厳密に示した訳ではないです)</small> * スライドが間に合わなかったのでデモします… --- ## まとめ * 感想 * 今後の予定 * 参考文献など ---- ### 感想 * Rotations.jl便利! * いろんなパラメータ変換とか有り難い * 可視化にも便利 * コンストラクタのベストプラクティスが分からん… * コンストラクタで正規化するか否か ---- ### 今後の予定 * Rotations.jlのバグ修正 * 私が送ったPR早くレビューして欲しいな:pray::pray::pray: * もう少し真面目にThomson問題を解く * 微分方程式系として記述できそう * ちゃんと可視化もやる ---- ### 参考文献など * [Rotations.jl](https://github.com/JuliaGeometry/Rotations.jl) * Rotations.jlのリポジトリ * [逆数の作図からCayley変換まで / 第1回日曜数学会](https://www.slideshare.net/yutohorikawa/cayley-57826500) * 私の以前の発表 * [Riemann球面に内接する直方体 / 第4回日曜数学会](https://www.slideshare.net/yutohorikawa/riemann-57827572) * 私の以前の発表 * [EquallySpacedPointsOnSO3](https://github.com/hyrodium/EquallySpacedPointsOnSO3) * $\operatorname{SO}(3)$上でのThomson問題のリポジトリ * [VisualizeSO3](https://github.com/hyrodium/VisualizeSO3) * このスライドでの図を作ったときのリポジトリ * 他にも個人ブログ等で参考にしたのあったはず…:pray:

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully