PLegg

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - PL/Point Lists
Introduced first in SolidGeometry 5.3, Creation date: 2023-03-07, Last change: 2025-09-15

returns the contour of an egg



See Also: PLevolvente , SGegg

Example Illustration

 missing image of PLegg(r,a)

Syntax

PL=PLegg([r,a])

Input Parameter

r: radius of evolvente
a: angle of evolvente

Output Parameter

PL: Point list

Examples


PLegg(10)
PLegg(10,1.1*pi)




Copyright 2023-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 contour of an egg shape using a closed polygon list. It is part of the SolidGeometry library and was developed by Tim Lueth.

Input Parameters

Output

Algorithm Steps

  1. Retrieve the input parameters r and a using the getfuncparams function. Default values are used if parameters are not provided.
  2. Generate an evolvente using the PLevolvente function with parameters r, a, and a fixed value of 40. Subtract [r 0] from the result to adjust the position.
  3. Calculate the differences dx and dy between the first and last points of the evolvente.
  4. Compute the angle w using atan2(dy, dx).
  5. Rotate the evolvente by -w-pi/2 using the PLtransR function.
  6. Split the rotated evolvente into two parts: PL1 for points with x-coordinates greater than -1e-6, and PL2 as the flipped version of PL1 with x-coordinates negated.
  7. Concatenate PL1 and PL2 to form the complete point list PL.
  8. If no output is requested, plot the results using SGfigure and PLplot functions to visualize the egg shape and its components.
Algorithm explaination created using ChatGPT on 2025-08-18 23:35. (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