To continue writing down ideas I ought to have written: I like the idea of making computer parts from scratch, impracticable as it may be for producing a machine which meets contemporaneous performance expectations. I like the idea of reversible computing. As well, I also enjoy playing with the idea of analog computing. These things entwine together in a series of thoughts that begin with observation the observation that a Fredkin gate, in addition to being reversible, outputs the same number of each value as it receives as input.
This means that even if the two values are represented by a phenomenon which embodies different energy levels, the output can embody the same amount of energy as the input. Further, it can do so without the output using different energy levels for each value than the input! If there were a continuous version of this, I figured it'd be pretty handy for designing analog computers.
The reason I thought this was that I was already looking into ways to make reversible analog computers, as I wanted to see if the reversibility would result in substantially reduced noise in the system and thus a higher precision of results for a given level of quality of components. That in turn just seems generally useful for making computers from scratch.
So, the first thought I had was that what I'm doing would have something to do with affine transformations, as earlier research and discussion called my attention to the fact that affine transformations are both reversible and continuous functions. Specifically, rotation seemed like a good option, since if I'm taking the two inputs to be swapped as the X and Y coordinates, and the controlling input as rotation, then rotating 90 degrees should do something like swap them? More like invert them both, really.
At the moment, I was more interested in getting around the part where I don't want a circular arc, since that clearly wouldn't preserve the part where the sum of the outputs match the sum of the inputs. So I tried looking a thing where, before rotation, perform a transformation where I take the Chebyshev distance of the point and turn it into a point with the same angle from the origin but with Euclidean distance, and reverse the transformation after.
This ended up making the function for the X/Y coordinate inputs over the rotation input equivalent to what I'll call trapezoid waves, since that's what they look like, and a simpler way to implement the result is to just make a triangle wave and then use min and max functions to clip off the distance. However, I notice then that this still doesn't actually conserve the sum-invariance property I wanted! So then I thought, hey, if I rotate it 45 degrees normally first, then just do a the triangle waves without clipping them, I'm now going around the edge of a Manhattan distance circle instead of a Chebyshev distance one!
So that actually worked, but only if I presume the signal values can be negative, which might not be true of whatever computing media I go with. Otherwise I'm stuck in the upper right corner. I guess I could just use a different offset for the triangle waves so the function for any given X/Y input just covers the diagonal line where X+Y is constant. Maybe that actually would work? Something about it just didn't feel right to me, though.
So, I decided to make a function that takes X,Y, and Z inputs and well as the control/rotation, and does a function that for each input is just a triangle wave clipped at the bottom, but for all three of them ends up tracing the perimeter of a triangular wafer cut from a cube. So there we go! Maybe some time I'll try using it for a thing. Also, here it is on a web-based graphing calculator: https://www.desmos.com/calculator/rslh0cvwrk
Edit: Just realized I could generalize this to rotating arbitrary points by having each input other than the control ran through the function alongside its two neighboring inputs. Though also, it seems that I'm wrong about this version of the function doing what I want at all, as actually checking (I1+I2+I3)-(O1+O2+O3) shows that it in fact not produce a function f(r) that only produced an output of zero? So I'll need to keep working on this I guess.
Edit2: Oh, nice, I managed to fix the thing I was making! Working cube slice gate function: https://www.desmos.com/calculator/15wnxj923y
This means that even if the two values are represented by a phenomenon which embodies different energy levels, the output can embody the same amount of energy as the input. Further, it can do so without the output using different energy levels for each value than the input! If there were a continuous version of this, I figured it'd be pretty handy for designing analog computers.
The reason I thought this was that I was already looking into ways to make reversible analog computers, as I wanted to see if the reversibility would result in substantially reduced noise in the system and thus a higher precision of results for a given level of quality of components. That in turn just seems generally useful for making computers from scratch.
So, the first thought I had was that what I'm doing would have something to do with affine transformations, as earlier research and discussion called my attention to the fact that affine transformations are both reversible and continuous functions. Specifically, rotation seemed like a good option, since if I'm taking the two inputs to be swapped as the X and Y coordinates, and the controlling input as rotation, then rotating 90 degrees should do something like swap them? More like invert them both, really.
At the moment, I was more interested in getting around the part where I don't want a circular arc, since that clearly wouldn't preserve the part where the sum of the outputs match the sum of the inputs. So I tried looking a thing where, before rotation, perform a transformation where I take the Chebyshev distance of the point and turn it into a point with the same angle from the origin but with Euclidean distance, and reverse the transformation after.
This ended up making the function for the X/Y coordinate inputs over the rotation input equivalent to what I'll call trapezoid waves, since that's what they look like, and a simpler way to implement the result is to just make a triangle wave and then use min and max functions to clip off the distance. However, I notice then that this still doesn't actually conserve the sum-invariance property I wanted! So then I thought, hey, if I rotate it 45 degrees normally first, then just do a the triangle waves without clipping them, I'm now going around the edge of a Manhattan distance circle instead of a Chebyshev distance one!
So that actually worked, but only if I presume the signal values can be negative, which might not be true of whatever computing media I go with. Otherwise I'm stuck in the upper right corner. I guess I could just use a different offset for the triangle waves so the function for any given X/Y input just covers the diagonal line where X+Y is constant. Maybe that actually would work? Something about it just didn't feel right to me, though.
So, I decided to make a function that takes X,Y, and Z inputs and well as the control/rotation, and does a function that for each input is just a triangle wave clipped at the bottom, but for all three of them ends up tracing the perimeter of a triangular wafer cut from a cube. So there we go! Maybe some time I'll try using it for a thing. Also, here it is on a web-based graphing calculator: https://www.desmos.com/calculator/rslh0cvwrk
Edit: Just realized I could generalize this to rotating arbitrary points by having each input other than the control ran through the function alongside its two neighboring inputs. Though also, it seems that I'm wrong about this version of the function doing what I want at all, as actually checking (I1+I2+I3)-(O1+O2+O3) shows that it in fact not produce a function f(r) that only produced an output of zero? So I'll need to keep working on this I guess.
Edit2: Oh, nice, I managed to fix the thing I was making! Working cube slice gate function: https://www.desmos.com/calculator/15wnxj923y