Function Repository Resource:

# ASSTriangles

Create a list of all triangles with side lengths a and b and angle β opposite the side with length b

Contributed by: Ted Ersek
 ResourceFunction["ASSTriangles"][β,a,b] returns a list of all triangles with sides of lengths a and b and angle β opposite the side with length b.

## Details

ASSTriangles are known as angle-side-side triangles or side-side-angle triangles.
ResourceFunction["ASSTriangles"][β,a,b] assumes angle β is in radians.
ASSTriangles returns either a list of two triangles, a list of one triangle, or an empty list.
When ASSTriangles returns a non-empty list the elements have the head.
When ASSTriangles returns an empty list there are no triangles with the specified values for angle, side, side where the second side is opposite the specified angle.
Triangles returned by ASSTriangles have angle β at the origin and the side with length = a along the positive horizontal axis.
ASSTriangles allows angle β strictly between 0 and π and lengths a, b to be any positive number.

## Examples

### Basic Examples (5)

There are two triangles with the specified angle, side, side for this example:

 In[1]:=
 Out[1]=

The triangles above are the black outline and the gray triangle below:

 In[2]:=
 Out[2]=

The next two cells verify that both triangles above have the specified angle, side, side:

 In[3]:=
 Out[4]=
 In[5]:=
 Out[6]=

Only one triangle has the specified angle side, side in this example:

 In[7]:=
 Out[7]=
 In[8]:=
 Out[8]=

The next cell verifies the triangle above has the specified angle, side, side:

 In[9]:=
 Out[10]=

ASSTriangles always returns one obtuse triangle when the specified angle is 90° or greater and the third argument is greater than the second argument. An example is in the next cell:

 In[11]:=
 Out[11]=
 In[12]:=
 Out[12]=

The next cell verifies the triangle above has the specified angle, side, side:

 In[13]:=
 Out[14]=

The next example makes a (3,4,5) right triangle:

 In[15]:=
 Out[15]=
 In[16]:=
 Out[16]=

The next cell verifies the triangle above has the specified angle, side, side:

 In[17]:=
 Out[18]=

The next example is a case where no triangle has the specified angle, side, side:

 In[19]:=
 Out[19]=

In this example we would have a right triangle if the last argument of ASSTriangles was 6 Sin[40°]≈3.85673. The next graphics illustrates why no triangle has the angle, side, side specified in the last example:

 In[20]:=
 Out[20]=

### Scope (4)

When ASSTriangles is given exact input it returns exact results:

 In[21]:=
 Out[21]=

When ASSTriangles is given values with many digits of precision it returns results with all digits that can be be justified:

 In[22]:=
 Out[22]=

When one or more argument is symbolic and non-numeric ASSTriangles does nothing to change the input:

 In[23]:=
 Out[23]=

We can use replacement rules to assign specific values for a, b in triangles above:

 In[24]:=
 Out[24]=

We can also use Blockto assign values to a, b in triangles above:

 In[25]:=
 Out[25]=

ASSTriangles displays an error message and returns the original input when given incorrect:

 In[26]:=
 Out[26]=

No message is displayed in the next example because it would give a list of Triangles if b had an appropriate value:

 In[27]:=
 Out[27]=

### Neat Examples (1)

The next example allows you to see the result of providing ASSTriangles any values for three arguments:

 In[28]:=
 Out[28]=

Ted Ersek

## Version History

• 1.0.1 – 02 October 2023
• 1.0.0 – 04 November 2022