BrushCue Example: Trapezoid Area¶

Open In Colab

You can use this tool online at https://www.brushcue.com/tools/trapezoid-area

In [ ]:
!pip install brushcue
In [1]:
import brushcue as bc

base_a = 4.0
base_b = 6.0
height = 3.0
graph = bc.Float.divide(bc.Float.multiply(bc.Float.add(base_a, base_b), height), 2.0)

ctx = bc.Context()
print(graph.execute(ctx))
15.0
[wgpu] using backend Metal — adapter 'Apple M5' (IntegratedGpu), driver ''