section

Where a plane x = c or y = c cuts a solid or a revolution: the area under the trace, or a disc or washer. With a width: it is a slab that thick, centred on the cut. A revolution about x is cut at x only. Space only.

sectionNode
The solid under a hill over the triangle below y = 2 − x, faint, with a red slab cut through it at x = 0.8.The solid under a hill over the triangle below y = 2 − x, faint, with a red slab cut through it at x = 0.8.

#Attributes

ofRequiredImplicit
The solid or revolution it cuts, by #id.
Can be written as shorthand: section:value
xAnimatable
Cut at x = c.
yAnimatable
Cut at y = c.
widthAnimatable
How thick the slab is; 0 is the cut itself.
Default0
colourAnimatable
Its colour — red 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
Defaultred
opacityAnimatable
How solid it is, 0 to 1.
Default0.8
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.

#Examples

A slab 0.15 thick cut at x = 1 through the solid under z = 16 − x² − 2y² over [0, 2] × [0, 2].A slab 0.15 thick cut at x = 1 through the solid under z = 16 − x² − 2y² over [0, 2] × [0, 2].
graph:xyz{
    solid#body(of: 16 - x^2 - 2 * y^2; x: [0, 2]; y: [0, 2]; opacity: 0.25)
    section(of: #body; x: 1; width: 0.15)
}(
    x domain: [0, 2]
    y domain: [0, 2]
    z domain: [0, 16]
)
The cut at y = 0.5 through the solid under 4 − x − y over a triangle: the area under the trace, with no width.The cut at y = 0.5 through the solid under 4 − x − y over a triangle: the area under the trace, with no width.
graph:xyz{
    solid#wedge(of: 4 - x - y; x: [0, 2]; y: [0, 2 - x]; opacity: 0.25)
    section(of: #wedge; y: 0.5; colour: orange)
}(
    x domain: [0, 2]
    y domain: [0, 2]
    z domain: [0, 4]
)

Last updated