Function Repository Resource:

# Rhombus

Produce a rhombus for use in graphics

Contributed by: Sander Huisman
 ResourceFunction["Rhombus"][] returns an axis-aligned golden rhombus centered around the origin with side length 1. ResourceFunction["Rhombus"][{x,y}] returns an axis-aligned golden rhombus centered around {x,y} with side length 1. ResourceFunction["Rhombus"][{x,y},a] returns an axis-aligned golden rhombus centered around {x,y} with side length a. ResourceFunction["Rhombus"][{x,y},a,θ] returns an axis-aligned rhombus centered around {x,y} with side length a and half-angle θ. ResourceFunction["Rhombus"][{x,y},a,θ,ϕ] returns a rhombus centered around {x,y} with side length a and half-angle θ and tilted at an angle ϕ. ResourceFunction["Rhombus"][{x,y},{p,q}] returns an axis-aligned rhombus centered around {x,y} with semi-axes lengths p and q. ResourceFunction["Rhombus"][{x,y},{p,q},ϕ] returns a rhombus centered around {x,y} with semi-axis lengths p and q and tilted at an angle ϕ.

## Details and Options

A rhombus is a quadrilateral whose four sides all have the same length.
A rhombus is sometimes called a diamond, a lozenge, or a calisson.
The parameters x, y, a, p, q, θ and ϕ are defined as follows:

## Examples

### Basic Examples (2)

Generate a golden rhombus with unit side lengths centered around the origin:

 In[1]:=
 Out[1]=

Generate a lozenge with unit side lengths centered around the origin:

 In[2]:=
 Out[2]=

### Scope (3)

Create a rhombus defined by its axis lengths:

 In[3]:=
 Out[3]=

Define a rhombus by a side length and an angle:

 In[4]:=
 Out[4]=

Create a rhombus defined by its axis lengths and rotate it 35° counter-clockwise:

 In[5]:=
 Out[5]=

### Applications (1)

Use rhombuses as error bars:

 In[6]:=
 Out[7]=

### Possible Issues (1)

With an angle of 0 or 180 degrees, the polygon will have no area (a degenerate polygon):

 In[8]:=
 Out[8]=

### Neat Examples (1)

Create a visually appealing collection of rhombuses:

 In[9]:=
 Out[9]=

SHuisman

## Version History

• 1.0.0 – 26 December 2019