PrinterKit | Wiki

Oscillators

Oscillator scaling functions can be used to modify values over an extrusion. They have the following signature: Osc(OscType type, float amplitude, float cycleCount, float center)


Oscillator Types
OscType.SAW
OscType.SINE
OscType.SQUARE
OscType.TRIANGLE

Oscillator Translation

Translate an extrusion using a sawtooth oscillator

hex = Hexagon(3)
shape = extrude(hex, 20)
shape.translateXY = Osc(OscType.SAW, 1, 2.9)
shape.stepCountHint = 100
render(shape)

alt text


Oscillator Scaling

Scale an extrusion using a triangle oscillator

circle = Circle(3)
shape = extrude(circle, 20)
shape.scaleXY = Osc(OscType.TRIANGLE, 1, 2, 1.5)
shape.stepCountHint = 100
render(shape)

alt text