Evaluation over a cuboid

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
Cameron TNT
Posts: 3
Joined: Wed Jun 11, 2025 1:22 am

Evaluation over a cuboid

Post by Cameron TNT »

This spell acts like thoths over a cuboid, evaluating a given spell over every block. This has many uses, for instance breaking a large area in one spell, or perhaps building a large sphere around the caster. (notably like thoths it also copies the stack (and outputs a list of the stacks), so for large volumes the stack should be well managed to prevent stack size errors)

The ravenmind and stack are left unaffected by this spell, and it does not utilise any addons

The spell expects the stack to firstly have a set of instructions to run over each element and secondly a vector detailing the dimensions of the cubioid (e.g. (3,2,1) will return a cuboid of dimensions 4x3x2), as such:
  • (Spell)
  • Vector
  • Instructions
  • (Any other iotas to be copied)
Notably, the cuboid is not centered relative to the caster (the generated vectors are of the form (0,3,5) (1,3,5) exc) and if this is desired it must be specified in the instructions.

One relativly simple use of this spell could be to break a 21x21x21 cuboid centered at the caster. This could be achived by setting up the stack as so:

qaq dd Numerical Reflection: 10 wddw Take my position and normalise by subtracting 10 (as the vectors will run from 0 - 20 not (-10) - 10)
qqq waaw qaqqqqq eee Instructions to add my position to the vector, and break that block
Numerical Reflection: 20 qqqqq waaw The cuboids dimensions will be 21x21x21
aqqqqq Pull the spell from a focus

Note that since all the iotas are used each loop, there is no issue with stack overflow and the output is a single empty list.

The spell can also be modified to other regions, such as spherical, by taking that regions bounding box and applying a restriction to all evaluated vectors (e.g. this vectors (normalised) magnitude must be less than 10)

An example of this would be to get all the positions inside a sphere of radius 5 about the caster. This can be achived with the following:

qaq dd Take my position

qqq Numerical Reflection: 5 wddw aadaa wqaqw Numerical Reflection: 5 q qqq waaw eee qqq vv eee awdd deaqq eee
Instructions to check if the magnitude is less than 5, if so add it to my position, otherwise delete it

Numerical Reflection: 10 qqqqqq waaw The dimensions of the cuboid should be 11x11x11
aqqqqq Take the spell from my offhand


Note that the resulting list has 485 entries, and grows with r^3, so storing the output this way will quickly become unviable for large r.

Finally, 20 patterns of this spell are dedicated to generating a list from 0 to N, so if one were to have a pattern or alternate method to do this availabe, it may be desiarable to replace those patterns with that. The code has those lines commented, and the pattern list is highlighted by blue intro/retro-spections. (bookkeepers are replaced with vs & -s due to an error in the rendering)

Edit- The list portion of the spell has been updated to accept negative values. This will make it significantly easier to find blocks between two vectors (just find their difference and add the first in the payload)

qqqeqqqqqaawdddeaqqeeeqqqaaeaaNumerical Reflection: 3ddadaawdddadadqwaeawqaeaqaewdqdweqaeaqv-qwaeawqeeeNumerical Reflection: 3aadaadaaNumerical Reflection: 4ddadqeeeeeNumerical Reflection: 3ewdqdweqqqqwaeawqaeaqaewdqdweqaeaqv-aadaaqqqqqawwNumerical Reflection: 0adeeedqqaeaaeqqqdeaqqaadadaawwqaqwwaqawedqdeeeeNumerical Reflection: 4ddadwqaqwaadaadaadeaqqv-eeeaawdddadadqwaeawqNumerical Reflection: 3ddadNumerical Reflection: 0Numerical Reflection: 5qaeaqwdeddeaqqvvvvv-

Code: Select all

{
Vector Exaltation
Jester's Gambit
Hermes' Gambit
}
{
Rotation Gambit
Numerical Reflection: 3
Fisherman's Gambit
Jester's Gambit
Thoth's Gambit
Flock's Reflection
Flock's Gambit
Derivation Decomposition
Bookkeeper's Gambit: v-
Flock's Disintegration
}
Numerical Reflection: 3
Gemini Gambit
Numerical Reflection: 4
Fisherman's Gambit
Vector Disintegration
Numerical Reflection: 3
Flock's Gambit
{
Flock's Reflection
Flock's Gambit
Derivation Decomposition
Bookkeeper's Gambit: v-
Gemini Decomposition
Axial Purification
Numerical Reflection: 0
Single's Purification
Vacant Reflection
{
Hermes' Gambit
Dioscuri Gambit
Length Purification
Multiplicative Distillation
Integration Distillation
}
Numerical Reflection: 4
Fisherman's Gambit
Length Purification
Gemini Gambit
Hermes' Gambit
Bookkeeper's Gambit: v-
}
Jester's Gambit
Thoth's Gambit
Flock's Disintegration
Numerical Reflection: 3
Fisherman's Gambit
Numerical Reflection: 0
Numerical Reflection: 5
Selection Exaltation
Hermes' Gambit
Bookkeeper's Gambit: vvvvv-