Graphics, Figures & TablesLabeling in Tikzpicture

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

Labeling in Tikzpicture

Post by Mini »

Hi,

I've made the following 3D diagram (code is below and diagram attached).

Now, I'd like to ask a few things in terms of labeling.

1. I'd like to label angle BPD with an angle value and an 'arc' to show which angle is labelled and shading if possible. How would I do this?

2. I'd like to label the lengths of the lines with a length value. How would I do this?

3. How would I draw a dotted line? I would like it to extend from points C and D (same gradients as PC and PD respectively) with arrowheads. This would be to mark the bearing.

Thank you so much, I really appreciate if someone could help me.

Thanks again.

Code: Select all

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc,through,backgrounds}
\begin{document}
\begin{tikzpicture}
\coordinate [label=left:$A$] (A) at (-4,2);
\coordinate [label=right:$B$] (B) at (4,2);
\coordinate [label=left:$C$] (C) at (-4,-2);
\coordinate [label=right:$D$] (D) at (4,-2);
\coordinate [label=:$P$] (P) at (0,-6);
\draw (A) -- (C);
\draw (B) -- (D);
\draw (A) -- (B);
\draw (C) -- (D);
\draw (A) -- (P);
\draw (B) -- (P);
\draw (C) -- (P);
\draw (D) -- (P);
\end{tikzpicture}
\end{document}
Attachments
3dtrig.jpg
3dtrig.jpg (33.3 KiB) Viewed 2353 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Labeling in Tikzpicture

Post by localghost »

A careful look into the pgf/tikZ manual will answer all your questions. Open a command prompt to get access.

Code: Select all

texdoc pgf

Best regards
Thorsten
Post Reply