-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from Wikunia/feature-p5js-plotting
Visualize the Bombe
- Loading branch information
Showing
13 changed files
with
405 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
/dev/ | ||
test/current/ | ||
visualizations | ||
docs/build/ | ||
docs/build/ | ||
presentation/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Visualization and Animation using p5js | ||
|
||
I used [p5js](https://p5js.org/) in my videos explaining the Enigma and the Bombe. | ||
If you want to play around with it as well please follow these instructions. | ||
|
||
The `html` and `js` files are all in the `p5js` folder. | ||
I have two main `html` files namely `index.html` for the Enigma Video and `bombe.html` for visualizing how to crack the Enigma. | ||
|
||
## Enigma | ||
|
||
The main javascript file for the Enigma is `sketch.js`. | ||
You should probably be able to use this out of the box if you watched the video. | ||
[Enigma: Endless possibilities is not enough](https://youtu.be/4cf7dc_8u44) | ||
|
||
- Click right off the slider area for making a rotor step. | ||
- The slider decides the number of frames for each encoding step so left most setting is the fastest. | ||
- You can click on a letter (on the right side of the plugboard) to make an input | ||
|
||
The settings itself are part of `sketch.js` where you can set the settings of the Enigma. | ||
|
||
## Bombe | ||
|
||
The main javascript file for the Bombe is `sketch_bombe.js`. In the video you can't see all the keys I press to change the visualization: | ||
|
||
- `s` move the guess to the right | ||
- `a` move the guess to the left | ||
- `r` switch off the yellow lights (to start a new input) | ||
- ` ` If you click on a letter on the plugboard (right hand side) | ||
- it stops before it enters the plugboard in the reverse direction such that you can change the plugboard setting right before | ||
- With ` ` you continue the encoding | ||
- `n` move the orange indicator to the left (make a backward rotor step) | ||
- `m` move the orange indicator to the right (make a rotor step) | ||
- `p` enter a plugboard setting. First press `p` and then two letters you want to connect | ||
- `z` reset the whole Bombe | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.10.2/p5.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.10.2/addons/p5.sound.min.js"></script> | ||
<!-- <link rel="stylesheet" type="text/css" href="style.css"> --> | ||
<meta charset="utf-8" /> | ||
|
||
</head> | ||
<body> | ||
<script src="plugboard.js"></script> | ||
<script src="rotor.js"></script> | ||
<script src="ukw.js"></script> | ||
<script src="enigma.js"></script> | ||
<script src="sketch_bombe.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.