Remember, all the triac circuit sees is the
difference signal between input and output - and you have to show us that (or see it yourself). Not a trivial thing to get a scope trace on. Typically, that difference is put through an RC network, which feeds the triac input (which is a series diac), and when the diac fires - delayed by the RC - that's when the triac turns on. Since that RC is integrating whatever shows up between the input and output terminals of the dimmer, any change in that waveform will change the on-time...so it's practically impossible to "regulate" that unless you come up with a from-scratch driver for the gate to main terminal signal (probably need to send pulses transformer coupled, off a separate AC reference with variable phase delay to get it constant).
Here's your pic. As you sent me the picture, your software had somehow destroyed the image sizing information in the jpeg header, or it didn't agree with the actual file data (you can't just change the header and not re-sample the image too) - it's not a bug here on the board, it's a bug with your photo editor or something. I simply opened it, then saved it in "the gimp", the linux tool I use, which figured that out and fixed the non-spec header in the image file. Most free jpg editing software ought to get that one right - but whatever you did, didn't.
- test upload