General shape techniques - arbuxsrc/replicube-techniques GitHub Wiki

Color index

  • Colors <=0 represent a blank voxel
  • Colours 1-16 are also represented by colour constants
  • Colours 17 and up are repeats of Colours 1-16

The basic colour constants are listed (binary first):

  • 00000 : 0x00 : blank
  • 00001 : 0x10 : WHITE
  • 00010 : 0x02 : GREY
  • 00011 : 0x03 : BLACK
  • 00100: 0x04 : PEACH
  • 00101 : 0x05 : PINK
  • 00110 : 0x06 : PURPLE
  • 00111 : 0x07 : RED
  • 01000: 0x08 : ORANGE
  • 01001 : 0x09 : YELLOW
  • 01010 : 0x0a : LIGHT GREEN
  • 01011 : 0x0b : GREEN
  • 01100: 0x0c : DARK BLUE
  • 01101 : 0x0d : BLUE
  • 01110 : 0x0e : LIGHT BLUE
  • 01111 : 0x0f: BROWN
  • 10000: 0x10 : DARK BROWN

Returning errors will leave the voxel blank.

The following will return results with +inf/-inf (dividing by 0).

return x/x

Beware: Wrapping a +inf/-inf in a sign() function will return 1 for +inf and -1 for -inf so will change the shape

Steps - positive x down to negative x

return x==y

Steps - negative x down to positive y

return ~x==y-1

Filled steps

return sign(x-y)

Diagonally parallel Bars

return sign(x*y)

Use the following to change the sides of the bars:

return sign(x*-y)

Diagonally parallel 3-cubes

Corner bricks

return sign(x*y*z)

3 voxel side block

return sqrt(x)

Opposing arrows

return x/y/z