绘制适当的角度圆弧

绘制适当的角度圆弧

我试图画一个圆弧来表示 y 轴和 r 线之间的角度,但似乎做不到。我的代码是

\documentclass[11pt,a4paper]{book}
\usepackage{kerkis}
%\usepackage{kmath}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{color}
%\usepackage[usenames,dvipsnames]{color}
\definecolor{Darkgreen}{rgb}{0,0.4,0}
\definecolor{Darkblue}{rgb}{0,0,0.4}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[gray,->] (-5,0) -- (5,0);
\draw[gray,->] (0,-5) -- (0,5);
\draw[gray,dashed] (-5,4) -- (5,4);
\node at (5,0.2) {$x$};
\node at (-0.2,5) {$y$};

\fill (0,0) circle (2pt) node[below] (e) {$m,e$};
\fill (-3,4) circle (2pt) node[above] (ion) {$ze$};

\draw[red] (0,0) -- (-3,4);
\draw[gray,->] (4,1.75) -- (4,0);
\draw[gray,->] (4,2.25) -- (4,4);
\node at (4,2) {$b$};
\draw[blue,->] (-3,4) -- (-1.5,4);
\node[blue] at (-1.8,4.2) {$V$};
\node[red] at (-2.7,3) {$r$};

\draw[Darkgreen,->] (0,0) -- (-1.5,2);
\draw[Darkgreen,->] (0,0) -- (0,2);
\draw[Darkgreen,->] (0,0) -- (-1.5,0);
\draw[Darkgreen,very thin,dashed] (0,2) -- (-1.5,2);
\draw[Darkgreen,very thin,dashed] (-1.5,0) -- (-1.5,2);

\node[Darkgreen] at (0.3,2) {$F_y$};
\node[Darkgreen] at (-1.5,-0.3) {$F_x$};
\node[Darkgreen,left] at (-1.7,2) {$F=\dfrac{kze^2}{r^2}$};
%\draw[Darkgreen] (0.5,0.5) arc (80:123:0.8cm);
\draw[Darkgreen] (1cm,0cm) arc (90:125:1cm);

\end{tikzpicture}
\end{document}

我的输出是

对此有什么想法吗?


答案1

首先,你不必colortikz之前那样加载xcolor。不过你必须按以下顺序放置这些东西:

\usepackage{tikz}
\definecolor{Darkgreen}{rgb}{0,0.4,0}
\definecolor{Darkblue}{rgb}{0,0,0.4}

话虽如此,为什么要手动计算角度呢?使用clip。首先画一个三角形(几乎是一个三角形)

\path[clip] (0,2) -- (0,0) -- (-3,4);

然后是一个圆圈:

\node[circle,draw=Darkgreen,minimum size=40pt] at (0,0) (circ) {};

代码:

\documentclass[11pt,a4paper]{book}
\usepackage{kerkis}
%\usepackage{kmath}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}
%\usepackage{color}
%\usepackage[usenames,dvipsnames]{color}
\usepackage{tikz}
\definecolor{Darkgreen}{rgb}{0,0.4,0}
\definecolor{Darkblue}{rgb}{0,0,0.4}

\begin{document}
\begin{tikzpicture}
\draw[gray,->] (-5,0) -- (5,0);
\draw[gray,->] (0,-5) -- (0,5);
\draw[gray,dashed] (-5,4) -- (5,4);
\node at (5,0.2) {$x$};
\node at (-0.2,5) {$y$};

\fill (0,0) circle (2pt) node[below] (e) {$m,e$};
\fill (-3,4) circle (2pt) node[above] (ion) {$ze$};

\draw[red] (0,0) -- (-3,4);
\draw[gray,->] (4,1.75) -- (4,0);
\draw[gray,->] (4,2.25) -- (4,4);
\node at (4,2) {$b$};
\draw[blue,->] (-3,4) -- (-1.5,4);
\node[blue] at (-1.8,4.2) {$V$};
\node[red] at (-2.7,3) {$r$};

\draw[Darkgreen,->] (0,0) -- (-1.5,2);
\draw[Darkgreen,->] (0,0) -- (0,2);
\draw[Darkgreen,->] (0,0) -- (-1.5,0);
\draw[Darkgreen,very thin,dashed] (0,2) -- (-1.5,2);
\draw[Darkgreen,very thin,dashed] (-1.5,0) -- (-1.5,2);

\node[color=Darkgreen] at (0.3,2) {$F_y$};
\node[Darkgreen] at (-1.5,-0.3) {$F_x$};
\node[Darkgreen,left] at (-1.7,2) {$F=\dfrac{kze^2}{r^2}$};
%% First clip 
\path[clip] (0,2) -- (0,0) -- (-3,4) -- cycle;
%%The circle 
\node[circle,draw=Darkgreen,minimum size=40pt] at (0,0) (circ) {};
%
%\draw[Darkgreen] (0.5,0.5) arc (80:123:0.8cm);
\draw[Darkgreen] (1cm,0cm) arc (90:125:1cm);

\end{tikzpicture}
\end{document}

在此处输入图片描述

答案2

第一个坐标确定弧的星。交换线

\draw[Darkgreen] (1cm,0cm) arc (90:125:1cm);

\draw[Darkgreen] (0,1) arc (90:125:1cm);

并且您的(不是 MWE)示例应该在所需的位置绘制圆弧(如果我抓住了圆弧应该在的位置)。

相关内容