Page 1 of 1

box

Posted: Fri Jan 13, 2023 8:04 pm
by kristi fristi
this hex takes a vector(x,y,z), and returns a list of vectors representing every block within a cuboid of size x+1 by y+1 by z+1
e.g. (1,1,1) would become [(0,0,0),(0,0,1),(0,1,0),(0,1,1),(1,0,0),(1,0,1),(1,1,0),(1,1,1)] (the 8 blocks of a 2*2*2 cube)
since every block added is one evaluation, as well as only working on vectors with exclusively positive components, it's use is for generating large lists of offsets
that can then be hardcoded into other spells.

Code: Select all

vec --> list
//generates a list of vectors representing every block in a box from (0,0,0) to vec
//only useful while manually generating, can't handle negative numbers
{
    Bookkeeper's Gambit: v
    Muninn's Reflection
    Numerical Reflection: 4
    Gemini's Gambit
    Flock's Disintegration      //lists, [z, y, x, num], z, y, x, num
    Bookkeeper's Gambit: vv--   //lists, x, index
    Jester's Gambit
    Modulus Distillation        //lists, x'
    Jester's Gambit
    Flock's Disintegration
    Bookkeeper's Gambit: v---   //lists, x', y, x, num
    Jester's Gambit
    Division Distillation
    Floor Purification          //lists, x' y, num/x
    Jester's Gambit
    Modulus Distillation        //lists, x' y'
    Rotation Gambit
    Flock's Disintegration      //list, x', y', z, y, x, num
    Rotation Gambit II
    Multiplicative Distillation //list, x', y', z, num, y*x
    Division Distillation
    Floor Purification
    Jester's Gambit
    Modulus Distillation
    Vector Exaltation
    Jester's Gambit
    Gemini Decomposition
    Numerical Reflection: 3
    Selection Distillation
    Numerical Reflection: 1
    Additive Distillation
    Numerical Reflection: 3
    Jester's Gambit
    Surgeon's Exaltation
    Huginn's Gambit
}
Jester's Gambit
Numerical Reflection: 1
Additive Distillation
Gemini Decomposition
Vector Disintegration
Numerical Reflection: 3
Flock's Gambit                  //[x, y, z]
Retrograde Purification         //[z, y, x]
Numerical Reflection: 0         
Integration Distillation        //list, vec, [z, y, x, 0]
Huginn's Gambit
Vector Disintegration
Multiplicative Distillation
Multiplicative Distillation
Gemini Decomposition
Gemini's Gambit
Gemini Decomposition
Flock's Gambit
Thoth's Gambit





Box 2: Box Harder

Posted: Thu Mar 16, 2023 2:04 pm
by kristi fristi
I have spent some time reworking box and building a framework around for ease of use. This is my result.
The code below works as follows: the first time executing the hex, it will write the position of the block you're looking at to the storage item(focus/spellbook) in your other hand. This represents the first corner of the box. Then, look at the opposite corner, and execute a second time. This time the hex will generate a list of coordinates representing every block in the box between the two corners. Without a sentinel, the hex will record the absolute coordinates of the box. If there is a sentinel anywhere, the hex will record the offsets from the sentinel to the coordinates of the box. The item in the other hand must either be empty, contain null, or contain a list of at least one element(it's the only way I knew how to code the 2-step in base hex)

Code: Select all

//part one  getting the first coordinate
Auditor's Reflection 
{ 
    Scribe's Reflection 
    Nullary Reflection 
} 
Flock's Disintegration 
Augur's Exaltation 
Hermes' Gambit 
Gemini Decomposition 
Nullary Reflection 
Equality Distillation 
{ 
    Bookkeeper's Gambit: - 
} 
Rotation Gambit 
Augur's Exaltation 
Numerical Reflection: 0 
Selection Distillation 
{ 
    EAST wqqqwqq 
} 
Flock's Disintegration 
Equality Distillation 
{ 
    Nullary Reflection 
} 
Flock's Disintegration 
{ 
    { 
        EAST wqqqwqq 
    } 
    Mind's Reflection 
    Compass' Purification 
    Mind's Reflection 
    Alidade's Purification 
    Archer's Distillation 
    Integration Distillation 
    Scribe's Gambit 
    Numerical Reflection: 1 
} 
Augur's Exaltation 
Hermes' Gambit 
Augur's Purification 
{ 
    Charon's Gambit 
    Nullary Reflection 
} 
Flock's Disintegration 
Augur's Exaltation 
Hermes' Gambit 
Bookkeeper's Gambit: v

//part 2  first piece of setting up for modified box
Scribe's Reflection 
Numerical Reflection: 1 
Selection Distillation 
Mind's Reflection 
Compass' Purification 
Mind's Reflection 
Alidade's Purification 
Archer's Distillation 
Dioscuri Gambit

//part 3  lesser fold distillation
Gemini Decomposition 
Rotation Gambit II  
Subtractive Distillation  
Vector Disintegration  
Gemini Decomposition 
Numerical Reflection: 0 
Minimus Distillation 
Jester's Gambit 
Numerical Reflection: 0 
Augur's Exaltation 
Rotation Gambit         
Gemini Decomposition 
Numerical Reflection: 0 
Minimus Distillation 
Jester's Gambit 
Numerical Reflection: 0 
Augur's Exaltation 
Rotation Gambit         
Gemini Decomposition 
Numerical Reflection: 0 
Minimus Distillation 
Jester's Gambit 
Numerical Reflection: 0 
Augur's Exaltation 
Rotation Gambit         
Vector Exaltation 
Additive Distillation

//part 4  second piece setting up for modifed box
Locate Sentinel 
Gemini Decomposition 
Nullary Reflection 
Equality Distillation 
Vector Reflection Zero 
Rotation Gambit 
Augur's Exaltation 
Subtractive Distillation 
Rotation Gambit II 
Subtractive Distillation 
Vector Disintegration        
Length Purification 
Rotation Gambit 
Length Purification 
Rotation Gambit 
Length Purification 
Rotation Gambit 
Vector Exaltation


//part 5  modified box 
Numerical Reflection: 1 
Additive Distillation 
{ 
    Bookkeeper's Gambit: v 
    Vector Disintegration 
    Muninn's Reflection 
    Numerical Reflection: 3 
    Fisherman's Gambit II 
    Modulus Distillation 
    Muninn's Reflection 
    Numerical Reflection: 4 
    Fisherman's Gambit II 
    Division Distillation 
    Floor Purification 
    Numerical Reflection: 3 
    Fisherman's Gambit II 
    Modulus Distillation 
    Muninn's Reflection 
    Numerical Reflection: 6 
    Fisherman's Gambit 
    Division Distillation 
    Numerical Reflection: 5 
    Fisherman's Gambit 
    Division Distillation 
    Floor Purification 
    Numerical Reflection: 4 
    Fisherman's Gambit 
    Modulus Distillation 
    Vector Exaltation 
    Additive Distillation 
    Muninn's Reflection 
    Numerical Reflection: 1 
    Additive Distillation 
    Huginn's Gambit 
} 
Prospector's Gambit 
Vector Disintegration 
Multiplicative Distillation 
Multiplicative Distillation 
Gemini Decomposition 
Gemini Gambit 
Gemini Decomposition 
Flock's Gambit 
Numerical Reflection: 0 
Huginn's Gambit 
Thoth's Gambit

//end
Scribe's Gambit
I also wanted to note something about the parts I named modified box and lesser fold distillation, as they are kind of their own functions.
Lesser fold distillation works like this
vector, vector --> vector
it takes any two opposite corners of a cuboid and returns the lower-north-west corner of the very same cuboid. alternatively every minimus distillation can be replaced with maximus distillation to yield a greater fold distillation, for if you wanted the upper-south-east corner of a cubiod from two random opposite corners.

Then there's modified box
vector, vector --> list
It takes an 'origin' vector, which is the lower-north-west corner of the box, and a vector representing the dimensions of the box minus one(like the original box) then generates the box according to those arguments. It still only takes positive dimensions, but that doesn't matter because first vector can be anything, allowing any offset to be generated.

reduced box

Posted: Mon Aug 28, 2023 2:45 pm
by kristi fristi
below is a hex that does what modified box does, but faster. It uses hexal's running sum to reduce the number of dimensions the hex has to iterate over by one.
The fist half is just to set everything up to make the loop as simple as possible, and make sure that running sum does the biggest dimension.

Code: Select all

//vec, vec --> [vec]

Numerical Reflection: 1
Additive Distillation
Vector Disintegration
Numerical Reflection: 3
Flock's Gambit
Gemini Decomposition
Gemini Decomposition		//maxindex
Flock's Disintegration
Dioscuri Gambit
Maximus Distillation
Rotation Gambit II
Augur's Exaltation
Dioscuri Gambit
Maximus Distillation
Rotation Gambit II
Augur's Exaltation
Locator's Distillation		//vec0, trid, index
Numerical Reflection: 1
Additive Distillation
Rotation Gambit II
Jester's Gambit
Vector Disintegration 		//index+1, trid, 0x, 0y, 0z
Numerical Reflection: 5
Swindler's Gambit			//index+1, trid, 0z, 0y, 0x
Numerical Reflection: 4
Fisherman's Gambit II
Fisherman's Gambit			//index+1, trid, 0d3, 0d2, 0max
Numerical Reflection: 4
Fisherman's Gambit			//index+1, 0d3, 0d2, 0max, trid
Retrograde Purification
Flock's Disintegration		//index+1, 0d3, 0d2, 0max, dz, dy, dx
Numerical Reflection: 6
Fisherman's Gambit II
Fisherman's Gambit			//index+1, 0d3, 0d2, 0max, d3, d2, dmax
Numerical Reflection: 1
Subtractive Distillation
Huginn's Gambit
Vector Reflection +Z
Vector Reflection +Y
Vector Reflection +X		//index+1, 0d3, 0d2, 0max, d3, d2, +z, +y, +x
Numerical Reflection: 8
Fisherman's Gambit II
Fisherman's Gambit
Bookkeeper's Gambit: vv-	//index+1, 0d3, 0d2, 0max, d3, d2, maxial
Muninn's Reflection
Gemini Gambit
Muninn's Reflection
Flock's Gambit				//index+1, 0d3, 0d2, 0max, d3, d2, [maxial]
Rotation Gambit II			//index+1, 0d3, 0d2, 0max, [maxial], d3, d2
Undertaker's Gambit
Multiplicative Distillation	//index+1, 0d3, 0d2, 0max, [maxial], d2, d2*d3
Numerical Reflection: 3
Numerical Reflection: 2
Numerical Reflection: 0		//index+1, 0d3, 0d2, 0max, [maxial], d2, d2*d3, 0, 1, 4
Numerical Reflection: 10
Fisherman's Gambit
Fisherman's Gambit
Bookkeeper's Gambit: vv-	//0d3, 0d2, 0max, [maxial], d2, d2*d3, permutation
{
Bookkeeper's Gambit: -		//needs to become 2808. If you want to do that with literals, go ahead.
}
Flock's Disintegration
Swindler's Gambit			//[maxial], permutation, 0max, 0d3, 0d2, d2, d2*d3
Numerical Reflection: 0
Huginn's Gambit
{								//[maxial], permutation, 0max, 0d3, 0d2, d2, d2*d3
	Flock's Reflection
	Flock's Gambit
	Retrograde Purification
	Numerical Reflection: 1
	Numerical Reflection: 7
	Selection Exaltation	
	Flock's Disintegration		//[maxial], permutation, 0max, 0d3, 0d2, d2
	Muninn's Reflection
	Prospector's Gambit
	Modulus Distillation		//[maxial], permutation, 0max, 0d3, 0d2, d2, i%d2
	Rotation Gambit
	Additive Distillation		//[maxial], permutation, 0max, 0d3, d2, n2
	Muninn's Reflection
	Rotation Gambit
	Division Distillation
	Floor Purification			//permutation, [maxial], 0max, 0d3, n2, i/d2
	Rotation Gambit
	Additive Distillation		//[maxial], permutation, 0max, n2, n3
	Numerical Reflection: 4
	Fisherman's Gambit			//[maxial], 0max, n2, n3, permutation
	Swindler's Gambit
	Vector Exaltation
	Speaker's Distillation
	Running Sum Purification
	Flock's Disintegration			//and ther you have it
	Muninn's Reflection
	Numerical Reflection: 1
	Additive Distillation
	Huginn's Gambit
}
Jester's Gambit
Gemini Decomposition
Gemini Gambit
Gemini Decomposition
Flock's Gambit
Thoth's Gambit		//permutation, [maxial], 0max, 0d3, 0d2, d2 [vec]
Bookkeeper's Gambit: vvvvvv-				//lol