🧮 Graphing with Desmos - NagusameCS/IVY GitHub Wiki
⚠️ Desmos API Disclaimer ⚠️
NOTICE: Unauthorized use of the Desmos API in a production enviornment is strictly prohibited.
🔒 Use is Restricted
Desmos does not provide open API keys or general-purpose API endpoints for public, commercial, or educational use outside of approved partners. Any attempt to: • Programmatically generate or manipulate graphs using the Desmos API without approval; • Circumvent authentication, rate-limits, or access controls; • Embed or redistribute Desmos features in a way not explicitly allowed under their Terms of Service;
violates Desmos’s policies and may result in service disruption, legal action, or blacklisting.
✅ How to Use Desmos Properly
If you or your organization wish to integrate Desmos technology into your application, curriculum, or product, you must: 1. Apply for access through the official Desmos Partners page. 2. Receive an API key and written permission for your intended use. 3. Comply fully with their terms, usage limitations, branding guidelines, and privacy policies.
🔗 Not Affiliated
This project is not affiliated with, endorsed by, or officially supported by Desmos, Inc. All trademarks, logos, and intellectual property belong to their respective owners. Use of the term “Desmos” here refers only to their publicly available tools and documentation, and not to any proprietary or partner-level service.
❗ Consequences of Misuse
Unauthorized or non-partner use of the Desmos API can result in: • Revoked access to any publicly available Desmos services, • Cease and desist notices or legal action, • Data loss or malfunction due to API changes or shutdowns, • Violation of user trust if personal or student data is mishandled.
⸻
If you’re unsure whether your use case is allowed, assume it is not. Always contact Desmos directly to clarify before integrating any of their services.
Learn more and request access at: https://www.desmos.com/partners
This guide explains how to use the Desmos graphing calculator integration in IVYSTUDY markdown files.
To create a Desmos graph, use a code block with the desmos
identifier:
```desmos
y=x^2
```
Use a config comment at the start of the code block:
```desmos
//config: {
"bounds": {"x": [-10, 10], "y": [-10, 10]},
"grid": true,
"expressions": false
}
y=x^2
```
{
"bounds": {"x": [min, max], "y": [min, max]}, // Set viewing window
"grid": true/false, // Show/hide grid
"expressions": true/false, // Show/hide expression list
"expressionsCollapsed": true/false, // Collapse expression list
"lockViewport": true/false, // Prevent panning/zooming
"showGrid": true/false, // Show/hide grid
"showXAxis": true/false, // Show/hide x-axis
"showYAxis": true/false, // Show/hide y-axis
"xAxisLabel": "string", // Label for x-axis
"yAxisLabel": "string" // Label for y-axis
}
```desmos
y=x^2
```
```desmos
y=x^2
y=2x+1
y=sin(x)
```
```desmos
//config: {
"bounds": {"x": [-5, 5], "y": [-2, 8]},
"grid": true,
"expressions": true
}
y=x^2
y=2x+1
```
```desmos
//Points
(1,2)
(3,4)
//Line segment
(1,2)(3,4)
//Vector
vector(1,2)
```
```desmos
y>x^2
y<2x+1
```
```desmos
(cos(t), sin(t))
```
```desmos
r=2cos(theta)
```
```desmos
//Create a slider
a=1
y=ax^2
```
```desmos
A=(1,2)
B=(3,4)
(A_x, A_y)
```
```desmos
//config: {
"bounds": {"x": [-5, 5], "y": [-5, 5]}
}
a=1
y=ax^2
y=(a+1)x^2
y=(a+2)x^2
```
```desmos
//Circle
(x-h)^2+(y-k)^2=r^2
//Points
A=(0,0)
B=(2,0)
C=(1,2)
//Triangle sides
segment(A,B)
segment(B,C)
segment(C,A)
```
-
Configuration
- Always set appropriate bounds for your graph
- Consider whether expressions list should be visible
- Use grid when it aids understanding
-
Clarity
- Use descriptive variable names
- Add comments for complex constructions
- Keep expressions organized
-
Performance
- Limit number of expressions for better performance
- Avoid unnecessarily complex calculations
- Use reasonable domains for functions
-
Accessibility
- Provide clear labels for axes when relevant
- Use appropriate zoom levels
- Consider color contrast for visibility
```desmos
//config: {
"bounds": {"x": [-5, 5], "y": [-5, 5]},
"expressions": true
}
// Parent function
y=x^2
// Transformed function
a=1 //vertical shift
h=0 //horizontal shift
y=(x-h)^2+a
```
```desmos
//config: {
"bounds": {"x": [0, 10], "y": [0, 20]},
"xAxisLabel": "Time (s)",
"yAxisLabel": "Height (m)"
}
// Projectile motion
g=9.81
v_0=15
theta=45
y=(-g/2)x^2+v_0*sin(theta*pi/180)x
```