
答案1
您可以使用 TikZ 來製作圖片。您可以scale
將其調整為所需的尺寸。請參閱下面的程式碼。
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=1.0]
\draw [thick] rectangle (1,1);
\draw [thick] (0,1) -- (1,0);
\draw [thick] (0,1) .. controls (1,2) and (2,1) .. (1,0);
\end{tikzpicture}
\end{document}
答案2
另一個 TikZ 範例:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\newcommand*{\OutAngle}{60}
\newcommand*{\ArcMax}{1.2}
\draw
(0, 0) rectangle (1, 1)
(0, 1) to[out=\OutAngle, in=135]
(\ArcMax, \ArcMax) to[out=-45, in=90-\OutAngle]
(1, 0) -- cycle
;
\end{tikzpicture}
\end{document}
頂部的出射角度可以透過巨集配置\OutAngle
。圓弧距原點的最大距離可以透過宏指定\ArcMax
,並用作X和y最遠點的座標。
答案3
Pstricks
也很容易產生好的結果:
\documentclass[border=3pt, x11names]{standalone}
\usepackage{pst-poly, pst-eucl, pstricks-add}
\usepackage{auto-pst-pdf}
\begin{document}
\psset{unit = 2cm, dimen = m}
\begin{pspicture*}
\providecommand{\PstPolygonNode}{%
\psdots[dotstyle = o, dotsize=4pt, linecolor=LightSteelBlue3, fillstyle=solid, fillcolor=LightSteelBlue3](1;\INode)}
\PstSquare[PolyName=A]
\uput[ul](A2){A} \uput[ur](A1){B}
\uput[dr](A4){C} \uput[dl](A3){D}
\ncline[nodesep=2pt]{A2}{A4}
\pnode[0.25,0.25](A0){O}
\pstArcOAB[linecolor=LightSteelBlue3]{O}{A4}{A2}
\end{pspicture*}
\end{document}
答案4
梅塔普斯特提供另一種選擇;這裡我已經使用了lualatex
,但如果你還沒有使用,luamplib
你可以使用 plain代替。mpost
lualatex
我展示了四種不同的方法來獲得頂點之間的曲線。
\documentclass[border=5mm]{standalone}
\usepackage{luamplib}
\begin{document}
\begin{mplibcode}
beginfig(1);
u := 3cm;
path B; B = unitsquare scaled u;
draw B;
draw point 3 of B -- point 1 of B;
draw point 3 of B .. controls (u,2u) and (2u,u) .. point 1 of B withcolor .6 red;
draw point 3 of B .. controls point 2 of B .. point 1 of B withcolor .6 blue;
draw point 3 of B {dir 60} .. point 1 of B withcolor .6 green;
draw point 3 of B {dir -20} .. point 1 of B dashed withdots;
endfig;
\end{mplibcode}
\end{document}