Math's Miscellanea

Post your coolest Hexcasting creations here.

New topics are NOT for chatting or asking help, put those in the comments of a post or in a different forum.
User avatar
Math321
Posts: 4
Joined: Fri Feb 17, 2023 12:25 am

Math's Miscellanea

Post by Math321 »

This thread is for any interesting small tidbits I find that aren't worthy of making an entire thread for. (Feel free to talk in the thread if you like - I'll be building an index of my posts here to make them easy to find while still allowing folks to talk.)


INDEX:
Last edited by Math321 on Sat Feb 18, 2023 6:39 am, edited 9 times in total.
hello world
User avatar
Math321
Posts: 4
Joined: Fri Feb 17, 2023 12:25 am

Re: Math's Miscellanea

Post by Math321 »

Optimized Archer's + Architect's raycast


The standard way of doing an "Archer's + Architect's" raycast (11 patterns):
qaq aa qaq wa wqaawdd

qaq aa qaq wa weddwaa waaw

Mind's Reflection, Compass' Purification, Mind's Reflection, Alidade's Purification, Archer's Distillation

Mind's Reflection, Compass' Purification, Mind's Reflection, Alidade's Purification, Architect's Distillation, Additive Distillation



An optimized version I figured out (9 patterns):

qaq aa qaq wa aadadaaw

wqaawdd ddqdd weddwaa waaw

Mind's Reflection, Compass' Purification, Mind's Reflection, Alidade's Purification, Dioscuri Gambit

Archer's Distillation, Rotation Gambit II, Architect's Distillation, Additive Distillation
hello world
User avatar
Math321
Posts: 4
Joined: Fri Feb 17, 2023 12:25 am

Re: Math's Miscellanea

Post by Math321 »

Bit Selector

Hexcasting's set operations do bitwise math if you apply them to numbers. Here's one practical way to use that in a hex.

Let's say you want a function which returns either True or False depending on what number you pass it, using this table:
0 = False
1 = False
2 = True
3 = True
4 = False
5 = True
6 = False
7 = True

First, you'll want to translate that table into binary, with bit 0 as the least significant bit (on the right). Then convert that number into decimal.

Binary: 10101100
Decimal: 172

From there, you can write some code that uses a bitmask to check whether the Nth bit of 172 is true or false.

Bit Selector (172)
num (selected bit)bool

Numerical Reflection: 2 aawdd wedew Numerical Reflection: 172
wdweaqa aw

Numerical Reflection: 2, Jester's Gambit, Power Distillation, Numerical Reflection: 172
Intersection Distillation, Augur's Purification




If you'd rather not hardcode the number, you can simply omit it. In this case, you push the base number, then the number of the bit you want to check:

Bit Selector (Generalized)
num (base), num (selected bit)bool

Numerical Reflection: 2 aawdd wedew
wdweaqa aw

Numerical Reflection: 2, Jester's Gambit, Power Distillation
Intersection Distillation, Augur's Purification

This can be a powerful tool when used with Augur's Exaltation and Hermes'/Thoth's Gambit, though I'm sure other uses can be found.
hello world