PLminxy

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - PL/Point Lists
Introduced first in SolidGeometry 5.0, Creation date: 2020-09-15, Last change: 2025-09-14

returns the point with minimal x and y values



See Also: PLminangle , PLminyx

Example Illustration

 missing image of PLminxy(PL,maxX)

Syntax

[P,k]=PLminxy(PL,[maxX])

Input Parameter

PL: Point Liste
maxX: if true; we search for maximum y and maximum x

Output Parameter

P: Point with minimal y and minimal x
k: find index in PL

Examples


CPLB=CPLspiral(10,20,8*pi);
PLminxy(CPLB)
PLminxy(CPLB,true)
[~,k]=PLminxy(CPLB); CPLB=circshift(CPLB,-k);




Copyright 2020-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 function, PLminxy, is designed to find a specific point in a list of points, PL. The function can either find the point with the minimal x and y values or, if specified, the point with the maximal x and minimal y values.

Input Parameters

Output Results

Algorithm Steps

  1. Store the original list of points PL in PLorg.
  2. Round the coordinates in PL to 5 decimal places for precision.
  3. Extract only the x and y coordinates from PL.
  4. Determine the value of maxX using getfuncparams, defaulting to false if not provided.
  5. If maxX is false, find the points with the minimum x value. If maxX is true, find the points with the maximum x value.
  6. Among the points found in the previous step, find the one with the minimum y value.
  7. Identify the index k of this point in the original list PLorg.
  8. Assign the point P from PLorg using the index k.
  9. If no output is requested, plot the points using SGfigure, highlighting the point P in red.
Algorithm explaination created using ChatGPT on 2025-08-19 00:07. (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