Share your repls and programming experiences

← Back to all posts
Fractal Trees
h
Coder100 (15913)

Trees

Have you ever looked at a tree?
If so you know what a tree looks like. Yay!

Pictures

About

I wanted to try my hand at recursion. And then I made this! I hope you like it :)

Edit: Before turning up the branches, turn down the recursion limit so then it renders in an ok time

Comments
hotnewtop
LegendaryWolf (432)

RULE OF REPL.IT -
Every post of @Coder100 is ought to get trending within an hour and at least should get 60+ upvotes while trending

JUST DON'T KNOW WHYYY

X24 (26)

@LegendaryAlpha Because they are very popular within the repl.it community

FloCal35 (369)
Edit @LegendaryAlpha

Every post of @Coder100 must be on trending within 4 hours of posting and get at least 75 upvotes while on trending

RohilPatel (1520)

So am I and I only get 2 lmao @X24

X24 (26)

@RohilPatel So it's not that...

Want to find out the real reason that Coder100 always has their posts on Trending? Find out on "Coder100: Why Are They So Popular?"!

It spells WATSOP as well, that's nice

zplusfour (880)

@LegendaryAlpha because he has alts
for example: @JunhaoZhang @JunhaoZhang1 @junhaozhang2

edit: im sorry there are too junhao zhangs in the world lmao this is just a joke

LuckyOreos (186)

@LegendaryAlpha Some of his posts aren’t even the best!!!

Coder100 (15913)

are you sure those are my alts
i don't see them upvoting my posts

but then, i don't check who upvotes any of my posts lol @zplusfour

LuckyOreos (186)

@zplusfour Two of them might be alts!!!

Coder100 (15913)

well some of u aren't even the best!!! @LuckyOreos

LegendaryWolf (432)

Jesus christ...
I'm getting a notification every 10 seconds...
lemme codeee!

zplusfour (880)

@Coder100 i said that it is a joke

SwaroopBappanad (243)

@Coder100 hmm, why would you need to check if they were ur alts? GUILTY AS CHARGED

LegendaryWolf (432)

This comment is the top of the food chain

ThisUserTaken (235)

@LuckyOreos @Coder100 is not using alts. He already has 15603 cycles. Who cares. Edit: He also makes some pretty coolio programs once in a while so its justified

Coder100 (15913)

what alts
i can confirm i do not use alts
does luckyoreos use alts? @ThisUserTaken

ThisUserTaken (235)

@Coder100 maybe someone's just framing alts @JunhaoZhang
@JunhaoZhang1 @junhaozhang2 or it could be coincidence which I doubt

Whippingdot (431)

Noice Tree u got there buddy


GROWING


BIG BOI


OH NOES BODY RIPPING

LegendaryWolf (432)

Secret revealed! @Coder100 is 13yrs and an 8th grader!

LegendaryWolf (432)

Actually, he shud be banned the prev year coz he was 12.

sojs (287)

Bush

Stick

cube

A Polygon

Flex those biceps :)

My Gosh He's buff

Heh - NERD!!

Super cool @Coder100!

upvote upvote upvote

Coder100 (15913)

LOL
that's an impressive collection there, nice! @sojs

LegendaryWolf (432)


*NOICE

wut did I just made!?!
Coder100 (15913)

NOICE
I'm going to call that pixel art @LegendaryAlpha

LegendaryWolf (432)

so did u read the txt below *NOICE?

LegendaryWolf (432)

if u reply to someone who has replied on my comment. I'll get a ping too

maxina (44)

only one issue: when ever i add more branches it just goes unresponsive

Coder100 (15913)

yeah, turn down the recursion @maxina

BiIINye (42)


I have become a jedi

DonoldJTrump (2)

square tree:


90 degrees for branch angle

recursion depth 20

strange tree:


branch angle 45

recursion depth 20

RELLY strange tree

TheOnlyGoodOne (19)

Hey @Coder100! Did you know you can uses web-workers to do the calculation in the background? This makes sure your page will not freeze when doing long or complex calculations, such as recursions. If you want to get really crazy you can work on some shaders, here are some resources you should look at: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API https://developer.mozilla.org/en-US/docs/Web/API/WebGLShader

Coder100 (15913)

wow
did not know
I was aware of this but never really thought much about them

thanks! @TheOnlyGoodOne

TheOnlyGoodOne (19)

@Coder100 Yea no problem, I love web-workers, when I really started using them they helped with so much!

DominicDeng (1)

i really like this idea, its an awesome project

X24 (26)

I found a very neat little pattern while trying to avoid the website being unresponsive:

Coder100 (15913)

yeah, alternate title: Don't crash ur Computer @X24

Coder100 (15913)

nice
let me guess: angle 90+360k where k is a natural number? @X24

LegendaryWolf (432)

looks like a carpet still need to weave

X24 (26)

@Coder100 Pretty sure i did

90
1
12

for config

X24 (26)

@Coder100 Also I think maths is the cause to my headaches seeing as I am dumb and smart, so please tell me what's going on there.

LTI2 (115)


what have i made

LAMAQDAHODWALA (29)

This tree making algorithm is a demonstration of the TREE function, described in Kruskal's tree theorem. The TREE function is an incredibly fast growing set, and TREE(3) eclipses Grahm's number multiple times over. Just something for all the math nerds.

Coder100 (15913)

O(b^n)
where b is branches
and n is recursion depth i think @LAMAQDAHODWALA

LAMAQDAHODWALA (29)

Imagine what TREE(4) would be @Coder100

codingjlu (45)

Very strange tree:

Coder100 (15913)

no it's a perfectly trimmed hedge @codingjlu

codingjlu (45)

@Coder100 lol yes but very nice project

NotMrMan (33)

@Coder100 i guess i spoke tree language for "tree with no leaves"

BiIINye (42)

me: presses two for branches
computer: ight imma head out
computer has left the lobby

Bookie0 (5676)

I have achieved perfection!

also random 0 here :thonk:

Coder100 (15913)

ok i'll remove the 0
thanks for finding it
maybe i put it there on purpose @Bookie0

TANMAYBAGADIA (48)

Hey , I dont know if i am lazy or not but whenever i learn something , i try to implement but everytime i fail. And then i need to search for that creepy error which boring. I dont know if i am good at coding or bad or maybe lazy.

TANMAYBAGADIA (48)

Why your code is everytime this much complicated to understand :( . Anyways i need to improve on coding and yaa nice one but You have not preented some things to happen like stopping of webpage which can be done by reducing some values in recurssion or something i guess as you said. And plz work on UI. Yaa Good Work!!

Coder100 (15913)

cool thanks
the ui is supposed to look bad do you hate it? @TANMAYBAGADIA

TANMAYBAGADIA (48)

@Coder100 No its not that i hate it but if someone comes who doesn't know you and check this , then the first impression would be that the normal things such as designing is lacking untill they fully check ur project. #NOOFFENSE . I actually doesnt care about beautification when functionality is there but when it comes to project beautification kills me and my brain.

Vnen (0)

2c45b24b-a056-49d1-8796-c941f9e008ef

JamesGordon1 (128)

still sad over serviv3.io, that was going so well but it died

CyberHacker101 (109)

lol it crashed my computer when i put: 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 in there

ArinaVahramyan (7)

here is another rule
EVERY SINGLE PERSON GETS THE MUSCLE TREE! MUHAHAHA