412
edits
No edit summary |
|||
| Line 190: | Line 190: | ||
[[File:Graduate Dials for PHI Wind.jpg|thumbnail|Finish work example of est Graduate dials for PHI Wind|right|400px]] | [[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.<BR>It is interesting to make some changes in the code to implement some parameter assignments in order to be able to easily modify this type of graduate dials. I also wanted to insert a colored arc, which is not present in the original instrument, but its construction technique is useful for other gauges that have colored arc. | 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.<BR>It is interesting to make some changes in the code to implement some parameter assignments in order to be able to easily modify this type of graduate dials. I also wanted to insert a colored arc, which is not present in the original instrument, but its construction technique is useful for other gauges that have colored arc. | ||
===Creating parametric values=== | ===Creating parametric values=== | ||
| Line 210: | Line 209: | ||
\end{tikzpicture} | \end{tikzpicture} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
The command is fairly clear and the parameters to be varied also, the thickness is defined by a value inserted in the ''\graduateThick'' (within the square brackets) variable, which is also the thickness of the outer diameter ring. Obviously it can be redefined with a numeric value. It is important to note the presence of the measurement "cm" unit so that for the thickness of the ring do not use a different measurement units <ref>Units permitted by LaTeX: https://tex.stackexchange.com/questions/8260/what-are-the-various-units-ex-em-in-pt-bp-dd-pc-expressed-in-mm</ref>, as for example the typographical point ( pt = 1/72 inches).<BR>[[File:LaTeX Coordinates System.jpg|thumb|LaTeX Coordinates System<ref>Graphics with TikZ (''Andrew Mertz and William Slough'') Pag. 12 : https://www.tug.org/pracjourn/2007-1/mertz/mertz.pdf</ref>]]The definition of the arc requires some attention as the center of rotation needs to be defined, if it were placed (0,0) the center would coincide with the center of the Cartesian axes (Latex uses Cartesian notation, that is, the angles are anti-clockwise and the angle zero corresponds to the horizontal axis of the X)<ref>Example of coordinates in the LaTeX: https://tex.stackexchange.com/questions/155181/coordinate-system-in-latex-with-tikz</ref>. | The command is fairly clear and the parameters to be varied also, the thickness is defined by a value inserted in the ''\graduateThick'' (within the square brackets) variable, which is also the thickness of the outer diameter ring. Obviously it can be redefined with a numeric value. It is important to note the presence of the measurement "cm" unit so that for the thickness of the ring do not use a different measurement units <ref>Units permitted by LaTeX: https://tex.stackexchange.com/questions/8260/what-are-the-various-units-ex-em-in-pt-bp-dd-pc-expressed-in-mm</ref>, as for example the typographical point ( pt = 1/72 inches).<BR>[[File:LaTeX Coordinates System.jpg|thumb|LaTeX Coordinates System<ref>Graphics with TikZ (''Andrew Mertz and William Slough'') Pag. 12 : https://www.tug.org/pracjourn/2007-1/mertz/mertz.pdf</ref>|right|400px]]The definition of the arc requires some attention as the center of rotation needs to be defined, if it were placed (0,0) the center would coincide with the center of the Cartesian axes (Latex uses Cartesian notation, that is, the angles are anti-clockwise and the angle zero corresponds to the horizontal axis of the X)<ref>Example of coordinates in the LaTeX: https://tex.stackexchange.com/questions/155181/coordinate-system-in-latex-with-tikz</ref>.A purely Cartesian reference system requires some attention for those who commonly use the reference system used for CAD or other graphical programs (lower Y, clockwise angles). Therefore the command:<BR> | ||
'''...(130:\arcRadius) arc (130:130+60:\arcRadius)...'''<BR> | |||
so read:<BR> | |||
'''130: \arcRadius''' : It is the beginning point of the arc that starts from the axis of the X and performs an angle of 130° counterclockwise, positioning at the 340 ° of the graduate dials, the ''\arcRadius'' parameter is the arc radius.<BR> | |||
'''arc''' : This is the keyword of the arc function.<BR> | |||
'''(130:130+60:\arcRadius)''' : The first value is the initial angle, in our example 130° obtained as angular distance from the X axis measured counterclockwise. The second angle is 130° + the arc angle (in our example is 60 °) that give the value 190° (corresponding to 260 ° of the graduate dials), the third parameter is the arc radius defined by ''/arcRadius'' parameter. So if you want to get any arc, just change the three parameters. It may seem complicated because it has a very different method from the usual one, but it allows you to get any type of arc in any position. | |||
===The complete code=== | ===The complete code=== | ||
<syntaxhighlight lang="latex"> | <syntaxhighlight lang="latex"> | ||
edits