teaching machines

The Revolution Was Madeup

October 15, 2014 by . Filed under madeup, public.

Madeup now supports surfaces of revolution. Trace out a radially-symmetric cross-section of an object, then spin it around the object’s central axis some number of degrees using the revolve command to form a solid. The variable nsides determines how many intermediate stops are made as the cross-section is spun.

I offer a few examples of the revolve command in action.

Barbell

A barbell formed by walking half of its cross-section and then spinning it around its central axis.

A barbell formed by walking half of its cross-section and then spinning it around its central axis.

barRadius = 5
bellRadius = 10
deltaRadius = bellRadius - barRadius
barLength = 20
bellLength = 10

yaw 90
moveto 0 0 0
yaw 90
move bellRadius
yaw -90
move bellLength
yaw -90
move deltaRadius
yaw 90
move barLength
yaw 90
move deltaRadius
yaw -90
move bellLength
yaw -90
move bellRadius

nsides = 50
revolve 1 0 0 360

Vase

This vase's cross-section is a vertically-oriented sign wave.

This vase’s cross-section is a vertically-oriented sign wave.

nsides = 100

-- trace outside
moveto 0 0 0
for i through 10
  moveto (4 + sin (360 * i / 10)) i 0
end

-- trace inside
for i through 9
  moveto (3.5 + sin (360 * (10 - i) / 10)) (10 - i) 0
end
moveto 0 1 0

revolve 0 1 0 360

Pie Sans Wedge

The path doesn't need to be revolved a full 360 degrees. The holes are automatically capped.

The path doesn’t need to be revolved a full 360 degrees. The holes are automatically capped.

nsides = 50
moveto 0 0 0
yaw 90
move 3
yaw -90
move 1
yaw -90
move 3
revolve 0 1 0 270