Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rlj1202 committed May 6, 2018
1 parent d2c83c8 commit acce70b
Show file tree
Hide file tree
Showing 6 changed files with 877 additions and 1 deletion.
72 changes: 71 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,71 @@
# go-BitmapLogicSimulator
# go-BitmapLogicSimulator

This is an implementation of Bitmap Logic Simulator.
Original article is [https://realhet.wordpress.com/2015/09/02/bitmap-logic-simulator/](https://realhet.wordpress.com/2015/09/02/bitmap-logic-simulator/).

The application is implemented with OpenGL.

## How does it work?
### Rules
Usage is very simple. Draw circuit in your favorate image editor, and load the image!

The rules are also simple.

```
'.' = dark pixel, insulation
'#' = bright pixel, conductive
'bright' means the value of either red or green or blue is greater than 223. 'dark' is the other color.
So color can be various.
```

```
...........
.#########.
...........
.####......
....######.
...........
some wires
```

```
...........
.....#.....
.....#.....
.####.####.
.....#.....
.....#.....
...........
wire crossing
```

```
...........
....##.....
.####.####.
....##.....
...........
NOT gate (Input is left and output is right. Four directions are possible.)
```

So, there is 5 possible certain components.
AND gate can be constructed like this.

```
..........
..##......
.##.##....
..##.##...
.....#.##.
..##.##...
.##.##....
..##......
..........
```

OR gate can be constructed using two wires merged.

### Simulation


4 changes: 4 additions & 0 deletions circuit.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package gobls

type Circuit struct {
}
Loading

0 comments on commit acce70b

Please sign in to comment.