by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - PL/Point Lists
Introduced first in SolidGeometry 4.5, Creation date: 2019-02-10, Last change: 2025-09-14
See Also: PLcircle
, PLcircseg
, PLevolvente
, PLgearDIN
, PLkidney
, PLrand
, PLspiral
, PLsquare
, PLstar
, PLcircleoval
, PLtubbing
PL=PLarrow(l,[h,s1])
l: | length (x=[0..l]) or [A0;B0] Start point and End point | |
h: | height in mm; default is 10% | |
s1: | tip size in mm; default is h |
PL: | Point list (open) of arrow |
PLarrow(20);
PLarrow(20,5);
PLarrow(20,5,10);
PLarrow([10 10;-20 20])
PLarrow([10 10;20 +15],2,3)
The function PLarrow generates a point list for an arrow shape. It is part of the SolidGeometry library and was introduced in version 4.5. The function can handle both a specified length or a start and end point for the arrow.
l.h.l has four or more elements. If so, interpret it as start and end points A0 and B0. Calculate the direction d and angle a between these points. Update l to be the distance between A0 and B0.l is a scalar, set A0 to an empty array and a to 0.h using getfuncparams with a default of l/10.s1 using getfuncparams with a default of h, then divide by 2.s9 as l - s1 and s8 as s9 - s1.PL for the arrow shape using the calculated values.PL by scaling with h/4.A0 is not empty, rotate and translate PL to align with the specified start and end points.SGfigure, PLplot, and other visualization functions.