home/ atoms/ punctual-coordinate-system

Punctual uses a normalised -1 to 1 coordinate space with (0,0) at the centre of the screen

In Punctual’s visual output, coordinates are normalised: the left edge of the screen is x=-1, the centre is x=0, the right edge is x=1; similarly the bottom edge is y=-1, the top is y=1. Shapes (circle, rect, vline, hline, point) take positions in this space. The size/radius parameter is also in the same units — circle [0,0] 0.25 draws a circle of radius 0.25 at the centre. The m suffix on frequencies (e.g. 60m) means MIDI note number, so 60m is middle C at 261.6 Hz.

Examples

circle [0,0] 0.25 >> rgb       -- white circle at centre
circle [-0.5,0.8] 0.75 >> rgb  -- large circle, top-left
vline 0 0.002 >> rgb           -- thin vertical line at centre

Assessment

Without running code, predict where circle [0.5, -0.5] 0.1 appears on the screen; then write the expression that places a circle of radius 0.3 in the top-right quadrant.

“the left edge of the screen being -1, the centre being 0 and the right edge being 1”
corpus · estuary-collaborative-browser-live-coding-platform-networked · chunk 58