Finishing the tree from last time: We can make and join rings So we need to: Modify draw_branch so it uses make_end_ring and make_section Add actual branch curving to draw_branch Fix the texture coordinates so it doesn't look like bamboo First: Make draw_branch use our new functions It'll need a previous ring as a parameter Should we also have prev_pos? We *could* calculate the direction from the ring But since we already have it, let's not Second: Curves An observation: Branch curve varies a LOT Even in the same tree If I can't figure out the real term, I'll call our tree "subdividing" Oaks and Maples do this sometimes Pines and Red Alders don't Two basic principles about branch curving: Note: "principle" here means "thing I saw a few times" Curves usually aren't abrupt Branches usually curve upward at the end Defining an S-curve: We need 4 points to interpolate between Interpolate, not calculate straight sections Weighting of a point increases as we get closer to it First point: 1/4 of branch distance, trajectory halfway bent Second point: 3/4 of branch distance, slightly offset away from ending Third: Texture coordinates draw_branch_section needs texture bounds Currently they're 0 and 1 Did any of that work? If so...leaves! We need a make_leaf function Simple leaf or compound leaf? Can it be a polygon with a lot of vertices? I think Blender supports that Should they have stems? What angle are they at? We can trace some kind of leafish shape Oval? They can have a green texture But where should the leaves be? Ends of branches? Not really how trees are Attached to sufficiently-thin branches? Might look ok Smaller radius = higher chance of a leaf at each segment