🧮 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.

Basic Syntax

To create a Desmos graph, use a code block with the desmos identifier:

```desmos
y=x^2
```

Configuration Options

Setting Calculator Options

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
```

Common Configuration Properties

{
  "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
}

Basic Examples

Simple Function

```desmos
y=x^2
```

Multiple Functions

```desmos
y=x^2
y=2x+1
y=sin(x)
```

Configured Graph

```desmos
//config: {
  "bounds": {"x": [-5, 5], "y": [-2, 8]},
  "grid": true,
  "expressions": true
}
y=x^2
y=2x+1
```

Advanced Features

Points and Lines

```desmos
//Points
(1,2)
(3,4)

//Line segment
(1,2)(3,4)

//Vector
vector(1,2)
```

Inequalities

```desmos
y>x^2
y<2x+1
```

Parametric Equations

```desmos
(cos(t), sin(t))
```

Polar Equations

```desmos
r=2cos(theta)
```

Interactive Elements

Sliders

```desmos
//Create a slider
a=1
y=ax^2
```

Points with Labels

```desmos
A=(1,2)
B=(3,4)
(A_x, A_y)
```

Advanced Applications

Function Family

```desmos
//config: {
  "bounds": {"x": [-5, 5], "y": [-5, 5]}
}
a=1
y=ax^2
y=(a+1)x^2
y=(a+2)x^2
```

Geometric Construction

```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)
```

Best Practices

  1. Configuration

    • Always set appropriate bounds for your graph
    • Consider whether expressions list should be visible
    • Use grid when it aids understanding
  2. Clarity

    • Use descriptive variable names
    • Add comments for complex constructions
    • Keep expressions organized
  3. Performance

    • Limit number of expressions for better performance
    • Avoid unnecessarily complex calculations
    • Use reasonable domains for functions
  4. Accessibility

    • Provide clear labels for axes when relevant
    • Use appropriate zoom levels
    • Consider color contrast for visibility

Common Use Cases

For Teaching Math

```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
```

For Physics Problems

```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
```
⚠️ **GitHub.com Fallback** ⚠️