如何在 Tikz 中标记直角?

如何在 Tikz 中标记直角?

线 MN 垂直于线 d1 和 d2。我想在点 M 和 N 处标记直角。我该怎么做?

\documentclass[10pt,a4paper]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{pgfplots}
\usepackage{tkz-euclide}
\usepackage[a4paper,left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\begin{document}
\begin{tikzpicture}
\begin{axis}[hide axis, width=7in, axis equal image, axis lines=middle,
xtick=\empty,
ytick=\empty, xmin=-1,xmax=15,
ymin=0,ymax=10,]
\draw[very thick] (axis cs:0,8)--(axis cs:12,7);
\draw[very thick] (axis cs:0,0)--(axis cs:12,4);
\draw[very thick] (axis cs:8,2.6)--(axis cs:8,7.35);
\addplot[only marks, mark options = {black},mark size=2pt] (8,2.6);
\addplot[only marks, mark options = {black},mark size=2pt] (8,7.35);
\node [] at (axis cs:12.5,7) {$d_1$};
\node [] at (axis cs:12.5,4) {$d_2$};
\node [] at (axis cs:8,8) {$M$};
\node [] at (axis cs:8,2) {$N$};
\addplot[only marks, mark options = {black},mark size=2pt] (4,1.3);
\addplot[only marks, mark options = {black},mark size=2pt] (4,7.7);
\node [] at (axis cs:4,0.6) {$Q=\left( 2,7,-17\right)$};
\node [] at (axis cs:4,8.3) {$P=\left( -3,-4,-5\right)$};
\addplot[only marks, mark options = {black},mark size=2pt] (0,4);
\node [] at (axis cs:-0.5,4) {$O$};
\draw[very thick] (axis cs:0,4)--(axis cs:4,1.3);
\draw[very thick] (axis cs:0,4)--(axis cs:4,7.7);
\draw[very thick] (axis cs:0,4)--(axis cs:8,2.6);
\draw[very thick] (axis cs:0,4)--(axis cs:8,7.35);
\end{axis}

\end{tikzpicture}
\end{document}

https://i.stack.imgur.com/TYkc6.png

相关内容