I ported ProcTree to Codea—apparently not well. Help?

I found a cool procedural tree generator called procTree here: https://github.com/procedural/proctree/blob/master/proctree/original_proctree.js.txt

The first screenshot shows what it’s capable of. I tried to adapt it to lua, and display the results with a Codea mesh, and the second screen shot shows my results. :cry:

TBH I’m glad I got it working at all, but still, it’s clear that either I got the conversion wrong or I’m adding the vertices to the mesh wrong. Project is attached—can anybody help me figure out my mistakes?

@UberGoober - had a quick look at this and looks quite involved. There’s an old adage ‘Seek and thou shalt find’ so I sought and found an old L-systems tree construction system (which I posted ages ago) which I think could be used as the basis for what you want to do - just needs the Craft upgrading to get true 3D objects.

Anyways - have a look.

@Bri_G that’s fantastic!

@UberGoober - hopefully the L-system can help place the branch objects so you can construct trees accordingly.

p.s. there’s nothing new under the sun just more options.

@Bri_G

Actually my ultimate goal is to make a cool voxel tree generator, like in this video: https://youtu.be/16mFLQUAh3Q

Since figuring out how to easily place tree generators (https://codea.io/talk/discussion/12659/voxelsinajiffy) it seemed like it should be possible to get the raw information out of procTree and turn it into voxel trees.

I wish I could tell if I was generating bad information or if I was generating good information but turning it into a mesh badly.