Generates a branch made of segments with a starting angle and a turning angle for each segment. The branch is generated from a starting point and a number of nodes to generate. The length of each segment and angle of each segment can be adjusted. The branch can be generated in 2D or 3D, render as you wish.
method branch(origin, nodes, segment_length, segment_growth, angle_start, angle_turn) # Branch Generation. - `origin`: CommonTypesMath.Vector3 - The starting point of the branch. If the z value is not zero, it will be used as the starting angle. - `nodes`: int - The number of nodes to generate. - `segment_length`: float - The length of each segment. - `segment_growth`: float - The growth of each segment. 0 = no growth, 100 = double the length of the previous segment. - `angle_start`: float - The starting angle of the branch in degrees. - `angle_turn`: float - The turning angle of each segment in degrees. Namespace types: CommonTypesMath.Vector3 Parameters: origin (Vector3 type from RicardoSantos/CommonTypesMath/1): The starting point of the branch. If the z value is not zero, it will be used as the starting angle. nodes (int): The number of nodes to generate. segment_length (float): The length of each segment. segment_growth (float): The growth of each segment. 0 = no growth, 100 = double the length of the previous segment. angle_start (float): The starting angle of the branch in degrees. angle_turn (float): The turning angle of each segment in degrees. return segments The list of segments that make up the branch.
진정한 TradingView 정신에 따라, 저자는 이 파인 코드를 다른 파인 프로그래머들이 재사용할 수 있도록 오픈 소스 라이브러리로 공개했습니다. 저자에게 박수를 보냅니다! 이 라이브러리는 개인적으로 사용하거나 다른 오픈 소스 출판물에서 사용할 수 있지만, 이 코드를 출판물에서 재사용하는 것은 하우스 룰에 의해 관리됩니다.