home/ atoms/ punctual-rgb-channel-distribution

Providing a list of values to a Punctual shape distributes results across red, green, and blue channels

In Punctual, most shape functions accept a list of numbers in place of a single number. When a list is provided, each value is applied to a successive output channel: red, green, blue. So vline [-0.25,0,0.25] 0.002 >> rgb draws three vertical lines simultaneously — one in red (at x=-0.25), one in green (at x=0), one in blue (at x=0.25). Similarly circle [-0.25,0,0.25,0,0,0] 0.25 >> rgb draws three circles each in a primary colour. This is the primary way to create multi-colour visuals in Punctual without using blend operators.

Examples

vline [-0.25,0,0.25] 0.002 >> rgb    -- R/G/B vertical lines
circle [-0.25,0,0.25,0,0,0] 0.25 >> rgb  -- R/G/B circles

Assessment

Describe and then write the Punctual expression that draws one yellow horizontal line (yellow = red + green) at y=0.5.

“When we do this we get different results on different”
corpus · estuary-collaborative-browser-live-coding-platform-networked · chunk 58