I can’t do that, i don’t even understand what you’re talking about. I can only do basic stuff. The current code is completely broken and i can’t find why. Probably just a tiny thing that breaks everything. My fault for wanting to add randomization everywhere since i can’t stand clean stuff. Gotta start from scratch again.
It's broken. Inherit my code. It's broken.
ellipse_tree:
# ... or at least some kinda trnuk
1000,1000,1,3,-y #.
n 0,255
undul=.05
X,Y,N,W,RAD,br_start,br_stop,brC_start,brC_stop,tr_seg,br_seg:=w*.5,h,2,h,35,h*.9,h*.3,w*.4,w*.6,100,150
thinning=1
r:=$RAD*.6
rip:=$r*.99
#~ O=.01
#~ O=.1
O=1
repeat u(10,15) {
find_new=1
repeat u($tr_seg/2,$tr_seg) {
col:=[u(180,140),70,20] ang:=(1*$>)*sin($>/u($rip))
if $RAD>=0
ellipse[0] $X,$Y,$RAD,$r,$ang,$O,$col
w
X,Y,RAD,r+=u(-1,1)*sin($</u(10)),u(-.5,-1),-.01,-.01
################ LEVEL B
if $find_new&&$Y<$br_start&&$Y>$br_stop
bX,bY,bRAD,br:=$X,$Y,$RAD*.8,$r
if $bRAD>=0
repeat u($br_seg/2,$br_seg) {
col:=[u(80,140),70,20]
ang:=$>*sin($</u($rip))
bRAD,br-=lerp(.05,.01,-$thinning)
if u>.5 bX+=10 else bX-=10 fi
bY+=u(-.1,-.8)+sin($>/u(4,6))-lerp($>*.015,.001,-.01) # +/- branch up or down
ellipse[0] $bX,$bY,$bRAD,$br,$ang,$O,$col
w
################# LEVEL C
if u>.95
cX,cY,cRAD,cr:=$bX,$bY,$bRAD,$br
# echo $cRAD
if $cRAD>=0
repeat u($br_seg/1.2,$br_seg) {
col:=[u(80,40),70,20] ang:=10*$> #*sin($</u($rip))
cRAD,cr-=lerp(.05,.01,-$thinning)
if u>.5 cY+=2 else cY-=2 fi
cX+=u(.1,.8)+sin($</u(4,6))-lerp($>*.015,.01,.01) # +/- branch up or down
if $cX<$brC_start||$cX>$brC_stop
# echo $cX
if $cY>h*.3
ellipse[0] $cX,$cY,$cRAD,$cr,$ang,$O,$col
w
fi
fi
}
fi
fi
}
fi
fi
find_new=0
fi
}
}