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}

여기에 이미지 설명을 입력하세요

관련 정보