TradingView
RicardoSantos
Feb 22, 2023 3:54 PM
Vector2FunctionClip
OANDA:NAS100USD
1M
US Nas 100
OANDA
Description
⋅
Feb 22, 2023 3:54 PM
Library
"Vector2FunctionClip"
Sutherland-Hodgman polygon clipping algorithm.
reference:
.
rosettacode.org/wiki/Sutherland-Hodgman_polygon_clipping
.
clip(source, reference)
Perform Clip operation on a vector with another.
Parameters:
source
: array<Vector2> . Source polygon to be clipped.
reference
: array<Vector2> . Reference polygon to clip source.
Returns: array<Vector2>.
arrays
Market Geometry
MATH
library
udf
function
method
vector
polygon
clip
2d
Comments
KioseffTrading
⋅
Feb 22, 2023 4:57 PM
BEAST
djmad
⋅
Feb 22, 2023 8:29 PM
Are you trying to code a CAD system for Pinescript?
nice work!!!
RicardoSantos
⋅
Feb 23, 2023 11:34 AM
@djmad
, nah, just a leftover toy code
m4rk3tm4k3r
⋅
Nov 3, 2023 3:41 PM
You are the best !
MillionYay
⋅
Feb 28, 2023 2:02 AM
Amazing
slkmbnz37
⋅
Feb 22, 2023 4:16 PM
Hi Ricardo , Hope all is well. A brief explanation would be great .
RicardoSantos
⋅
Feb 22, 2023 4:56 PM
@slkmbnz37
, it clips a polygon shape to fit another as per the description and example
More