angleinterv

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 5.1, Creation date: 2021-12-14, Last change: 2025-09-15

shifts an angle intervall table vainto a fixed interval such as [-pi..+pi] or [0 2*pi]

Description

the second value is always in the interval [wins(i,1)+2*pi]
for i=1:size(wins,1)
wins(i,1)=angleshift(wins(i,1),ival);
wins(i,2)=angleshift(wins(i,2),wins(i,1)); %% shifted into the array from wins(1)..wins(1)+2*pi
end


See Also: isincirclesegment , CPLcrosscircseg , angleshift , cplot , circlesegmentofPL

Example Illustration

 missing image of angleinterv(wins,ival);

Syntax

wins=angleinterv(wins,[ival]);

Input Parameter

wins: List of angle delta values [wmin wmax]
ival: [-pi..+pi] or [0 2*pi]

Output Parameter

wins: Values of wins(:,1) in the allowed ival; no delta > 2*pi

Examples


AL=rand(10,2)*3*pi, angleinterv(AL)




Copyright 2021-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 is designed to shift angle intervals into a specified range, either [-pi, +pi] or [0, 2*pi]. It processes a list of angle delta values and ensures that the second value in each interval is within a specific range relative to the first value.

Input Parameters

Output Results

Algorithm Steps

  1. Initialize the original list of angle intervals, worg, with the input wins.
  2. Determine the target interval ival using the function getfuncparams. If ival is not provided, it defaults to [0, 2*pi].
  3. Iterate over each row in wins:
    • Shift the starting angle wins(i,1) into the specified interval ival using the angleshift function.
    • Shift the ending angle wins(i,2) into the range starting from the adjusted wins(i,1) to wins(i,1) + 2*pi.
  4. If no output is requested (nargout == 0), print a debug message indicating the shift of all angle values into the 2*pi interval.
  5. Display the original and new angle intervals in a table format using array2tableTL.
  6. Plot the adjusted angle intervals using the cplot function.
Algorithm explaination created using ChatGPT on 2025-08-19 08:06. (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