For visualization of what the cube formula does, please see my 3d desmos graph:
https://www.desmos.com/3d/y1b49krs4s
These were made for 1.19.2, so updating (or lack thereof) to 1.20.1 is best left to the reader.
PRECURSOR MACROS
Code: Select all
#define Huginn's Sandbox = any ->
{
Vacant Reflection // any, []
Jester's Gambit // [], any
Integration Distillation // [any]
Muninn's Reflection // [any], ravenmind
Integration Distillation // [any, ravenmind]
Huginn's Gambit //
}
// Unsandboxes ravenmind, returning sandboxed iota. Rewrites the original back to the ravenmind
#define Muninn's Sandbox = -> any
{
Muninn's Reflection // [any, ravenmind]
Flock's Disintegration // any, ravenmind
Huginn's Gambit // any
}
// Returns sandboxed iota without rewriting original back: ravenmind stays intact as before this cast
#define Muninn's Sandbox II = -> any
{
Muninn's Reflection // [any, ravenmind]
Flock's Disintegration // any, ravenmind
Bookkeeper's Gambit: v // any
}
Cuboid Point Exaltation
Code: Select all
// get a point in a cuboid corresponding to the certain i value where 0 <= i <= (2g+1)^3-1
// any i outside that is undefined behavior
#define Cuboid Point Exaltation = c, g, i -> vec
{
// c, g, i
Jester's Gambit // c, i, g
Gemini Decomposition // c, i, g, g
Numerical Reflection: 2 // c, i, g, g, 2
Multiplicative Distillation // c, i, g, 2g
Numerical Reflection: 1 // c, i, g, 2g, 1
Additive Distillation // c, i, g, 2g+1
Rotation Gambit // c, g, 2g+1, i
Numerical Reflection: 3
Flock's Gambit // c, [g, 2g+1, i]
Huginn's Sandbox // c
Vector Disintegration // cx, cy, cz
// vz = floor(i/(2g+1)^2) - g + cz
Muninn's Sandbox II // cx, cy, cz, [g, 2g+1, i]
Flock's Disintegration // cx, cy, cz, g, 2g+1, i
Jester's Gambit // cx, cy, cz, g, i, 2g+1
Numerical Reflection: 2
Power Distillation // cx, cy, cz, g, i, (2g+1)^2
Division Distillation // cx, cy, cz, g, i/(2g+1)^2
Floor Purification // cx, cy, cz, g, floor(i/(2g+1)^2)
Jester's Gambit // cx, cy, cz, floor(i/(2g+1)^2), g
Subtractive Distillation // cx, cy, cz, floor(i/(2g+1)^2)-g
Additive Distillation // cx, cy, vz
Rotation Gambit II // vz, cx, cy
// vy = (floor(i/(2g+1)) % (2g+1)) - g + cy
Muninn's Sandbox II // vz, cx, cy, [g, 2g+1, i]
Flock's Disintegration // vz, cx, cy, g, 2g+1, i
Jester's Gambit // vz, cx, cy, g, i, 2g+1
Gemini Decomposition // vz, cx, cy, g, i, 2g+1, 2g+1
Rotation Gambit II // vz, cx, cy, g, 2g+1, i, 2g+1
Division Distillation // vz, cx, cy, g, 2g+1, i/(2g+1)
Floor Purification // vz, cx, cy, g, 2g+1, floor(i/(2g+1))
Jester's Gambit // vz, cx, cy, g, floor(i/(2g+1)), 2g+1
Modulus Distillation // vz, cx, cy, g, floor(i/(2g+1)) % 2g+1
Jester's Gambit // vz, cx, cy, floor(i/(2g+1)) % 2g+1, g
Subtractive Distillation // vz, cx, cy, floor(i/(2g+1)) % 2g+1 - g
Additive Distillation // vz, cx, vy
Rotation Gambit II // vy, vz, cx
// vx = i % (2g+1) - g + cx
Muninn's Sandbox // vy, vz, cx, [g, 2g+1, i]
Flock's Disintegration // vy, vz, cx, g, 2g+1, i
Jester's Gambit // vy, vz, cx, g, i, 2g+1
Modulus Distillation // vy, vz, cx, g, i%2g+1
Jester's Gambit // vy, vz, cx, i%2g+1, g
Subtractive Distillation // vy, vz, cx, i%2g+1-g
Additive Distillation // vy, vz, vx
Rotation Gambit II // vx, vy, vz
Vector Exaltation // vec
}
- c = vec = Center of cuboid
g = num = Number of blocks out from center
i = num = Index of point to be returned
For a cuboid with g, the 'i's required to make a full cuboid with every point is [0..(2g+1)^3-1]. This is every number 0 to (2g+1)^3-1 inclusive. You would need exactly (2g+1)^3 'i's incrementing by 1 to get the full cuboid
0 <= i <= (2g+1)^3-1 must be followed otherwise undefined behavior will occur.
Uses no meta-eval only uses base hex casting.
Cuboid Exaltation
Code: Select all
#define Cuboid Exaltation = c, g -> [vec]
{
// c, g
Gemini Decomposition // c, g, g
Numerical Reflection: 2
Multiplicative Distillation // c, g, 2g
Numerical Reflection: 1
Additive Distillation // c, g, 2g+1
Numerical Reflection: 3
Power Distillation // c, g, (2g+1)^3
Iterators Purification // c, g, [i]
{
// c, g, i
Cuboid Point Exaltation // vec
// delete everything on stack except top
Flock's Reflection
Flock's Gambit
Retrograde Purification
Speaker's Decomposition
Bookkeeper's Gambit: v- // vec
}
// c, g, [i], [pat]
Jester's Gambit // c, g, [pat], [i]
Thoth's Gambit // c, g, [vec]
Bookkeeper's Gambit: vv- // [vec]
}
Arguments
- c = vec = Center of cuboid
g = num = Number of blocks out from center
The only problem with this is because of the exponentially increasing 'i' required when increasing g, the meta-eval use goes through the roof. The number of evals used is (2g+1)^3.
On a clean cast (no meta-eval use beforehand), this can only handle a max 'g' of 3, and mishap due to maxed out meta-eval limit if it is above that. By no means is 3 always safe because using evals beforehand can make this maximum 'g' lower.
To get around this see applications.
APPLICATIONS (BLOCKS BE DAMMED)
Now since Cuboid Exaltation can only handle g=3 maximum, Cuboid Point Exaltation must be used generate the cuboid. But since it only generates a single point, we would need a way to cast the pattern (2g+1)^3 times....
Thats where either cyclical wisps or reverbation rod comes into play by saving the current 'i' value in the wisp's ravenmind or rod's iota container, you can act on each vec in a cuboid where g is only limited by ambit.
Now say you cast break block on each vec......
Godspeed world devourers.