Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
15
Task/Cantor-set/Processing/cantor-set.processing
Normal file
15
Task/Cantor-set/Processing/cantor-set.processing
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
//Aamrun, 1st July 2022
|
||||
|
||||
void cantorSet(int x1,int y1,int x2,int y2,int strWt,int gap,int n){
|
||||
strokeWeight(strWt);
|
||||
line(x1,y1,x2,y2);
|
||||
if(n>0){
|
||||
cantorSet(x1,gap + y1,(2*x1+x2)/3,gap + (2*y1+y2)/3,strWt,gap,n-1);
|
||||
cantorSet((2*x2+x1)/3,gap + (2*y2+y1)/3,x2,gap + y2,strWt,gap,n-1);
|
||||
}
|
||||
}
|
||||
|
||||
void setup(){
|
||||
size(1000,1000);
|
||||
cantorSet(100,10,900,10,1,10,5);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue