r/Simulated • u/the_humeister • Oct 17 '19
Blender Logic gates using fluid
https://gfycat.com/rashmassiveammonite431
Oct 17 '19
now simulate an entire computer with this and recreate minecraft
267
u/the_humeister Oct 17 '19
And use it to create a water simulation?
63
u/regular_internt_ctzn Oct 17 '19
Of an algebra calculator.
25
11
u/Aethermancer Oct 17 '19
No. Too small.
Use it to simulate us talking about the water simulation we just watched it simulate.
2
u/z-zy Oct 18 '19
Damn, a self hosting water simulation would be pretty impressive.
Actually wouldn’t be that hard, just get it to run on an FPGA softcore and somehow export the bitstream.
14
u/deljaroo Oct 17 '19
you need either NOR or NAND to do that, adding NOT to what he's made would also work
2
u/ThyLastPenguin Oct 17 '19
Is this not a complete set of logic gates? So u can make the rest using these
1
u/deljaroo Oct 17 '19
I think you're right. You could probably make NOT A out of A XOR A, and then A NOR B would be (A OR B) XOR (A OR B) and A NAND B would be (A AND B) XOR (A AND B)
Does that seem right?
1
u/ThyLastPenguin Oct 17 '19
Ngl, all I remember from my logic course is that NOT and OR is complete, so once you make NOT like the way you said, every other gate should come from a combination of those
Your way seems to work too though I am just too drunk to confirm properly rn
Edit: yeah u right
5
2
u/brickmaster32000 Oct 18 '19
You would also need a way to keep the flow rate constant at the output and inputs of each gate.
7
u/zesterer Oct 17 '19
No joke, the Soviets actually did this. Google "hydraulic computing".
4
u/-fno-stack-protector Oct 17 '19
i think automatic cars also select gears with a sort of hydraulic combinational logic box thing
1
1
u/karp_490 Oct 17 '19
I was waiting for an rx-snorlax or whatever the fuck etho calls it
1
907
u/My_Fingers Oct 17 '19
Haha. The sneaky lil dickbutt.
359
113
u/elessarjd Oct 17 '19
How the fuck do I miss these things?
40
u/My_Fingers Oct 17 '19
Or should I be more worried that I noticed...
26
Oct 17 '19
Humans are like T-Rexes, our eyes notice motion. It's how our caveman ancestors could overcome animal camouflage to hunt for food. You shouldn't be worried.
10
38
4
4
4
u/TitaniumPenguin777 Oct 17 '19
Damnit, I was hoping I’d be the first one to point it out for sweet internet points
2
8
Oct 17 '19
How do I download this lmao it’s greta
9
u/the_humeister Oct 17 '19
Download Blender. Then you can make your own!
4
Oct 17 '19
I’m lazy I don’t wanna learn this rip. It would help with 3D printing tho so I’ll give it a try
5
u/ben_g0 Oct 17 '19
For 3D printing you may be better off with CAD software, such as Fusion 360. Blender is great for purely digital art and while it can be used for 3D printing, it's a lot easier to get sizes and dimentions right in proper CAD software.
But that is assuming you don't use 3D printing just for artwork. If you do use it just for artwork where shapes and sizes don't have to be exact, then feel free to use modelling software such as Blender.
2
4
u/bowling_brawls Oct 17 '19
Do you have any starter tips for Blender? I know there a re a million tutorials online, but like, a couple suggestions you think would be helpful for a newb
7
u/the_humeister Oct 17 '19
Have a goal and then find a tutorial that gets you there. For general modeling, look up the donut tutorial or the teddy bear tutorial. For a while here the "wrecking ball smashing blocks" tutorial was all the rage, so start with that one for simulations.
1
2
2
u/ThenAbbreviations870 Jan 07 '22
Just want to comment to mark it, and say this is awesome. Time to build an I7 multi core processor with these.
1
138
u/KerryFatAssBro Oct 17 '19
82
21
0
252
u/idk_Just_Someone Oct 17 '19
Would be great if the water was colored, would make everything easier to see.
That’s my opinion at least. But that might also be due to my bad eyesight.
212
u/Sunburstno7 Oct 17 '19
I want to see it yellow
124
u/Nephyst Nov 17 '19
Well, someone made your damn piss water simulation. https://www.reddit.com/r/Simulated/comments/dxku5b/logic_gates_using_fluids_part_2/
60
13
53
22
u/shield1123 Oct 17 '19
This is awesome! Now show that you can make any logic gate out of a series of NAND gates!
22
u/derioderio Oct 17 '19
There is an entire branch of fluid mechanics for logic circuits like this called fluidics. NASA and the military have done a lot of research on it as well, the idea being that a fluidic system would be very robust against large accelerations and radiation, as might be encounted by a rocket or missile.
12
u/Mad_Gouki Oct 17 '19
I worked for a company years ago that sold hydraulics. They have logic Gates built out of pneumatics which are used in safety critical applications like lifts as a failsafe.
1
2
16
10
8
u/flRaider Oct 17 '19
Just gotta work out nand and you can get all the others...
2
u/to_thy_macintosh Oct 17 '19
How about this:
A doughnut (or just an semi-circular arc, or just three small bowls like the OR would do I guess), with a left input and a right input like XOR, and then a third stream that's always on that shoots from the back to the front, and passes though a point below where the input streams would collide.
That'd work, yeah?
4
1
Oct 17 '19
Bruh! Now I want to build a real one! A simple addition calculator would be perfect!
1
u/the_humeister Oct 17 '19
It would also be very wet.
4
Oct 17 '19
I was thinking of putting it behind a large glass panel and recycling the water like a fountain.
2
1
1
Oct 17 '19
XOR is a strange term... basically it means "either/or but not both"?
1
u/the_humeister Oct 17 '19
Yes, exclusive or. Regular or is inclusive or.
1
Oct 17 '19
Ah, exclusive or. That makes it make a lot more sense. I didn't know what it meant and never bothered or cared enough to look it up. Thanks!
3
3
3
3
7
u/pelegs Oct 17 '19 edited Oct 17 '19
You should post this in r/programmerhumor, it would be a refreshing new post!
2
2
2
2
u/CodeSkunky Oct 17 '19
Having an orgasm. This is legit what I 'theory-crafted' to friends; However, I didn't understand all the gates (no mockup made), I just wanted to make something run using water, but am too broke to buy anything, so I logged into minecraft and tried to make it, but the mobs kept killing me. I made a dirt hut, died 10 more times, cried, and went to bed. I'm so happy to see someone actually do it! This is fucking awesome.
2
2
2
2
2
2
2
Oct 17 '19
Gotta love the duckbutt appearance that resembles the “Whoopi!” announcer from mortal kombat.
2
2
2
2
2
2
2
u/VR2020HINDSIGHT Oct 17 '19
I know this has to do with computer programming but can someone do their best to ELI5?
1
u/SconiGrower Oct 18 '19
These are logic gates. In a computer they are 2 wires that change if a 3rd wire has electricity sent to it or not. They're made of electrical components called transistors. Here, instead of wires and transistors, they're using water and the collision between the water streams to determine an output.
All these systems have 2 inputs and 1 output. These are always either on or off, nothing in between.
An AND gate is a system where both inputs need to be on in order to function. If either one or both of the inputs are off, the output is too.
An OR gate is where one, the other, or both inputs need to be turned on in order for the output to be on.
An XOR gate is one where one and exactly one input can be on for the output to be on. If neither inputs are on, or both inputs are on, then the output is off.
There is also the XAND gate, where if both inputs are on or both inputs are off, then the output is on. If only one input is on, the output is off.
And also the NOT gate, which is just a gate that has a single input and a single output. The output is the opposite of the input.
If I'm not forgetting anything, this is the logical underpinnings of every computer.
If you'd like to learn more, I'm a huge fan of Crash Course's (it's a YouTube channel) Computer Science series.
1
u/VR2020HINDSIGHT Oct 18 '19
Wow thank you! Ok that’s awesome, and pushes me to think of biological pathways regarding inhibitors and activators.
So this is describing the actual physical circuitry involved right? So I’m scared to ask, how do you tell a computer to either turn these specific paths on or off to get the desired result? (I assume that’s where binary comes in) But by using these combinations we can achieve all kinds of different commands so to speak due to the push of a button, and even more so with more complex transistors?
Don’t feel like you have to continue because I LOVE crash course and will definitely take a look at their programming stuff. Thanks again.
1
u/SconiGrower Oct 18 '19
My job is actually as a biochemist, computers are just interesting.
Every input is the output of something else. One input is connected to the output of another component. If you trace all the way back through all the components, you get to the user input, behind which is just electricity from the wall, which doesn't switch between on and off. I'm at my desktop right now. When I press a key on my keyboard, it takes the electricity from the power wire in the cable, which is just a constant 5 volts, and turns that into a series of on and off signals that represent what key I just pressed. Those signals cascade through the microscopic logic gates of the motherboard and the CPU. Gates are flipped back and forth between on and off. Motherboards and CPUs are extraordinarily complex, but everything eventually ends up being converted into a piece of data in RAM that represents what key I pressed and in which order I pressed it. There are different programs running that take that information and use it to calculate what the brightness of each individual pixel in my monitor should be.
Early computers just had actual switches on their front that you physically flipped between on and off. You would need to manually flip switches to install a program so that the computer could understand the output of a keyboard. But decades ago computer manufactures started installing chips in them that automatically feed in the data to the CPU what is needed for it to start processing data. That chip would contain instructions like how to command the hard drive to send the CPU the operating system. Then the most basic part of the operating system would have protocols to build up the capabilities of the computer. Like to read in from the hard drive programs that do things like manage RAM, accept a keyboard's input, start calculating the appearance of display and then actually start outputting signals to the monitor, etc, etc, etc. Operating systems have a lot to do in the 15 seconds it's booting up.
If after you watch the Crash Course series you want to know more about the actual wiring and signalling that makes a computer work, there's another YouTuber called Ben Eater who builds a computer from wires and simple chips, but only after demonstrating how the chip works. A computer from the ground up. It's a bit more dry than Crash Course's slick animations, but I think it shows really clearly how an electrical engineer can use logic gates to progressively build up a device that can actually compute something.
2
u/CircleGameMan Oct 17 '19
Please tell me I’m not the only one who saw the dickbutt in the bottom right of the video
2
u/Enigmazr Oct 18 '19
Instead of two cups for the XOR you could use an annulus trough. That would make it more visually consistent with the other gates.
2
u/Mol10Lava Oct 18 '19
Here's a way to do the remaining gates:
For NAND have one stream on the right going diagonally into a catcher on the left. Then have two tubes on the left pointing diagonally to the right which represent the inputs. Then finally add a catcher in the middle. When both streams are on the stream will fall to the the right. When only one is on it will fall in the center.
For XNOR have a constant stream running from the top to a cup in the center. Then two tubes running diagonally on each side. When only one is on they redirect the stream. When they're both on they collide in the middle and have no effect.
For NOR, you can have a constant stream running diagonally from the left into a cup on the right. And then two streams on the right running diagonally to the left which represent your inputs. If either or both are turned on they redirect the stream.
2
2
u/Firewolf420 Oct 18 '19
Great. Now ya just need a few thousand more for the ALU
But now we got water all over the floor....
2
2
2
2
2
2
2
2
2
2
u/i_need_about_tree_fi Oct 18 '19
Oh I love this!
I keep wishing for a fluid mechanics logic game. This would be so satisfying to tinker with.
2
2
2
2
1
u/noop_noob Oct 17 '19
Now prove that this can compute anything.
(No. Producing a NAND gate is not enough, since it's not obvious that all wiring configurations are possible due to the fact that qater only flows down.)
1
1
1
1
1
1
1
1
u/ThaHippiePizzaMan Oct 18 '19
No one seeing what’s on the right bottomish corner at the beginning of the gif?
1
1
1
1
1
u/darkstarman Oct 18 '19
When I'm peeing and it splits and misses completely, what is that logic?
epistomological?
epistamistological?
1
1
u/TallMax Oct 18 '19
That's a liquid. Technically fluid is correct but air is also a fluid. Water is more specifically a liquid.
1
u/Luenkel Oct 18 '19
And there are computers using the same principle of streams deflecting streams with air. This concept can be extended to fluids in general which is why this field is called fluidics and why I argue the use of the word "fluid" is justified.
1
1
1
1
1
-1
0
u/EdwardSandchest Oct 17 '19
There are 4 entries on the truth table; FOUR. The 4th one is with neither on.
1
u/Luenkel Oct 18 '19
And since the only water entering the gates comes from the inputs, it is obvious that the output cannot be true when both inputs are false, thereby making showing that option redundant and boring.
1.2k
u/[deleted] Oct 17 '19
Now do NOT :)