$\mathsf{length = %v}$

$\mathsf{width = %v}$

$\mathsf{height = %v}$

#6557D2

$\text{RESET VIEW}$

$\text{NEW PRISM}$

\text{Count blocks}

allRandoms = RandomUniform(0, 0.99, 200)
numRandoms: 3
countQuestion = 0
randIndex: (Mod[countQuestion, floor(Length[allRandoms] / numRandoms)] * numRandoms) + 1
currentRandomSeeds = Take(allRandoms, randIndex, randIndex + numRandoms - 1)
domainPoints = Flatten(Sequence[Sequence[Sequence[(w, l, h), l, 1, 5], w, 1, 5], h, 1, 5])
length: 1 + floor((currentRandomSeeds(2) * 5))
width: 1 + floor((currentRandomSeeds(3) * 5))
height: 1 + floor((currentRandomSeeds(1) * 5))
Dims = Corner(5)
xMin: -7.71231
yMin: -7.71231
zMin: -4.04968
xMax = 7.71231 (slider from -5 to 10)
yMax: 7.71231
zMax: 11.04968
DefaultViewDirection: (-0.6022, -0.66881, -0.43593)
CurrentViewDirection = CornerThreeD(-1, 11)
textDimensions: "\fbox{
\begin{array}{c}
LENGTH =" + (LaTeX[length]) + "\\\\\\\\
WIDTH=" + (LaTeX[width]) + "\\\\\\\\
HEIGHT=" + (LaTeX[height]) + "
\end{array}
}"
textLength: "" + (LaTeX[length]) + ""
textWidth: "" + (LaTeX[width]) + ""
textHeight: "" + (LaTeX[height]) + ""
LengthPoint: (length / 2, width + 2, 1)
WidthPoint: (length + 2, width / 2, 1)
HeightPoint: (-1, width, 1 + height / 2)
countBlocks = -1 (slider from -1 to vol, step 1)
vol: ((length * width) * height)
startL: {0, 5, 10, 15, 20}
startH: {1, 26, 51, 76, 101}
hts = First(startH, height)
lens = First(startL, length)
startRows = Flatten(Sequence[Sequence[lens(n) + hts(t), n, 1, Length[lens]], t, 1, Length[hts]])
pointInds = Flatten(Sequence[Sequence[startRows(n) + k, k, 0, width - 1], n, 1, Length[startRows]])
baseQuad, edgeBase9, edgeBase10, edgeBase11, edgeBase12 = Polygon((0, 0, 1), (length, 0, 1), (length, width, 1), (0, width, 1))
basePrism, BasePrismH1, BasePrismH2, BasePrismH3, BasePrismH4, baseFace1, baseFace3, baseFace4, baseFace2, baseFaceTop, edgeBase1, edgeBase2, edgeBase3, edgeBase4, edgeBase5, edgeBase7, edgeBase8, edgeBase6 = Prism(baseQuad, height)
startPositions = Zip(domainPoints(p), p, pointInds)
textVolume: "\textsf{Volume}=" + (LaTeX[((length * width) * height)]) + "\textsf{ cubic units}"
PointCorners: {(0, 0, 1), (length, 0, 1), (length, width, 1), (0, width, 1), (length, width, height + 1), (0, 0, height + 1), (0, width, height + 1), (length, 0, height + 1)}
dists: {abs(x(CurrentViewDirection) - x(DefaultViewDirection)), abs(y(CurrentViewDirection) - y(DefaultViewDirection)), abs(z(CurrentViewDirection) - z(DefaultViewDirection))}
positioned: true ∈ Zip[n > 0.1, n, dists]
tabOrder: {countBlocks, btnResetView, btnNewPrism}
n: 16
blockTopBottom = Sequence(Zip[Polygon[{n + (-1, -1, k), n + (0, -1, k), n + (0, 0, k), n + (-1, 0, k)}], n, First[startPositions, countBlocks]], k, 0, 1)
blockFrontBack = Sequence(Zip[Polygon[{n + (-1, k, 0), n + (0, k, 0), n + (0, k, 1), n + (-1, k, 1)}], n, First[startPositions, countBlocks]], k, -1, 0)
blockLeftRight = Sequence(Zip[Polygon[{n + (k, -1, 0), n + (k, 0, 0), n + (k, 0, 1), n + (k, -1, 1)}], n, First[startPositions, countBlocks]], k, -1, 0)
blockOutline = Zip(Prism[Polygon[{n + (-1, -1, 0), n + (0, -1, 0), n, n + (-1, 0, 0)}], 1], n, First[startPositions, countBlocks])
blockOutlineStart = Zip(Prism[Polygon[{n + (-1, -1, 0), n + (0, -1, 0), n, n + (-1, 0, 0)}], 1], n, startPositions)