Crystal Generator

Overview
The Crystal Generator is a simulated machine that takes a shape signal and a color signal as inputs and outputs the same shape where any pins or empty quadrants have been replaced by crystals of the given color. The shape input is received on the rear of the machine and the color input on the side. If either input is null, the output is null. Example transformations documented include Su--Su-- plus color-r producing SucrSucr, and P-P-P-P-:RuRu---- plus color-b producing cbcbcbcb:RuRucbcb.
Crystals are a special part type that are generated specifically by the Crystal Generator. Crystals behave differently from regular shape parts: they are fragile, they do not change color once created, and they follow connectivity rules that determine whether they shatter. Two crystal parts are considered connected when they are directly adjacent on the same layer (corners/diagonals do not count) or when they are directly above or below each other. Differently colored crystals and crystals created at different times are still treated as connected if they meet these adjacency rules. Crystals cannot gain or lose color when passed through Painters or additional Crystal Generators; they remain the original color they were created with.



Pins and empty quadrants are the locations replaced by crystals when a shape passes through the Crystal Generator. Pins are produced by the 
Practical notes:
- Inputs: shape on the rear, color on the side; null in either input yields null output.
- The Crystal Generator replaces pins and empty quadrants with crystals in the provided color.
- Crystals are immutably colored once created and remain unchanged by Painters or subsequent Crystal Generators.
- Crystals shatter if they fall or if they are separated from connected crystals; shattering propagates to all connected crystals.
- Connectivity: crystals connect only orthogonally on the same layer or vertically above/below; diagonals do not connect.
- Because pins do not connect horizontally, pins can enable configurations that otherwise would be floating; those pins will be converted to crystals by the Crystal Generator.
- Shape gravity and the group-fall process apply after Crystal Generator operations; any crystals inside groups that fall will be destroyed.
- Vertically connected crystals that are separated by an Unstacker do not shatter during that unstacking process.