PLhook

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - PL/Point Lists
Introduced first in SolidGeometry 5.2, Creation date: 2022-02-22, Last change: 2025-09-15

creates the shape of a hook



See Also: PLarrow , PLshaftrad , PLevolvente , PLthreadDIN

Example Illustration

 missing image of PLhook(h,w,o,a,r)

Syntax

PL=PLhook([h,w,o,a,r])

Input Parameter

h: height
w: widht
o: overhang
a: angle; default is 45 degree
r: radial edges

Output Parameter

PL: PL

Examples


PLhook(30,10,[10 1],'',0)




Copyright 2022-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Algorithm (Workflow)

This algorithm generates the shape of a hook using a closed polygon list. It is part of the SolidGeometry library and was created by Tim Lueth. The function is called PLhook and it takes several input parameters to define the hook's dimensions and shape.

Input Parameters

Algorithm Steps

  1. Retrieve the input parameters using the getfuncparams function. If a parameter is not provided, use the default value.
  2. If the overhang o is a single value, duplicate it to form a two-element vector.
  3. Calculate A as the horizontal distance from the top of the hook to the overhang using the formula A = o(1)/tan(a).
  4. Create the initial polygon list PL that defines the shape of the hook. The points are defined in a clockwise manner starting from the origin (0,0).
  5. Apply radial edges to the polygon using the PLradialEdges function with the specified radius r.
  6. Translate the polygon PL vertically by subtracting [0 h-A-o(2)] to adjust its position.
  7. If no output is requested, plot the hook using SGfigure and CPSplot.
Algorithm explaination created using ChatGPT on 2025-08-19 00:29. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21