Monorepo for Aesthetic.Computer aesthetic.computer

Aesthetic Computer Programming Basics#

Writing and publishing a piece on aesthetic.computer involves programming against an easy to learn JavaScript API while using the VS Code extension.

Follow the setup guide to get started.

Graphics#

wipe()
  • wipe() Yields a random color
  • wipe(colorName) Such as "red" or "hotpink" (CSS)
  • wipe(red, green, blue) Each from 0-255
  • wipe(gray) Grayscale from 0-255
  • wipe(paletteName) Try "rainbow"
Clear the screen with a given color.
ink()
  • ink() Chooses a random color
  • wipe(colorName) Such as "red" or "hotpink" (CSS)
  • ink(red, green, blue) Each from 0-255
  • ink(red, green, blue, trans) Including transparency
  • ink(gray) Grayscale from 0-255
  • ink(gray, trans) Grayscale with transparency
  • ink(paletteName) Try "rainbow"
Set the color for future graphics functions like line or box.
point()
  • point() Paint a random point
  • point(x, y) At specific coordinates
Plot a pixel at position x, y.
line()
  • line() Paints a random line
  • line(Ax, Ay, Bx, By) From 0 on up starting at top left
Paint a 1px thick line from point A to B.
box()
  • box() A random box
  • box(x, y, size) Square from top left corner
  • box(x, y, w, h) Rectangle from top left corner
  • box(x, y, size, mode) Square with mode
  • box(x, y, w, h, mode) Rectangle with mode
  • mode
  • center  - paints a box from the center

    outline - paints the outline of a box
    inline  - the opposite of outline
    (thicken with : like outline:4)
    combine modes with * like outline*center or inline:3*center
Paint a rectangle.
circle()
  • circle() A random circle
  • circle(x, y, radius) Circle from center
  • circle(x, y, radius, filled) Set to false for outline
  • circle(x, y, radius, filled, thickness) Set outline thickness
Paint a circle.
oval()
  • oval() A random oval
  • oval(x, y, w, h) Oval from center with width & height
  • oval(x, y, w, h, filled) Set to false for outline
  • oval(x, y, radius, filled, thickness) Set outline thickness
Paint an oval.
shape()
  • shape() A random shape
  • shape(x, y, x, y, ...) Shape from a list of points
  • shape({ points: [x, y, ...], filled: false }) Outline only
Paint any shape with points.
poly()
  • poly() A random scribble
  • poly([[x, y], [x, y], ...]) Line from a list of points
Paint connected lines with points.
flood()
  • flood() Fill a random location.
  • flood(x, y) Line from a list of points
Fill connected pixels of the same color and return a list of them.
write()
  • write("text") A word in a random location
  • write("text", x, y) Or at specific coordinates
Write text on the screen.

Sound#

Action#

Number#