Syntax
PL=PLegg([r,a])
Input Parameter
r : | | radius of evolvente |
a : | | angle of evolvente |
Output Parameter
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
- r: Radius of the evolvente. Default value is 10 if not provided.
- a: Angle of the evolvente. Default value is À if not provided.
Output
- PL: A point list representing the contour of the egg shape.
Algorithm Steps
- Retrieve the input parameters
r
and a
using the getfuncparams
function. Default values are used if parameters are not provided.
- 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.
- Calculate the differences
dx
and dy
between the first and last points of the evolvente.
- Compute the angle
w
using atan2(dy, dx)
.
- Rotate the evolvente by
-w-pi/2
using the PLtransR
function.
- 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.
- Concatenate
PL1
and PL2
to form the complete point list PL
.
- 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