VLFLrotsymRLELn

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 1.1, Creation date: 2013-08-14, Last change: 2025-09-14

returns VL and FL for a torus style solid

Description

This procedure rotates a contour given by point list and contour edge list. The code contains some very efficient formulation for closed calculations of surfaces.

See Also: VLFLrotsymRLn , VLFLrotsymRLCL

Example Illustration

 missing image of VLFLrotsymRLELn(RL,CEL,n)

Syntax

[VL,FL]=VLFLrotsymRLELn(RL,CEL,[n])

Input Parameter

RL: Point list 2D
CEL: Contour edge list
n: number of point on the polygon; default is nofrd

Output Parameter

VL: Vertex list of torus solid
FL: Facet list of torus solid

Examples

RL=[5 0; 10 5; 15 10; 15 40],
VLplot (RL,'r*-'), axis equal, view (0,90)
[VL,FL]=VLFLrotsymRLELn (RL,CEL,40);
VLFLplot (VL,FL,'m'), view (30,30)




Copyright 2013-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, VLFLrotsymRLELn, is designed to generate a 3D torus-like solid by rotating a 2D contour around an axis. The function takes in a point list (RL), a contour edge list (CEL), and an optional parameter n, which specifies the number of points on the polygon.

Input Parameters

Output Results

Algorithm Steps

  1. Determine the number of points, n, using the nofrd function based on the maximum x-coordinate in RL. If n is provided as an argument, use that value instead.
  2. Calculate the number of points in the contour, m, using the size of RL.
  3. Generate a circle point list, PL, using the PLcircle function with radius 1 and n points.
  4. Repeat the radius list, RL, n times to form the initial vertex list, VL.
  5. Repeat the circle list, PL, m times and reshape it to match the dimensions of VL.
  6. Calculate the x, y, and z coordinates for the vertices by multiplying the circle coordinates with the radius values and using the z-values from RL.
  7. Form the final vertex list, VL, by combining the x, y, and z coordinates.
  8. Generate the contour wall facet list, FLW, using the FLcontourwallELn function with CEL and m.
  9. Create an offset array, a, to adjust the indices for each rotation step.
  10. Repeat and adjust the facet list, FLW, for each rotation step, ensuring indices wrap around correctly.
  11. Reshape and adjust the facet indices to form the final facet list, FL.
  12. Swap the facet indices using the FLswap function to ensure correct orientation.
Algorithm explaination created using ChatGPT on 2025-08-19 08:18. (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