kaigouthro

Branch Curve

Library "branch"

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.
Biblioteca do Pine

No verdadeiro espírito TradingView, o autor publicou este código de Pine como uma biblioteca de código aberto para que outros programadores de Pine de nossa comunidade possam reutilizá-lo. Um brinde ao autor! Você pode usar esta biblioteca em particular ou em outras publicações de código aberto, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Gostaria de usar essa biblioteca?

Copie a seguinte linha e cole-a em seu script.