Joined: Jan 14, 2010 Posts: 6067 Location: Moon Base
Audio files: 730
Posted: Tue Nov 04, 2014 1:33 pm Post subject:
Sierpinski pattern generator Subject description: fractal bits
I was searching for some Sierpinski triangle images when I stumbled upon the following image
Besides noticing that it's boolean logic I also realized that it's quite a nice pattern generator.
The (A___), (_B__), (__C_), (___D) patterns are the same as the outputs of a binary counter. And the rest of the pattens
are derived from those using AND logic.
I first drew up a schematic using a counter, a bunch of AND gates and a 4 bit mux, but quickly realized that it could be
done much easier without a mux and only 1 (4 input) AND gate. All that's needed is to connect the inputs to either
one of the outputs of the counter or make it high. And this can be achieved using OR gates .
note: To get the pattern in the same orientation as the example above the ABCD inputs need to be inverted.
Basic Sierpinski pattern generator.gif
Description:
Filesize:
42.95 KB
Viewed:
963 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.
Joined: Jan 14, 2010 Posts: 6067 Location: Moon Base
Audio files: 730
Posted: Tue Nov 04, 2014 1:33 pm Post subject:
From that basic version I created a more elaborate circuit. (I'll go from right to left explaining it)
The 4-input AND gate is replaced by 3 2-input AND gates (U4b,U4c,U4d). The 4th AND gate (U4a) is used
to create short (clocked) pulses.
The OR gates are replaced with diodes and resistors.
By adding XOR gates (U2, U3) the outputs from the counter and the ABCD inputs can be inverted. This has
the effect that the pattern is rotated.
For the ABCD inputs there are 3 options:
- a switch to force a high or low state
- using the ABCD CTRL inputs
- using the second counter (U1b) to cycle through the complete pattern (auto switch open).
I haven't tested it yet but I did simulate the logic part and that should work. I'm not enitely sure
about the reset section but I think it'll work like this.
When I first found the above image it was on a seperate page but I now found a page which
has other versions aswell using different logic. So I'm thinking of incorporating that into the circuit
too, most likely with some muxes.
Sierpinski pattern generator2.gif
Description:
Sierpinski Pattern generator V2
Filesize:
105.4 KB
Viewed:
1017 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.
Joined: Jan 14, 2010 Posts: 6067 Location: Moon Base
Audio files: 730
Posted: Tue Nov 04, 2014 6:04 pm Post subject:
So there are a couple of other possibilities besides AND gates:
OR, XNOR, XOR, NAND, NOR, NXOR, NXNOR
OR, NAND, NOR create Sierpinski triangles like using AND
OR is the inverted version of X=1, Y=1
NAND is the inverted version of x=0, y=1
NOR is the same as X=1, Y=1
so adding an inverter to the output will create all those
More interesting is using a XNOR, XOR, NXOR, NXNOR which creates what's called a Hadamard Matrix.
Basic Hadamard Matrix pattern generator.gif
Description:
Basic Hadamard Matrix pattern generator
Filesize:
49.4 KB
Viewed:
928 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.
Just as we hear of robots and expert software gradually replacing the "professions" lawyers,accountants etc...soon the contemporary jazz drummer with all their rhythm variations will be replaced by Phobos's Hadamard Matrix pulse streams
Flash ADCs /shift registers etc on the ABCDs will make this so powerful...it's easy enough to sing the variations but the real power lies in the ability to change those variations without some clunky intervention.
Joined: Jan 14, 2010 Posts: 6067 Location: Moon Base
Audio files: 730
Posted: Wed Nov 05, 2014 7:55 am Post subject:
elmegil wrote:
You're being coy. I want to HEAR it
hmm ok,. I haven't build the circuit yet but I made a quick patch with the AND gates.
I'm probably gonna use it at low speeds as a patten generator for rhythms most of the time. But here's
how it sounds when running at a high frequency and the ABCD inputs turned on/off at random.
I don't think the Hadamard Matrix will be very interesting used like this since it's always 8 bits on and 8 bits off,
just shuffled around a bit.
Joined: Jan 14, 2010 Posts: 6067 Location: Moon Base
Audio files: 730
Posted: Wed Nov 05, 2014 11:38 am Post subject:
here' s a version that has most of the different gate options.
Easiest way seems to be to use both AND and XOR gates and just switch between them (or you could use both outputs).
This leaves a spare XOR which can be used as an inverter and a spare AND which is used to create short pulses.
Inverting the outputs of the counter is the same as counting backwards so instead of the CD4520 + CD4070 I used a CD4029.
No XOR's on the CTRL inputs this time but they could be inverted externally.
Sierpinski Hadamard pattern generator.gif
Description:
Sierpinski Hadamard pattern generator
Filesize:
63.62 KB
Viewed:
983 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.
Wow, The Amazing PHOBoS once again pulls a really interesting circuit rabbit out of his electronic hat
Can you do a Koch snowflake or a dragon curve?
What about replacing the gates with JingleJoe's "4051 ANY gate"? Although I barely remember how that worked or if it's even appropriate. Probably not, sorry.
Joined: Jan 14, 2010 Posts: 6067 Location: Moon Base
Audio files: 730
Posted: Wed Nov 05, 2014 1:14 pm Post subject:
oops I accidentally hit the edit button on your reply, hope it's restored as it was
Quote:
Wow, The Amazing PHOBoS once again pulls a really interesting circuit rabbit out of his electronic hat
Can you do a Koch snowflake or a dragon curve?
not yet
I really like the golden dragon though:
Quote:
What about replacing the gates with JingleJoe's "4051 ANY gate"? Although I barely remember how that worked or if it's even appropriate. Probably not, sorry.
I thought about that, hence why I mentioned muxes, but it needs a 4 bit mux and then you don't have the spare gates to create the inversion and short pulses. _________________ "My perf, it's full of holes!" SoundCloudBandCampMixCloudTwitchYouTube The Golden Shrimp Guild
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum