Intersecting Material IDs
In GeoDict 256 Material IDs are available. In Add and in Subtract edit mode, when two materials are added or subtracted, the Material ID of the addition or the subtraction is given by adding or subtracting the binary codes corresponding to the Material IDs. The used calculation rules are shown below.
Binary addition rules |
||||
|---|---|---|---|---|
1 |
+ |
1 |
= |
1 |
1 |
+ |
0 |
= |
1 |
0 |
+ |
1 |
= |
1 |
0 |
+ |
0 |
= |
0 |
Binary subtraction rules |
||||
|---|---|---|---|---|
1 |
- |
1 |
= |
0 |
1 |
- |
0 |
= |
1 |
0 |
- |
1 |
= |
0 |
0 |
- |
0 |
= |
0 |
The addition of Material IDs is done column-wise, as follows:
0 |
0 |
0 |
1 |
|
+ |
+ |
+ |
+ |
+ |
0 |
1 |
0 |
0 |
|
= |
= |
= |
= |
= |
0 |
1 |
0 |
1 |
|
The subtraction of Material IDs is also done column-wise, as follows:
0 |
0 |
1 |
0 |
|
- |
- |
- |
- |
- |
0 |
0 |
0 |
1 |
|
= |
= |
= |
= |
= |
0 |
0 |
1 |
0 |
|
Examples of Material ID and binary codes of intersection materials obtained by adding:
First material |
Second material |
Intersection material |
|||
|---|---|---|---|---|---|
Material ID |
Binary code |
Material ID |
Binary code |
Material ID |
Binary code |
|
0010 |
|
0100 |
|
0010 + 0100 = 0110 |
|
0011 |
|
0100 |
|
0011 + 0100 = 0111 |
|
0011 |
|
0101 |
|
0011 + 0101 = 0111 |
|
0101 |
|
0001 |
|
0101 + 0001 = 0101 |
Examples of Material ID and binary codes of intersection materials obtained by subtracting are:
First material |
Second material |
Intersection material |
|||
|---|---|---|---|---|---|
Material ID |
Binary code |
Material ID |
Binary code |
Material ID |
Binary code |
|
0001 |
|
0001 |
|
0001 – 0001 = 0000 |
|
0101 |
|
0010 |
|
0101 - 0010 = 0101 |
|
0001 |
|
0011 |
|
0001 - 0011 = 0000 |
|
0100 |
|
0001 |
|
0100 – 0001 = 0100 |