Geogebra を使用してジオメトリをエクスポートする

Geogebra を使用してジオメトリをエクスポートする

下の図に示すように、Geogebra を使用して図を作成しました。

ここに画像の説明を入力してください

そしてそこから TEX ファイルをエクスポートします:

\documentclass[0pt]{article}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
    \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1cm,y=1cm]
    \draw (-6.398243018635849,29.30976776220647)-- (86.80087849068208,49.65488388110324);
    \draw (97.54228504819193,22.03412416179222)-- (15.084570096383837,-25.93175167641558);
    \draw [shift={(0,0)}] plot[domain=1.7857219540430334:5.239245930761878,variable=\t]({1*30*cos(\t r)+0*30*sin(\t r)},{0*30*cos(\t r)+1*30*sin(\t r)});
    \draw [shift={(90,35)}] plot[domain=-1.0439393764177076:1.785721954043033,variable=\t]({1*15*cos(\t r)+0*15*sin(\t r)},{0*15*cos(\t r)+1*15*sin(\t r)});
    \end{tikzpicture}
\end{document}

間違った単位でエクスポートしているため、図面がシートに収まらないようです。

エクスポートする前に Geogebra で何かを修正する必要がありますか、それとも取得したコードを修正する方が興味深いでしょうか?

編集

コメントに基づいてマルスピラムシートの中央にデザインを配置し、幅を70mmにするにはどうすればいいでしょうか?

答え1

実際のところあなたの質問ではありませんが、これを tikz で描くのも楽しいです...

出力

ここに画像の説明を入力してください

コード

\documentclass[12pt,tikz]{standalone}
\begin{document}
\begin{tikzpicture}[rotate=39, scale=4]

  % parameters of the shape
  \def\thet{75}
  \def\r{.4}

  \coordinate (O) at (0,0) ;
  \coordinate (a1) at ({cos(\thet)},{sin(\thet)});
  \coordinate (a2) at ({cos(\thet)},{-sin(\thet)});
  \coordinate (vanish) at ({sec(\thet)},0);

  \path  (vanish) -- (a1) coordinate[pos=\r] (b1) 
         (vanish) -- (a2) coordinate[pos=\r] (b2) 
         (vanish) -- (O)  coordinate[pos=\r] (o) ;

 \pgfresetboundingbox

  \draw [blue, very thick, fill=red!20] (a1) 
    arc [start angle=\thet,end angle=360-\thet,radius=1] -- (b2) 
    arc [start angle=-\thet,end angle=\thet,radius=\r] -- cycle ; 

\end{tikzpicture}
\end{document}

答え2

x一般的に見たい領域がクリップされた長方形であると仮定して、その長方形を見ての値を計算できます。

(この特定のケースでは、クリッピングされた四角形の外側には何も描画されないため、クリッピングは必要ありません。したがって、描画された図形の外側の座標を確認することもできます)。

x = 70mm / (175.88229072982594 - (-92.2298265729806)) = 0.26mm

軸比を維持するには、y = x に設定する必要があります。すると、次の結果が得られます (切り取られた領域を確認するために赤い四角形を追加しました)。

\documentclass[0pt]{article}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
    \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=0.26mm,y=0.26mm]
    \clip(-92.2298265729806,-92.52338090781379) rectangle (175.88229072982594,94.97188107843031);
    \draw[red] (-92.2298265729806,-92.52338090781379) rectangle (175.88229072982594,94.97188107843031);
    \draw (-6.398243018635849,29.30976776220647)-- (86.80087849068208,49.65488388110324);
    \draw (97.54228504819193,22.03412416179222)-- (15.084570096383837,-25.93175167641558);
    \draw [shift={(0,0)}] plot[domain=1.7857219540430334:5.239245930761878,variable=\t]({1*30*cos(\t r)+0*30*sin(\t r)},{0*30*cos(\t r)+1*30*sin(\t r)});
    \draw [shift={(90,35)}] plot[domain=-1.0439393764177076:1.785721954043033,variable=\t]({1*15*cos(\t r)+0*15*sin(\t r)},{0*15*cos(\t r)+1*15*sin(\t r)});
    \end{tikzpicture}
\end{document}

ここに画像の説明を入力してください

関連情報