mod1circsequ

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 5.1, Creation date: 2021-04-02, Last change: 2025-09-15

returns a forwared sequence from start to end and a backward sequence from start to end

Description

This function is necessary or helpful if, for example, you want to move forward 10 points (theoretically 12+10) in an index sequence with a length of 1:20, starting from position 12, or if you want to move backward 9 steps (theoretically -3) from position 6.

See Also: VLpathdist , mod1

Example Illustration

 missing image of mod1circsequ(s,e,n)

Syntax

[forw,back]=mod1circsequ(s,e,n)

Input Parameter

s: start index
e: end index
n: number of points in the list [1:n]

Output Parameter

forw: [s .. e] always increasing numbers
back: [s .. e] always decreasing numbers

Examples


mod1circsequ(3,10,20);
mod1circsequ(10,3,20);
[a,b]=mod1circsequ (10,20,15) % just 1:15 but required is 10:20




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

Last html export of this page out of FM database by TL: 2025-09-21