tikzpicture(從 geogebra 導入)的圓弧從正確位置移動

tikzpicture(從 geogebra 導入)的圓弧從正確位置移動

我正在嘗試將地理繪圖匯出到乳膠。

在此輸入影像描述

這會產生以下乳膠代碼:

\documentclass[10pt]{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\begin{axis}[
x=1.0cm,y=1.0cm,
axis lines=middle,
ymajorgrids=true,
xmajorgrids=true,
xmin=-1.0,
xmax=6.0,
ymin=-2.0,
ymax=6.0,
xtick={-1.0,0.0,...,6.0},
ytick={-2.0,-1.0,...,6.0},]
\clip(-1.,-2.) rectangle (6.,6.);
\draw [shift={(0.,0.)},line width=0.4pt]  plot[domain=0.:1.5707963267948966,variable=\t]({1.*5.*cos(\t r)+0.*5.*sin(\t r)},{0.*5.*cos(\t r)+1.*5.*sin(\t r)});
\draw [->,line width=0.4pt] (0.,0.) -- (4.419539299244726,2.3383054510545525);
\draw [line width=0.4pt] (4.419539299244726,-2.) -- (4.419539299244726,6.);
\draw [line width=0.4pt,domain=-1.:6.] plot(\x,{(--2.3383054510545525-0.*\x)/1.});
\draw [->,line width=0.4pt] (0.,0.) -- (4.419539299244726,0.);
\draw [->,line width=0.4pt] (0.,0.) -- (0.,2.3383054510545525);
\begin{scriptsize}
\draw [fill=black] (0.,0.) circle (2.0pt);
\draw[color=black] (0.11187609988355163,0.2529556851151442) node {$B$};
\draw [fill=black] (5.,0.) circle (2.5pt);
\draw[color=black] (5.111535372228054,0.2832566480422628) node {$C$};
\draw [fill=black] (0.,5.) circle (2.5pt);
\draw[color=black] (0.11187609988355163,5.282915531016838) node {$D$};
\draw[color=black] (3.6570890384551076,3.7678673846609056) node {$c$};
\draw [fill=black] (4.419539299244726,2.3383054510545525) circle (2.5pt);
\draw[color=black] (4.520666549132794,2.6164307934303976) node {$A$};
\draw[color=black] (2.2177931873256296,1.3437903504914148) node {$R$};
\draw[color=black] (4.21765689626343,6.267696826148193) node {$f$};
\draw[color=black] (-3.039424289957831,2.2376687568414146) node {$g$};
\draw [fill=black] (4.419539299244726,0.) circle (2.0pt);
\draw[color=black] (4.520666549132794,0.2529556851151442) node {$E$};
\draw[color=black] (2.248094152612566,0.19235375926090692) node {$u$};
\draw [fill=black] (0.,2.3383054510545525) circle (2.0pt);
\draw[color=black] (0.11187609988355163,2.586129830503279) node {$F$};
\draw[color=black] (-0.009327761264193851,1.2983389061007369) node {$v$};
\end{scriptsize}
\end{axis}
\end{tikzpicture}
\end{document}

產生以下結果:

在此輸入影像描述


地位:

  • 看起來arc c水平移動了 1,垂直移動了 2,這是x-Min&y-Min值(請參見第一張圖片中的紅色箭頭)。
  • x-Min, y-Min值都等於時0,則arc c進入正確的位置。
  • arc c在地理幾何中定義為CircularArc(B, C, D)
  • tikz我在或方面都沒有經驗geogebra
  • 我只是想解決這個問題的核心,所以我可以繪製更簡單的圖形,geogebra然後將其導入到我的latex.
  • 為什麼會出現這樣的情況。

更新: 我有在 geogebra 的 Reddit 子版塊中。顯然,geogebra 的LaTeX輸出目前沒有維護者。

答案1

我對 Geogebra 不太了解,所以我不能說是什麼導致了你的問題。但是,恕我直言,這種圖片很簡單,可以直接在 Ti 中繪製它們kZ。

這不是一個解決方案(對於你所說的我不知道是否有一個),而是一種替代方案,一種解決方案:投入一些時間學習 TikZ 簡單地說,您將可以繪製簡單的東西(例如這個),但從長遠來看,您將能夠繪製更複雜的東西。這是一個手邊的好工具。

也就是說,你的照片。我認為代碼足夠清晰。

\documentclass[tikz,border=2mm]{standalone}

\begin{document}
\begin{tikzpicture}
  % deimensions
  \def\xmin{-1}
  \def\xmax{6}
  \def\ymin{-2}
  \def\ymax{6}
  \def\r{5}                                % radius
  \def\xa{4.4}                             % A point, x coordinate
  \pgfmathsetmacro\ya{sqrt(\r*\r-\xa*\xa)} % A point, y coordinate
  % coordinates
  \coordinate (A) at (\xa,\ya);
  \coordinate (B) at (0,0);
  \coordinate (C) at (\r,0);
  \coordinate (D) at (0,\r);
  \coordinate (E) at (\xa,0);
  \coordinate (F) at (0,\ya);
  % grid and axes
  \draw[help lines,gray!30] (\xmin,\ymin) grid (\xmax,\ymax);
  \draw[thick,-latex] (\xmin,0) -- (\xmax,0);
  \draw[thick,-latex] (0,\ymin) -- (0,\ymax);
  % lines
  \draw (\xmin,\ya) -- (\xmax,\ya);
  \draw (\xa,\ymin) -- (\xa,\ymax);
  % arc
  \draw[thick,red] (C) arc (0:90:\r) node[midway,right] {$c$};
  % vectors
  \draw[thick,-latex,blue] (B) -- (E) node[midway,below] {$\vec u$};
  \draw[thick,-latex,blue] (B) -- (F) node[midway,left]  {$\vec v$};
  \draw[thick,-latex,blue] (B) -- (A) node[midway,above] {$R$};
  % points
  \foreach\i in {A,B,C,D,E,F}
    \draw[fill=white] (\i) circle (0.5mm) node[above right] {$\i$};
\end{tikzpicture}
\end{document}

在此輸入影像描述

相關內容