mirroredVase function
Half a vase, lathed with a 180° sweep and mirrored across the plane it already touches.
Why a half sweep rather than a whole one mirrored again. mirror's
own doc comment describes its ordinary case as a base that already
touches the plane it is reflected across — a lathe swept from -π/2 to
π/2 puts both its open edges exactly on the plane x = 0 (cos(±π/2) == 0), which is precisely that case rather than a shape built to sit near
the plane by construction. mesh-41's own row is the reason this picture
is named for the mirror rather than for the vase: a whole lathed vase
would look identical whether or not mirror ran at all.
Implementation
EditMesh mirroredVase() {
final half = ParametricLathe(
profile: <Vector2>[
Vector2(0, -0.75),
Vector2(0.34, -0.75),
Vector2(0.20, -0.55),
Vector2(0.42, -0.15),
Vector2(0.46, 0.25),
Vector2(0.26, 0.55),
Vector2(0.34, 0.75),
],
segments: 12,
startAngle: -math.pi / 2,
sweepAngle: math.pi,
name: 'half-vase',
).toEditMesh();
return mirror(half, normal: Vector3(1, 0, 0), mergeDistance: 1e-4);
}