PMA !!y5/EVb5KZI ID: 51bf9e May 28, 2018, 9:18 p.m. No.6213   🗄️.is 🔗kun

>>6186

3D, These graphics are excellent!

 

>>6165

GA, happy to share the code/concepts for creating the triangle/squares. Actually had some fun putting that piece together. A lot of the code is dependent on other parts, so a bit difficult to break up and post in it's entirety.

 

>>6185

Very excited about where this is going!

 

>>6079

>When moving up and down, keep d constant. Two factors, three factors, four.

Have been working on this hint from a little while ago.

 

Ran into a few problems trying to find factor records of c in the original grid data, and the n,d,f querying code turned out to be a little too slow.

 

So this exercise turned into trying to figure out a way to iterate n and find matching records.

 

Well, it appears that you can't just "iterate" n. (Or at least I can't.)

 

For any x+n, there are many combinations of n,d,f that satisfy the nn+2d(n-1)+f-1 = XPN equation.

 

Simply incrementing n just tells you if it fits within a specified XPN.

 

Therefore, you need to increment BOTH sides of the equation.

 

Pics attached are samples of this two sided iteration process for test cases c147, c155, c1143, c1155, and c6107. And I believe it finds the appropriate factors properly.

 

Performance for this process is roughly 2 calculations for each odd x+n, and matching records are still determined based on the remainder 2d(n-1) formula being zero.

PMA !!y5/EVb5KZI ID: 51bf9e May 29, 2018, 11:51 p.m. No.6221   🗄️.is 🔗kun

Following is just a quick run through of how the triangle squares are being generated.

 

The sample squares attached are for c12103, n=2, but the same applies to all images.

 

First thing is the odd x+n square which has a u value, a center square, and 8 equally defined triangles.

Each triangle has a number of rows from 0 to u - 1.

And each of these rows has cells from 0 to the current row index.

 

The internal structure of the triangles are:

 

0: 0

1: 0, 1

2: 0, 1, 2

3: 0, 1, 2, 3

etc.

 

Sample code that creates each of these TriangleParts is attached.

 

Once that structure is created, setting the appropriate values in each of the cells is a matter of iterating through all points on all triangles in a systematic way.

 

See the SetValues code snippet attached.

 

First iterate each row from 0 to u - 1.

Then for each row iterate each column from 0 to the row index.

And then cycle through the triangles in the following index order: 1, 3, 5, 7, 2, 4, 6, 8

 

There are 2 breakdown objects that determine the type of value to set in each triangle cell.

 

First is based on nn + 2d(n-1) + (f-1), and the second is for the nn + (2d-1)(n-1) + (n-1) + (f-1) distribution.

 

In each case, the values for each of the components of these formulas are assigned to a triangle cell until fully depleted using the counter variable to track progress. Order of assignment is (n-1), (f-1), (2d-1)(n-1), and finally nn for n-1 breakdown.

 

Once the triangle cell types are assigned, there is another method that translates the triangles into a 2 dimensional square array [x+n, x+n]. where each triangle is rotated differently into it's appropriate position.

 

The final image is then rendered from this 2d square array.