mdude: Yellow and green ink blot style image. (Default)
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
mdude: Yellow and green ink blot style image. (Default)
So, I was thinking about how in 3D modeling, if you're just mucking about in a program with little to no direction, one problem you might run into is dissolving some vertex, point, or face, and end up with an object that has poorly formed or connected faces. I was wondering if maybe there could be a mode of 3D editing that was a bit more resilient against that. At the same time I was wondering if it'd be a fun thing to play with a silly rendering system that drew things geometrically instead of breaking things down into triangles even though there's plenty of reason no current 3D rendered does that.

Then I considered that if everything is being rendered as a collection of triangles, maybe everything could be represented as a collection of tetrahedrons? Like maybe any 3D solid one might make in a rendered could be topologically identical to the outer boundary of some fully collected set of cells within a tetrahedral honeycomb? I'm not entirely sure, but either way I think a 3D modeler where you connect tetrahedral cells and distort them to correct proportions via continuous map functions could be pretty fun to play with and be good for sketching out low-poly designs. Guess that'll be something to work on sometime.

Edit(Sept. 12, 2017, 12:03PM): Thinking about it later, I thought of a probelm that might come up with doing this, but then I forgot it. So yeah, I'll see if it's fun to play with anyway and keep trying to think of ways to just kind of toss data at a renderer and somehow tend to get shapes that avoid clipping with themselves without really trying just because of hwo the math works out.
mdude: Yellow and green ink blot style image. (Default)
Something I've been playing with is the idea of computer programs which produce other computer programs via probabilistic selection. Basically similar to the idea of Markov chain generated text or procedurally generated images, but with code.

The previous instance I created in SmileBASIC for the 3DS, which was lost when the 3DS broke and I replaced it. For output, I only got it to print numbers, which were calculated by a series of randomly generated math expressions. Constant values were added, and later variables, with a simple naming scheme of [variable type][index number] so as to easily keep track of what variable names were in use by simply counting the number of each variable type created.

To begin with, though, I was testing the control flow system with calls to the RND in place of expressions. Each time a code block deliminator was selected, it would then be decided whether to go one nesting level up or down, based on the length of the program and the current nesting level depth. The type of code block was chosen when starting it, and remembered in a stack for when it was exited. When exiting a nesting layer was chosen when there were none left, the program end was written.

This produced amusing enough results for a while, though now that I'm starting over I think I'll try things a little differently, and as I'm making it a little more complex I figure I'll write down my thoughts somewhere before I go far in it, which is why I'm doing exactly that here. I'm using javascript this time, mostly so I can easily upload it to link to various people I know without them having to get a particular 3DS program to run it. As such, I'll be making some use of objects and whatever other elements of javascript that seem handy.

While I could have done so on the 3DS, I think this time I'll make an effort to focus on graphics, and try imposing a simple control structure to generated programs, working towards something that could possibly make things vaguely game-like with a much higher probability. I'm thinking at the very least setting up distinct input, process and output phases for the main game loop, plus maybe a setup and maybe a menu system. I'd like it to veer a little more towards inscrutable nonsense than not though, so aside from that I don't think I'll be hard-coding anything like lives or objectives, maybe not even a particularly designated object to be a player character.

Might want to limit the number of draw functions their are though, to help give things a more unified graphical style per generated game despite the chaos of it. I do know that I'll want output phase functions to operate on specially designated variables that don't get read outside that phase and are blanked at the start of it, to better separate the processing in it from the actual process phase. A sort of arbitrary designation, but it's something I thinking could be useful in organizing my manually made javascript games, and it just seems like I'd be more interesting in the kind of quirks created by such a system than by one that makes graphics randomly throughout the program.

Profile

mdude: Yellow and green ink blot style image. (Default)
Meticulac

March 2019

S M T W T F S
     12
34567 89
10 111213141516
17181920212223
24252627282930
31      

Syndicate

RSS Atom

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 15th, 2025 03:03 pm
Powered by Dreamwidth Studios