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.
Perpustakaan Pine

Di dalam semangat sebenar TradingView, pengarang telah menerbitkan kod Pine ini sebagai perpustakaan sumber terbuka, jadi pengaturcara-pengaturcara Pine yang lain dari komuniti kami boleh menggunakannya semula. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara peribadi atau pada penerbitan-penerbitan sumber terbuka lain, tetapi penggunaan semula kod ini di dalam penerbitan adalah ditadbir oleh Peraturan Dalaman.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Mahu gunakan perpustakaan ini?

Salin garisan ini dan tampalkan ia di dalam skrip anda.