Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Visualize fractions, integers and multiplication using tape diagrams
| ResourceFunction["TapeDiagram"][n/d] creates a tape diagram representing a single fraction n/d. | |
| ResourceFunction["TapeDiagram"][m] creates a tape diagram representing a single whole number m. | |
| ResourceFunction["TapeDiagram"][n/d*m] creates a tape diagram representing the multiplication of a whole number m by a fraction n/d. | |
| ResourceFunction["TapeDiagram"][n*m] creates a tape diagram representing the multiplication of two whole numbers m and n. | |
| ResourceFunction["TapeDiagram"][{expr1,expr2,…}] creates a stack of tape diagrams. | 
| "BracketPosition" | Automatic | controls the placement of the brackets and their labels | 
| "DotAfterIntegerPart" | Automatic | shows a dotted outline around the fractional part of the represented number | 
| FontColor | Black | sets the font color of the text in the tape diagram | 
| FillingStyle | RGBColor[0.99,0.9,0.5] | sets the color for the filled part of the tape diagram | 
| "IntegerMarkers" | False | draws thick lines at intervals of one throughout the tape | 
| "TapeColor" | RGBColor[0.95,0.95,0.95] | sets the color for the unfilled part of the tape diagram | 
| "SubdivisionWidth" | None | adds dashed lines at intervals of a given width | 
| "UnitLabels" | Automatic | sets the text of the label displayed in the sections of the tape diagram | 
| Top | places the brackets and labels on top of the tape diagram | 
| Bottom | places the brackets and labels on the bottom of the tape diagram | 
| None | removes brackets and their labels | 
| Automatic | for tape diagrams showing multiplication of a fraction by a whole number, one bracket appears on top and the other on the bottom | 
Create a tape diagram representing a single fraction:
| In[1]:= | ![ResourceFunction["TapeDiagram"][1/2]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/0ba4864bd1a45e6b.png) | 
| Out[1]= |  | 
Create a tape diagram representing the multiplication of a fraction and a whole number:
| In[2]:= | ![ResourceFunction["TapeDiagram"][2/3 * 9]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/26bed58b1e63dd7b.png) | 
| Out[2]= |  | 
Create a stack of tape diagrams:
| In[3]:= | ![ResourceFunction["TapeDiagram"][{1, 1/2, 1/3, 1/4}]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/5cc9b0dd68297e8c.png) | 
| Out[3]= |  | 
Create a tape diagram representing an improper fraction:
| In[4]:= | ![ResourceFunction["TapeDiagram"][6/4]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/16b0d9550c4844f7.png) | 
| Out[4]= |  | 
Create a tape diagram representing the multiplication of two whole numbers:
| In[5]:= | ![ResourceFunction["TapeDiagram"][3 * 5]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/50a83529cb79b3a0.png) | 
| Out[5]= |  | 
Move the brackets to the Top or Bottom of the tape:
| In[6]:= | ![ResourceFunction["TapeDiagram"][3/4, "BracketPosition" -> Top]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/0d9d3f81efc11ddc.png) | 
| Out[6]= |  | 
| In[7]:= | ![ResourceFunction["TapeDiagram"][3/4, "BracketPosition" -> Bottom]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/7c87e171faf5ec75.png) | 
| Out[7]= |  | 
Use None to show a tape with no brackets:
| In[8]:= | ![ResourceFunction["TapeDiagram"][3/4, "BracketPosition" -> None]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/251c3d70deedc868.png) | 
| Out[8]= |  | 
For tapes showing multiplication of a fraction by a whole number, both brackets are adjusted:
| In[9]:= | ![ResourceFunction["TapeDiagram"][ 2/5* 10, "BracketPosition" -> Top]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/27e816c736682409.png) | 
| Out[9]= |  | 
| In[10]:= | ![ResourceFunction["TapeDiagram"][ 2/5* 10, "BracketPosition" -> Bottom]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/309a8781df9d7ff9.png) | 
| Out[10]= |  | 
For a single fraction with sufficiently wide divisions, the tape automatically becomes dotted after the largest full integer:
| In[11]:= | ![ResourceFunction["TapeDiagram"][7/3]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/7cfa7f9686155b96.png) | 
| Out[11]= |  | 
When the tape divisions are small, the dotting is automatically turned off:
| In[12]:= | ![ResourceFunction["TapeDiagram"][63/8]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/72fcc061bf238af4.png) | 
| Out[12]= |  | 
"DotAfterIntegerPart" can be set to True or False to control when the dotting appears:
| In[13]:= | ![ResourceFunction["TapeDiagram"][7/3, "DotAfterIntegerPart" -> False]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/251903f695be38bd.png) | 
| Out[13]= |  | 
| In[14]:= | ![ResourceFunction["TapeDiagram"][63/8, "DotAfterIntegerPart" -> True]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/2531a7ea99e88c8d.png) | 
| Out[14]= |  | 
For tapes representing multiplication of a fraction by a whole number, the dotting begins after a length representing the given whole number:
| In[15]:= | ![ResourceFunction["TapeDiagram"][5/3 * 12]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/4d30d74637c11a74.png) | 
| Out[15]= |  | 
Emphasize intervals of length one by setting "IntegerMarkers" to True:
| In[16]:= | ![ResourceFunction["TapeDiagram"][10/2, "IntegerMarkers" -> True]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/72884055a8776d17.png) | 
| Out[16]= |  | 
| In[17]:= | ![ResourceFunction["TapeDiagram"][25/4, "IntegerMarkers" -> True, "DotAfterIntegerPart" -> True]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/52984a3212f61bf0.png) | 
| Out[17]= |  | 
Change the filling style of the tape:
| In[18]:= | ![ResourceFunction["TapeDiagram"][5/8, "FillingStyle" -> Red]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/220fb706a48685be.png) | 
| Out[18]= |  | 
Change the color of the tape itself:
| In[19]:= | ![ResourceFunction["TapeDiagram"][1/4, "TapeColor" -> Gray]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/6ae09a696b242c76.png) | 
| Out[19]= |  | 
| In[20]:= | ![ResourceFunction["TapeDiagram"][3/5, "FillingStyle" -> Green, "TapeColor" -> Darker[Green]]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/5eda71270b4f08c4.png) | 
| Out[20]= |  | 
Change the font color of the tape labels:
| In[21]:= | ![ResourceFunction["TapeDiagram"][4/5*20, "FontColor" -> Orange]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/3beee441c64482b5.png) | 
| Out[21]= |  | 
The "SubdivisionWidth" option allows the user to add additional subdivisions to the tape, for example, visualizing subdivisions of width 1/8 on a tape representing 1/2:
| In[22]:= | ![ResourceFunction["TapeDiagram"][1/2, "SubdivisionWidth" -> 1/8]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/06de413fbcd88da7.png) | 
| Out[22]= |  | 
Setting a "SubdivisionWidth" for a stack of tape diagrams applies the subdivision to all tapes at once:
| In[23]:= | ![ResourceFunction["TapeDiagram"][{2, 3, 4}, "SubdivisionWidth" -> 1/2]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/2a04d477bb001f61.png) | 
| Out[23]= |  | 
Setting the "UnitLabels" option to False removes the labels that show in each section of the tape:
| In[24]:= | ![ResourceFunction["TapeDiagram"][3/5, "UnitLabels" -> False]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/5f5798768d5cdded.png) | 
| Out[24]= |  | 
Setting the "UnitLabels" option to Tooltip removes the labels that show in each section of the tape and also adds a Tooltip showing the value of each section:
| In[25]:= | ![ResourceFunction["TapeDiagram"][3/5, "UnitLabels" -> Tooltip]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/77589ed13dd25b35.png) | 
| Out[25]= |  | 
For tapes that are small, the "UnitLabels" option is automatically set to Tooltip:
| In[26]:= | ![ResourceFunction["TapeDiagram"][3/5, ImageSize -> Tiny]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/524fe865baedeef9.png) | 
| Out[26]= |  | 
Define custom unit labels by setting the value of "UnitLabels" to any string:
| In[27]:= | ![ResourceFunction["TapeDiagram"][3/8 * 32, "UnitLabels" -> "four"]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/194f5f91f652251e.png) | 
| Out[27]= |  | 
| In[28]:= | ![ResourceFunction["TapeDiagram"][9/3, "UnitLabels" -> "x"]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/5262e8e5637304b9.png) | 
| Out[28]= |  | 
For stacks of tapes, "UnitLabels" can be set individually for each tape by providing a list of strings or a list of functions:
| In[29]:= | ![ResourceFunction["TapeDiagram"][{1/2, 1/3, 1/4}, "UnitLabels" -> {"half", "third", "fourth"}]](https://www.wolframcloud.com/obj/resourcesystem/images/140/14006ac4-70b2-4617-ae86-bf7420797764/477337ed1a0636e0.png) | 
| Out[29]= |  | 
This work is licensed under a Creative Commons Attribution 4.0 International License