Constants and operators
Constants
Section titled “Constants”π ≈ 3.14159
y = sin(pi x)τ = 2π ≈ 6.28318
(cos(t), sin(t)) @ domain: 0..tauGreek letter θ
The polar angle. r = … in terms of theta is a polar curve, and theta cannot be defined.
r = 1 + cos(theta)Euler’s number ≈ 2.71828
y = e ^ xinfinity
Section titled “infinity”∞
a = 1 / infinityb = arctan(infinity)Boolean true
A metadata value only: Desmos has no booleans in an expression.
(1, 2) @ showLabel: true, label: "P"Boolean false
A metadata value only: Desmos has no booleans in an expression.
y = x @ lines: falseGreek letters
Section titled “Greek letters”Written out, a Greek letter is drawn as the letter. It is a name like any other: it may be defined, used as a parameter, or left undefined for Desmos to offer as a slider.
| Name | Letter |
|---|---|
alpha | α |
beta | β |
gamma | γ |
delta | δ |
epsilon | ε |
zeta | ζ |
eta | η |
iota | ι |
kappa | κ |
lambda | λ |
mu | μ |
nu | ν |
xi | ξ |
rho | ρ |
sigma | σ |
phi | φ |
chi | χ |
psi | ψ |
omega | ω |
Gamma | Γ |
Delta | Δ |
Theta | Θ |
Lambda | Λ |
Xi | Ξ |
Pi | Π |
Sigma | Σ |
Phi | Φ |
Psi | Ψ |
Omega | Ω |
Operators
Section titled “Operators”Words Desmos reads as operators rather than as functions or variables. None of them takes parentheses.
Viewport width, in graph units
Follows the viewport as it is panned and zoomed.
x = width / 4height
Section titled “height”Viewport height, in graph units
Follows the viewport as it is panned and zoomed.
y = height / 4List comprehension: [i ^ 2 for i = [1…10]]
Builds a list by running the expression before it over every element of a list. More than one binding, for i = A, j = B, runs over every pair.
S = [i ^ 2 for i = [1...10]][(i, i ^ 2) for i = [1...5]]Local definition: f(x) = x n with n = length(a)
Substitutes values into the expression before it. The bindings run to the end of the bracket or statement.
y = a x ^ 2 with a = 0.5The element’s 1-based position, inside a list filter or a clickable action
Which element of a list was clicked, counting from 1.
n = 0P = [(1, 1), (2, 2), (3, 3)] @ onClick: n -> index, pointSize: 20Milliseconds since the last tick - only valid in a ticker handler
Written anywhere but the ticker’s handler it is an error, dt-outside-ticker.
n = 0ticker n -> n + dt @ playing