Apparitions (wireframe models)

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
kristi fristi
Posts: 26
Joined: Mon Dec 12, 2022 7:23 am

Apparitions (wireframe models)

Post by kristi fristi »

Hexal's particle spell lets you make arbitrary lines, which means with enough code you can make entire models appear out of thin air. Do note that these lines are made of particles and so more complex models won't appear completely when cast by hand. Use a wisp instead. For the model rotation functions I also used moreiotas.

model iota
The model iota is a nested list. The first element is a list of all the vectors in the model(the vertexes). the second element is a list with lists. Each innermost list has two numbers which represent the indices of the vectors in the first list(the edges). the display function display all the edges of the model.

incorporeal reflection
--> model
pushes an empty model iota

Code: Select all

Vacant Reflection
Gemini Decomposition
Single's Purification
Numerical Reflection: 2
Flock's Gambit
//[[],[[]]]
modelmaker trinket
This is a trinket hex.
It needs a sentinel as the origin for the model.
The model will be written to the offhand.
Select a first vector by looking at it, then the second and a new vertex is made, so a string of edges would need you to select the middle blocks twice. make sure you only have complete vertexes when doing operations on the model!
If you select the same vector for a different edge, it will assume you want the new edge to connect to the same vertex.

Code: Select all

Mind's Reflection
Compass' Purification
Mind's Reflection
Alidade's Purification
Archer's Distillation
Locate Sentinel
Subtractive Distillation
Gemini Decomposition
Scribe's Reflection
Numerical Reflection: 0
Selection Distillation 
Jester's Gambit 
Locator's Distillation 
Gemini Decomposition 
Numerical Reflection: -1 
Equality Distillation                    //get the index of the vector and add it to the list if it's a new one
{ 
    Bookkeeper's Gambit: v 
    Scribe's Reflection 
    Gemini Decomposition 
    Numerical Reflection: 0 
    Selection Distillation 
    Rotation Gambit 
    Integration Distillation 
    Gemini Decomposition 
    Rotation Gambit II                   //list, model, list
    Numerical Reflection: 0 
    Jester's Gambit 
    Surgeon's Exaltation 
    Scribe's Gambit 
    Abacus Purification 
    Numerical Reflection: 1 
    Subtractive Distillation 
} 
Vacant Reflection 
Augur's Exaltation 
Hermes' Gambit                           //index
Scribe's Reflection 
Gemini Decomposition 
Numerical Reflection: 1 
Selection Distillation 
Speaker's Decomposition 
Gemini Decomposition                     //index, model, list, pair, pair
Abacus Purification 
Numerical Reflection: 2 
Equality Distillation                    //check if the last added index is paired up  if so, make a new pair, if not, add current index to the last pair
{ 
    Speaker's Distillation 
    Numerical Reflection: 3 
    Fisherman's Gambit 
    Single's Purification 
    Speaker's Distillation 
} 
{ 
    Numerical Reflection: 4 
    Fisherman's Gambit 
    Speaker's Distillation 
    Speaker's Distillation 
} 
Augur's Exaltation 
Hermes' Gambit                           //model, list
Numerical Reflection: 1 
Jester's Gambit 
Surgeon's Exaltation 
Scribe's Gambit
display model
vec, model-->
formulated as a macro, this takes a vector and a model and displays that model with vec being the origin for that model.

Code: Select all

Flock's Disintegration             //veco, [vec], [pairs]
{                                 //veco, [vec], pair
    Dioscuri Gambit
    Numerical Reflection: 0
    Selection Distillation
    Selection Distillation       //veco, [vec], [index], vec
    Numerical Reflection: 3
    Fisherman's Gambit II
    Additive Distillation        //veco, [vec], [index], vec+o
    Rotation Gambit II
    Numerical Reflection: 1
    Selection Distillation
    Selection Distillation          //veco, vec', vec2
    Rotation Gambit
    Additive Distillation
    Numerical Reflection: 2
    Flock's Gambit
    Particles
}
Jester's Gambit
Thoth's Gambit
Bookkeeper's Gambit: vvv

But models arent very interesting if you can't change them, so here are a few macros that let you change what the models look like when displayed:


move model
model, vec--> model
displaces the model by vec

Code: Select all

Prospector's Gambit
Numerical Reflection: 0
Selection Distillation
{
    Flock's Reflection
	Flock's Gambit
	Retrograde Purification
	Numerical Reflection: 0
	Numerical Reflection: 2
	Selection Exaltation
	Retrograde Purification
	Flock's Disintegration
    Additive Distillation
}
Jester's Gambit
Thoth's Gambit
Bookkeeper's Gambit: v-
Numerical Reflection: 0
Jester's Gambit
Surgeon's Exaltation
rotate model
model, vec, num--> model
rotates the model along vec by num radians, with respect to the origin
keep in mind that vec need to be normalized to work like a normal rotation!

Code: Select all

Rotation Distillation
Transpose Purification
Prospector's Gambit
Numerical Reflection: 0
Selection Distillation
{                          //matrix, vec
	Flock's Reflection
	Flock's Gambit
	Retrograde Purification
	Numerical Reflection: 0
	Numerical Reflection: 2
	Selection Exaltation
	Retrograde Purification
	Flock's Disintegration      //matrix, vec
	Multiplication Distillation: Matrix
}
Jester's Gambit
Thoth's Gambit
Bookkeeper's Gambit: v-
Numerical Reflection: 0
Jester's Gambit
Surgeon's Exaltation
scale model
model, num-->model
multiplies the size of the model by num, with respect to the origin

Code: Select all

Prospector's Gambit
Numerical Reflection: 0
Selection Distillation  //model, num, [vec]
{
	Flock's Reflection
	Flock's Gambit
	Retrograde Purification
	Numerical Reflection: 0
	Numerical Reflection: 2
	Selection Exaltation
	Retrograde Purification
	Flock's Disintegration
	Multiplicative Distillation
}
Jester's Gambit
Thoth's Gambit                       //model, num, [vec']
Bookkeeper's Gambit: v-
Numerical Reflection: 0
Jester's Gambit
Surgeon's Exaltation

And two more interesting partial model operations that take a set of indices to operate on:


move model section
model, [num], vec-->model

Code: Select all

Numerical Reflection: 2
Fisherman's Gambit II
Numerical Reflection: 0
Selection Distillation
Huginn's Gambit
{                             //vec, index
    Muninn's Reflection
    Jester's Gambit
    Dioscuri Gambit
    Selection Distillation    //vec, [pos], index, pos
    Numerical Reflection: 4
    Fisherman's Gambit
    Additive Distillation
    Surgeon's Exaltation
    Huginn's Gambit
}
Rotation Gambit         //model, vec, [pattern], [index]
Thoth's Gambit
Bookkeeper's Gambit: vv
Numerical Reflection: 0
Muninn's Reflection
Surgeon's Exaltation
rotate model section
model, [num], vec, num --> model-->

Code: Select all

Numerical Reflection: 2
Fisherman's Gambit II
Numerical Reflection: 0
Selection Distillation
Huginn's Gambit
{                             //vec, index
    Muninn's Reflection
    Jester's Gambit
    Dioscuri Gambit
    Selection Distillation    //vec, [pos], index, pos
    Numerical Reflection: 4
    Fisherman's Gambit
    Additive Distillation
    Surgeon's Exaltation
    Huginn's Gambit
}
Rotation Gambit         //model, vec, [pattern], [index]
Thoth's Gambit
Bookkeeper's Gambit: vv
Numerical Reflection: 0
Muninn's Reflection
Surgeon's Exaltation
as a final curiosity here is the triangle wave macro I used for making stick bugs. the full stickbug hex I leave as an exercise to the reader.

triangle wave
num --> num
base period of 4, amplitude of 1, oscillates about 0 and sqwave(0) = 1

Code: Select all

Numerical Reflection: 4
Modulus Distillation
Numerical Reflection: 2
Subtractive Distillation
Length Purification
Numerical Reflection: -1
Additive Distillation

And that's all for now! I'm either going to wait till 1.20 to keep going or code all the operations in lua so computercraft can do them.