| ||||||||||||||||||
Solution of Triangles
To call up the Solution of Triangles window, select the menu item
File / Solve Triangles.
Any triangle can be specified using three values: the three sides, two of the sides and an angle, or one side and two angles. Given these three values, UltimaCalc will calculate the other angles and sides, and also the area and perimeter of the triangle. There are seven possible sets of data to specify a triangle. Start with either a side or an angle. Moving anticlockwise round the triangle, choose the next item as either a side or an angle. Move round anticlockwise once more, and choose the third item as either a side or a triangle. At least one of the three items must be a side.

UltimaCalc always shows triangles with one of the sides horizontal. Usually, this is at the bottom. At the top right of the Triangles window there are some controls to flip the triangle horizontally (show a mirror image), and to invert it so that the base is at the top and the apex is at the bottom. Two more controls allow you to rotate the image in either direction. In the image shown above, the triangle was rotated once anticlockwise after it was calculated.
There are five 'radio' buttons to select which kind of data you have for a triangle. The initial setting is for three sides given. Click on the button that is appropriate for your data, and enter the data into the edit boxes underneath. You can choose whether the angles are in degrees or radians by clicking on the check box marked 'Degrees'. Then click on the 'Calculate' button, or press the 'Enter' key, and, if a solution is possible, the triangle will be calculated and displayed. Two of the possible kinds of data are not shown on the radio buttons. For data in the form side-angle-angle, use angle-angle-side, with a horizontal flip (or mirror), and for data in the form angle-side-side choose side-side-angle, again with a horizontal flip, and perhaps a rotation.
If your data is for two sides, with the angle opposite the second side, there may be two solutions. (For example, with the first side = 2, the second side = 1, and the angle = 25 degrees. The image above also illustrates this situation.) In this case, a check box is displayed so that you can switch between the two triangles by clicking on it. This check box is labelled 'Larger' because when the tick is shown, the displayed triangle is the larger of the two solutions.
Also, no solution is possible when the length of the second side is less than the product of the length of the first side and the sine of the angle. (In the example shown in the image, this happens if the angle is set to 80 degrees.) At the critical point, the triangle is right-angled at the angle opposite the first line. (Another example: first side = 2, second side = 1, angle 30 degrees.) At this critical point, the 'two' solutions are identical. If the angle is increased, even by a tiny amount, no solution is possible, as the shorter side will not be long enough to reach to where the third side would have to be. On the other hand, if for example the first side = 3, second side = 1, and angle = 30 degrees, only one solution is possible, and the check box is then not shown.
The values that you supplied are shown in blue; calculated values are shown in red. All values displayed can be copied by highlighting them with the mouse and using Control+C to copy the text into the clipboard. (You can also right click on a value and use the menu that pops up. You may need to choose Select All, then Copy.) Click on the log file icon when it is highlighted to write the data and results to the log file, and click on the 'Show' button to have the results shown in the multiple results window, as shown below. The image is for the same data as in the previous image, but with the larger triangle being selected first.

The values you enter are evaluated by UltimaCalc's expression evaluator. You can therefore enter the angle as
a fraction of PI, such as pi/3, or in degrees, minutes and seconds, such as
10:30:55. (Make sure that the appropriate units, degrees or radians, are
selected in the bottom left corner.)
More interestingly, you can do something like calculating a triangle where
the first side is defined as p = 5, the second side is defined as p - 1,
and the third side is defined as sqrt(2*p - 1). This will draw a right-angled
triangle for any value of p greater than 1. Try changing the first side to some other
value, for example p = 13 or p = 41. You will get other right-angled
triangles (with integer value sides for these particular values of p).
The expressions are always calculated from left to right.
When you calculate a triangle (by clicking on 'Calc' or pressing the 'Enter' key), if there is an error in the expression to be calculated, or you have entered an unacceptable value, you will be warned and the focus will be set to the control containing the expression in question.
The original
data and calculated values are stored in the main calculator as the variables
named sidea, sideb, sidec, anglea, angleb,
anglec, area and perimeter.
The angles are in radians, and these values are not recorded until after the triangle has been calculated.
Degrees or Radians
The checkbox to select 'Degrees' is initially set to
correspond to the setting in UltimaCalc's main window. However, clicking on
this checkbox to change the setting will not affect the main window's setting.
Saving the data
The 'Save' and 'Open' buttons allow you to save data for the triangle. These data files can be viewed, edited, or created in a text editor such as Notepad. The data for the sides and angles can be in any of the seven varieties described above. Just enter the data in the desired order, one per line. The lines starting 'unit', 'mirror', 'invert' and 'rotation' are optional. Any text after a semicolon is ignored to the end of the line it is on.
