riemann

An n × n grid of boxes over a rectangle, each as tall as the surface at its sample point — the sum a double integral is the limit of. n is parametised, so a slider re-divides the rectangle. Space only.

riemannNode
Sixty-four boxes under the hill z = 16 − x² − 2y², their tops tracing its shape, and the hill itself as a faint surface over them.Sixty-four boxes under the hill z = 16 − x² − 2y², their tops tracing its shape, and the hill itself as a faint surface over them.

#Attributes

ofRequiredImplicitAnimatable
The surface the boxes stand under.
surface-of
Also written: underCan be written as shorthand: riemann:value
xRequiredAnimatable
The rectangle along x.
yRequiredAnimatable
The rectangle along y.
nAnimatable
How many boxes along each side.
Default4
sampleAnimatable
Where each box reads its height: the middle of its cell, or its lower or upper corner.
midpointlowerupper
enum
Defaultmidpoint
colourAnimatable
Its colour — orange when not given. Faces are shaded in steps of the hue by how squarely they face a light fixed to the camera.
bluelight-bluedark-blueredlight-reddark-redorangelight-orangedark-orangeyellowlight-yellowdark-yellowteallight-tealdark-tealgreenlight-greendark-greenpinklight-pinkdark-pinkpurplelight-purpledark-purplegreylight-greydark-greyneutralhex(…)rgb(…)
Also written: color
Defaultorange
opacityAnimatable
How solid it is, 0 to 1.
Default0.85
label
Words drawn beside it, over everything.
hiddenAnimatable
Declared but not drawn — animatable, so hidden: true !cue.to{false}(at: 2) is its reveal.
Defaultfalse
lock
A reader may not edit it.
Also written: locked
Defaultfalse
layerAnimatable
Accepted for parity with the flat marks; in space the paint order is depth.

#Derived attributes

Computed while the element renders — read one with #id.name in attribute position or {{#id.name}} in prose, never set.

valueDerived
The sum of the boxes' volumes. Cite it with {{#id.value}}.

#Examples

Sixteen boxes under z = 16 − x² − 2y² over [0, 2] × [0, 2], each as tall as the surface at its midpoint, inside the solid they approximate.Sixteen boxes under z = 16 − x² − 2y² over [0, 2] × [0, 2], each as tall as the surface at its midpoint, inside the solid they approximate.
graph:xyz{
    solid(of: 16 - x^2 - 2 * y^2; x: [0, 2]; y: [0, 2]; opacity: 0.2)
    riemann(of: 16 - x^2 - 2 * y^2; x: [0, 2]; y: [0, 2]; n: 4)
}(
    x domain: [0, 2]
    y domain: [0, 2]
    z domain: [0, 16]
)
Eight by eight boxes under the same hill, each read at its lower corner, so every box overshoots the surface.Eight by eight boxes under the same hill, each read at its lower corner, so every box overshoots the surface.
graph:xyz{
    surface(expression: 16 - x^2 - 2 * y^2; opacity: 0.3)
    riemann(of: 16 - x^2 - 2 * y^2; x: [0, 2]; y: [0, 2]; n: 8; sample: lower; colour: teal)
}(
    x domain: [0, 2]
    y domain: [0, 2]
    z domain: [0, 16]
)

Last updated