From 80799101af43e5e1f06219421334c1158c3e534c Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Mon, 5 May 2014 17:25:39 +0200 Subject: [PATCH] [Cleanup] Less hardcoding Note: the angle is not 15 but rather 15.1 degrees! --- src/sand-wedge-data/geometry.tex | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/sand-wedge-data/geometry.tex b/src/sand-wedge-data/geometry.tex index 7b2ca811..56254a9b 100644 --- a/src/sand-wedge-data/geometry.tex +++ b/src/sand-wedge-data/geometry.tex @@ -9,16 +9,19 @@ \begin{document} \begin{tikzpicture}[scale=12] - \pgfmathsetmacro{\hypot}{sqrt(1+.27^2)}; - \pgfmathsetmacro{\ssin}{sin(15)}; - \pgfmathsetmacro{\scos}{cos(15)}; - \pgfmathsetmacro{\lsin}{sin(75)}; + \pgfmathsetmacro{\rightleg}{0.27}; + \pgfmathsetmacro{\leftleg}{1.00}; + \pgfmathsetmacro{\hypot}{sqrt(\leftleg^2+\rightleg^2)}; + \pgfmathsetmacro{\myangle}{atan(\rightleg/\leftleg)}; + \pgfmathsetmacro{\ssin}{sin(\myangle)}; + \pgfmathsetmacro{\scos}{cos(\myangle)}; + \pgfmathsetmacro{\lsin}{sin(90-\myangle)}; \coordinate (A) at (0,0); \node at (A) [left] {A}; \coordinate (B) at (\hypot,0); \node at (B) [right] {B}; - \coordinate (C) at (\lsin, .27*\lsin); + \coordinate (C) at (\lsin, \rightleg*\lsin); \node at (C) [above] {C}; \draw (A) -- GitLab