I notice you have pallettes included with some of your filters. Anyway you could include it with Serendipitous circle? Please.
The problem is not adding the feature, and I would be more than happy to add it. The problem is more on getting reliable shading, and that’s why there is list of options for shading. If that problem was more easily solvable, definitely adding palettes would be the next step. At some point in the weekend, I will be adding white background as part of the Serendipitous Circle as I don’t have a practical solution to shading problem.
Fair enough, I just thought I would ask even though you had probably already thought about it. Thanks for answering
Oops I see I put ‘you could’ in the wrong positions Makes it sound pushy…I meant could you … please?
Here’s a piece I have made attempting to find something interesting with new palettes (Yes, there are over 100 new palettes though had to push a fix for option recently.):
Leaving this here:
Bit Plane Shuffler + Smooth [Geometric-Median]
I made a code inspired by this video:
And this source code: https://github.com/spalaciob/tupper-self-ref-formula/blob/master/tupper.py
This is the code
#@cli rep_tupper_map: _width>0,_height>0,k>0
rep_tupper_map:
skip ${3=0}
_tupper_n0={'0'}
m "large_num_mod:
eval \"
dividend='$""1';
res=0;
repeat(size(dividend),p,
res=(res*10+(dividend[p]-$_tupper_n0))%$""2;
);
res;
\"
u ${}
"
m "large_num_div:
1
eval \"
number='$""1';
const n_size=size(number);
index=0;
dividend=number[index]-$_tupper_n0;
while(dividend<$""2,
dividend=dividend*10+(number[++index]-$_tupper_n0);
);
while(n_size>index,
da_push(#-1,(dividend/$""2)+$_tupper_n0);
dividend=(dividend%$""2)*10+(number[++index]-$_tupper_n0);
);
ds=da_size(#-1);
ds?(resize(#-1,1,ds,1,1,0);ds;):ds;
\"
if ${} u {t} rm.
else rm. u 0
fi
"
m "large_num_sum:
('$""1')
('$""2')
-[-2,-1] 48
eval \"
mi_0=w#-2-1;
mi_1=w#-1-1;
carry=0;
repeat(w#-1,
n=i(#-2,mi_0)+i(#-1,mi_1)+carry;
i(#-2,mi_0)=n%10;
carry=int(n/10);
--mi_0;
--mi_1;
);
while(carry,
n=i(#-2,mi_0)+carry;
i(#-2,mi_0)=n%10;
carry=int(n/10);
--mi_0;
);
\"
+[-2] 48
u {-2,t}
rm[-2,-1]
"
m "large_num_mul:
('$""1')
('$""2')
-[-2,-1] 48
1
eval \"
const m=w#-3-1;
const n=w#-2-1;
const mn=m+n;
carry=0;
for(p=0,p<=mn||carry,++p,
for(q=max(0,p-n),q<=min(p,m),++q,
carry+=i(#-3,m-q,0,0)*i(#-2,n-p+q,0,0);
);
da_push(#-1,carry%10);
carry=int(carry/10);
);
ds=da_size(#-1);
ds?(resize(#-1,1,ds,1,1,0);ds;):ds;
\"
mirror. y
if ${} +. 48 u {t} rm[-3--1]
else rm[-3--1] u 0
fi
"
${1-2}
repeat h {
y=$>
ky=${large_num_mul\ $2,$3}
ky=${large_num_sum\ $ky,$y}
y_mod_H=${large_num_mod\ $ky,$2}
yH=${large_num_div\ $ky,$2}
repeat w {
skip=0
rf:=$1*$>+$y_mod_H
tyH=$yH
repeat $rf {
tyH=${large_num_div\ $tyH,2}
if !$tyH skip=1 break fi
}
if $skip continue fi
end_val={tyH='$tyH'-48;(tyH)[size(tyH)-1]&1}
if $end_val set. $end_val,$>,$y fi
}
}
um large_num_div,large_num_mod,large_num_sum
However, it doesn’t work despite that each large_num sub-commands works. Python version seem to take a while too. I will say that I’m glad I attempted to do it anyway. And yes, it’s horrendously slow though I do have some method of optimization in theory. There is no other path to this in G’MIC as G’MIC math parser doesn’t have bigint support as in Python.
Here’s a example output:
It’s something, yes.
Parameter:
Pw2Size= 10
Custom Formula - xor((ix&iy())|(ix()&iy),max(x(),y()))
Binary A = 01
Binary B= 11
Shift Factor = 823920
Symmetry = D
Finding my recent work fun.
One more to this serie:
Based on a image found here - Xor arrays - Online Technical Discussion Groups—Wolfram Community
Always wanted to replicate that. Easy with the new filter.
Still much fun:
You should launch a line of mouse pads.
Carpets
Marbled floors or painted ceilings for our members’ mansions
A little code fun:
#@cli rep_pascal_ifs: iterations>0
#@cli : Generates Pascal Fractal made by Roger Bagula and Gary Adamson
rep_pascal_ifs:
skip ${1=5000000}
delete_last_image={$!==1}
${-max_w},${-max_h}
eval >"
const iterations=$1;
const x_scale=w#-1*2-1;
const y_scale=h#-1*2-1;
x0=u(0,1);
y0=u(0,1);
repeat(iterations,iter,
case=int(u(0,3))+1;
case==3?(
x1=-y0/2-.5;
y1=x0/2;
):
case==2?(
x1=y0/2;
y1=-x0/2-.5;
):
case==1?(
x1=x0/2;
y1=y0/2;
);
x0=x1;
y0=y1;
if(iter>100,
px=(x0+.5)*x_scale;
py=(y0+.5)*y_scale;
i(#-1,px,py)=case;
);
);
"
if $delete_last_image rm[-2] fi
Based on this: http://paulbourke.net/fractals/pascaltriangle/roger9.c
With color added:
Other symmetry too:
With distance:
Lost the full-size image, but here it is:
Filter used: Reverse Digits (Upgraded as of 12/6/2022) + Thin Brush
Source: https://www.pexels.com/photo/orange-flower-with-butterfly-87452/
Another one, but this time I have the full image:
Same filters used.
Source: https://www.pexels.com/photo/plant-flower-rose-bloom-39517/
Another Thorn Fractal with different custom expression:
a=a/sin(prod(sin(b),cos(a),tan(b)))
b=b/cos(prod(sin(a),cos(b),tan(a)))
Simple fun code to find Pascal numbers. The below test is for pentatope number, and it works.
> gmic echo ${rep_calculate_pascal_number\ 6,4}
> 126
#@cli rep_calculate_pascal_number: level,depth>=2
#@cli : Calculate the pascal value given level and depth. Triangular number is in depth of 2. Tetrahedral number is in depth of 3. And so forth.
#@cli : Author: Reptorian.
rep_calculate_pascal_number:
check "!(find(isint([${1-2}]),0,0,1)+1)&&$2>1"
eval "
const level=$1;
const depth=$2;
const divisor=fact(depth);
dividend=expr('x+1',depth-1)+level;
prod(level,dividend)/divisor;
"
I revisited the Van Eck sequence to see if I can come with a better code.
It seems so:
#@cli rep_van_eck_sequence: iterations>0,start_int>=0
#@cli: Generates Van Eck Sequence.
#@cli: Default value: '_start_int=0'
rep_van_eck_sequence:
skip ${2=0}
iters,start_num={int(abs([$1,$2]))}
$iters,1,1,2 # found,last_position
eval "
const iterations=$iters;
const start_num=$start_num;
van_eck_sequence=vector(#iterations,0);
van_eck_sequence[0]=start_num;
if(start_num<iterations,I(#-1,start_num)=[1,start_num?1];);
I(#-1,0)=[!start_num,1];
for(p=2,p<iterations,++p,
search_num=van_eck_sequence[p-1];
key=I(#-1,search_num);
key[0]?(
van_eck_sequence[p]=p-key[1];
key[1]=p;
I(#-1,search_num)=key;
):(
key=[1,p];
I(#-1,search_num)=key;
);
);
van_eck_sequence;"
rm.
EDIT: I found the fastest approach now.
Also, they correspond well with these two three links:
C:\Windows\System32>gmic echo ${rep_van_eck_sequence\ 100,0}
[gmic]-0./ Start G'MIC interpreter.
0,0,1,0,2,0,2,2,1,6,0,5,0,2,6,5,4,0,5,3,0,3,2,9,0,4,9,3,6,14,0,6,3,5,15,0,5,3,5,2,17,0,6,11,0,3,8,0,3,3,1,42,0,5,15,20,0,4,32,0,3,11,18,0,4,7,0,3,7,3,2,31,0,6,31,3,6,3,2,8,33,0,9,56,0,3,8,7,19,0,5,37,0,3,8,8,1,46,0,6
[gmic]-0./ End G'MIC interpreter.
C:\Windows\System32>gmic echo ${rep_van_eck_sequence\ 100,1}
[gmic]-0./ Start G'MIC interpreter.
1,0,0,1,3,0,3,2,0,3,3,1,8,0,5,0,2,9,0,3,9,3,2,6,0,6,2,4,0,4,2,4,2,2,1,23,0,8,25,0,3,19,0,3,3,1,11,0,5,34,0,3,7,0,3,3,1,11,11,1,3,5,13,0,10,0,2,33,0,3,9,50,0,4,42,0,3,7,25,40,0,5,20,0,3,8,48,0,4,15,0,3,7,15,4,6,70,0,7,6
[gmic]-0./ End G'MIC interpreter.
C:\Windows\System32>gmic echo ${rep_van_eck_sequence\ 100,2}
[gmic]-0./ Start G'MIC interpreter.
2,0,0,1,0,2,5,0,3,0,2,5,5,1,10,0,6,0,2,8,0,3,13,0,3,3,1,13,5,16,0,7,0,2,15,0,3,11,0,3,3,1,15,8,24,0,7,15,5,20,0,5,3,12,0,4,0,2,24,14,0,4,6,46,0,4,4,1,26,0,5,19,0,3,21,0,3,3,1,11,42,0,6,20,34,0,4,20,4,2,32,0,6,10,79,0,4,8,54,0
[gmic]-0./ End G'MIC interpreter.
https://oeis.org/A181391
https://oeis.org/A171911
https://oeis.org/A171912