# User:TruePikachu/Dex3D

# Overview

The Dex3D QR codes can be represented as an 8x8 mono bitmap, with a black outer frame, white second-layer frame, and a 4x4 array of data - 2 bits remain constant and provide orientation information, 3 bits act for checksums, 11 bits act as data (only 10 bits are real data, one is a duplicate)

# Creation

0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ||
---|---|---|---|---|---|---|---|---|---|

0 | 0 | ||||||||

1 | 1 | ||||||||

2 | A | 2^8 | 2^5 | 2^2 | 2 | ||||

3 | B | 2^9 | 2^7 | 3 | |||||

4 | C | 2^9 | 2^4 | 4 | |||||

5 | 2^0 | 2^3 | 2^6 | 2^1 | 5 | ||||

6 | 6 | ||||||||

7 | 7 | ||||||||

0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Row 0, row 1, row 6, row 7, column 0, column 1, column 6, column 7, cell (4,3), and cell (3,4) remain constant. First one needs to compute the index number of what QR code to make - it is generally the NDexID-1, but there are some exceptions:

- Future table for exceptions

Once the index number is known, one can do a binary decomposition of it - some examples:

Name | Dex | Index (Dec) | Index (Hex) | Index (Bin) |

Bulbasaur | #001 | 0 | 0x000 | %00_0000_0000 |

Pikachu | #025 | 24 | 0x019 | %00_0001_1001 |

Mew | #151 | 150 | 0x096 | %00_1001_0110 |

Victini | #494 | 493 | 0x1ED | %01_1110_1101 |

Using Victini as the example, fill in the data portion of the code. Note that a '1' is white, and a '0' is black.

0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ||
---|---|---|---|---|---|---|---|---|---|

0 | 0 | ||||||||

1 | 1 | ||||||||

2 | A | 2 | |||||||

3 | B | 3 | |||||||

4 | C | 4 | |||||||

5 | 5 | ||||||||

6 | 6 | ||||||||

7 | 7 | ||||||||

0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |

The checksum is odd-parity, and applies across rotation; Parity-A handles the corners, Parity-B handles one cell counterclockwise from the corners, and Parity-C handles one cell clockwise from the corners. These parity bits are set so that each group has an odd number of light cells and an odd number of dark cells.

0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ||
---|---|---|---|---|---|---|---|---|---|

0 | 0 | ||||||||

1 | 1 | ||||||||

2 | 2 | ||||||||

3 | 3 | ||||||||

4 | 4 | ||||||||

5 | 5 | ||||||||

6 | 6 | ||||||||

7 | 7 | ||||||||

0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |