412
edits
No edit summary |
|||
| Line 114: | Line 114: | ||
==Circular graduate dials== | ==Circular graduate dials== | ||
[[File:Test Graduate dials for PHI Wind.jpg|thumbnail|Finish work example of est Graduate dials for PHI | [[File:Test Graduate dials for PHI Wind.jpg|thumbnail|Finish work example of est Graduate dials for PHI|right|400px]] | ||
This is an example much more complex as the original instrument has a double graduated dial. Therefore, the program's implementation time in LaTeX was about equivalent to that used for the corresponding object in Inkscape. But the advantage of this version is that you can now have a template that is useful to generate similar objects. The lower scale can simply be removed by deleting the corresponding rows. The advantage of this approach is in the ability to resume the old drawing and modify it as a function of any corrections that such a complex gauge may require. This tool has several problems, such as the numbering that needs to be radial, and therefore require a rotation. The secondary scale which has its own radial numbering that does not follow the position angle, but a different scale. | This is an example much more complex as the original instrument has a double graduated dial. Therefore, the program's implementation time in LaTeX was about equivalent to that used for the corresponding object in Inkscape. But the advantage of this version is that you can now have a template that is useful to generate similar objects. The lower scale can simply be removed by deleting the corresponding rows. The advantage of this approach is in the ability to resume the old drawing and modify it as a function of any corrections that such a complex gauge may require. This tool has several problems, such as the numbering that needs to be radial, and therefore require a rotation. The secondary scale which has its own radial numbering that does not follow the position angle, but a different scale. | ||
| Line 188: | Line 188: | ||
==Circular graduate dials like a change of a previous one== | ==Circular graduate dials like a change of a previous one== | ||
[[File:Graduate Dials for PHI Wind.jpg|thumbnail|Finish work example of est Graduate dials for PHI Wind|right|400px]] | |||
If you look at this code it is virtually identical to the previous one, the lines that defined the graduated secondary dial have been eliminated. The implementation time of this new version was therefore a few minutes since we were based on the previous element. | |||
<syntaxhighlight lang="latex"> | <syntaxhighlight lang="latex"> | ||
% \documentclass{standalone} is particular class that non have a size, but the size is define from | % \documentclass{standalone} is particular class that non have a size, but the size is define from | ||
| Line 203: | Line 204: | ||
% https://www.ctan.org/tex-archive/fonts/ocr-b-outline | % https://www.ctan.org/tex-archive/fonts/ocr-b-outline | ||
\usepackage{ocr} | \usepackage{ocr} | ||
\tikzset{font={\fontsize{ | \tikzset{font={\fontsize{9pt}{10}\selectfont}} | ||
% Wind Rose position pram | |||
\newcommand\posWindRose{2.8} | |||
\newcommand\externalDiameter{3.55} | |||
\newcommand\graduateThick{0.3} | |||
\newcommand\arcRadius{\externalDiameter-\graduateThick/2} | |||
% Defines the font size to use, the first number defines the font size, | % Defines the font size to use, the first number defines the font size, | ||
% the second number the dimensional family from which the font is taken. | % the second number the dimensional family from which the font is taken. | ||
| Line 212: | Line 218: | ||
% \ocrnegfamily - Family negative fonts | % \ocrnegfamily - Family negative fonts | ||
{\ocrfamily | {\ocrfamily | ||
\begin{tikzpicture} | |||
%\draw[line width=3mm] (0,0) circle (3.55-0.15); | |||
\draw[draw=cyan, line width=\graduateThick cm] (130:\arcRadius) arc (130:130+60:\arcRadius); | |||
%2° Rays | |||
\foreach \a in {0, 2,...,358} | |||
\draw[line width=0.3mm, cap=round] (\a:\externalDiameter-\graduateThick) -- (\a:\externalDiameter); | |||
%10° Rays | |||
\foreach \a in {0, 10,...,350} | |||
\draw[line width=0.6mm, cap=round] (\a:\externalDiameter-\graduateThick-\graduateThick*0.5) -- (\a:\externalDiameter); | |||
%Angle labels | |||
\foreach \a in {30, 60, 120, 150, 210, 240, 300, 330} | |||
\pgfmathtruncatemacro\result{(360 - \a)/10} | |||
\draw (\a + 90: \externalDiameter-\graduateThick-0.5) node {\result}; | |||
% Wind rose labels | |||
\draw (90: \externalDiameter-\graduateThick-0.5) node{\large{N}}; | |||
\draw (360:\externalDiameter-\graduateThick-0.5) node{\large{E}}; | |||
\draw (270:\externalDiameter-\graduateThick-0.5) node{\large{S}}; | |||
\draw (180:\externalDiameter-\graduateThick-0.5) node{\large{W}}; | |||
% Insert the label | |||
\draw (90: 0.8) node{WIND UNIT}; | |||
\end{tikzpicture} | |||
} | |||
\end{document} | \end{document} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
edits