Last change of this documentation page: 2022-06-02 of SolidGeometry 2.8
depfunTL(fname,par)- returns all dependency files of a function that are not part of a toolbox

depfunTL(fname,par)% depfunTL(fname,par) - returns all dependency files of a fnctn that are not part of a toolbox
% (by Tim Lueth, VLFL-Lib, 2016-JUN-05 as class: AUXILIARY PROCEDURES)
%
% This fnctn is using instad of depfun (2014b) now comptabile to 2015a
% the fnctn matlab.codetools.requiredFilesAndProducts. It works similar
% to depfun ('fnctnname'), which without '-toponly' seems to be instable
% in 2012b
% depfunTL shows all procedures that are used in a procedure
% depuseTL shows all procedures that uses a named procedure
%
% Will be replaced by
% a=matlab.codetools.requiredFilesAndProducts('exp_2015_09_30')
%
% (Status of: 2017-01-03)
%
% See also: publishTL, pcodeTL, depuseTL, depuseString
%
% [PL,ML]=depfunTL(fname,[par])
% === INPUT PARAMETERS ===
% fname: fnctn name
% par: parameter such as '-toponly'
% === OUTPUT RESULTS ======
% PL: List of private fnctns
% ML: List of matlab fnctns
%
% EXAMPLE: Depency files of FTelement.m
% depfunTL ('FTelement')
%
%

exp_2016_02_20- EXPERIMENT to create graphs and FEM networks

exp_2016_02_20%% HAND-OUT: EXP_2016_02_20 EXPERIMENT TO CREATE GRAPHS AND FEM NETWORKS
% * (by Tim Lueth, VLFL-Lib, 2016-FEB-20 as class: EXPERIMENTS)
% * *Please feel free to read it - and put it back*
% * *If somebody is interested in this document, please ask Tim Lueth for an additional copy*

%%

% exp_2016_02_20 - EXPERIMENT to create graphs and FEM networks
% (by Tim Lueth, VLFL-Lib, 2016-FEB-20 as class: EXPERIMENTS)
%
% This experiment is initiated by reading the book of Frank-Thomas
% Mellert (1980) "Rechnergestützter Entwurf elektrischer Schaltungen"
% explaining the background of electrical network analysis programs known
% as SPICE. (The book was a gift of Wolfgang Hilberg to Tim Lueth, Nov
% 1986. It was an addition to the introduction of the "Modified Node
% Analyses" explained by Martin Bossert to Tim Lueth in Nov. 1985.) Part
% of the second chapter is a short explanation how to solve linear
% equation systems and partial differential equation systems using
% numerical mathematics.
% Tim Lueth is interested to implement the methods in MATLAB since those
% equation systems are the basics of statics (structural analysis),
% elastostatics of rigid bodies and textiles as well as of electrical
% networks.
%
% (Status of: 2016-02-21)
%
% LITERATURE:
% - Frank-Thomas Mellert (1981): Rechnergestützter Entwurf elektrischer
% Schaltungen, Oldenbourg, München
%
% exp_2016_02_20
%

centerVL(VL)- returns the center and distance indices of a vertex list

centerVL(VL)% centerVL(VL) - returns the center and distance indices of a vertex list
% (by Tim Lueth, VLFL-Lib, 2016-FEB-14 as class: ANALYTICAL GEOMETRY)
%
% Auxiliary fnctn to find nearest points to a cloud center (Status of:
% 2018-08-20)
%
% Introduced first in SolidGeometry 2.8
%
% See also: center3P, center4P, centerPL
%
% [c,ci,d,n]=centerVL(VL)
% === INPUT PARAMETERS ===
% VL: Vertex list (nx3)
% === OUTPUT RESULTS ======
% c: center
% ci: index list of nearest vertices
% d: distance vector to center (nx3)
% n: distance norm to center (nx1)
%
% EXAMPLE: Show the center of a random list
% centerVL (rand(100,3))
% centerVL(VLtransR(VLaddz(PLcircle(2)),rot(0,pi/3,pi/3)))
%
%
% See also: center3P, center4P, centerPL
%
%
% Copyright 2016-2021 Tim C. Lueth

exp_2016_02_13- EXPERIMENT to create graphs and FEM networks

exp_2016_02_13%% HAND-OUT: EXP_2016_02_13 EXPERIMENT TO CREATE GRAPHS AND FEM NETWORKS
% * (by Tim Lueth, VLFL-Lib, 2016-FEB-13 as class: EXPERIMENTS)
% * *Please feel free to read it - and put it back*
% * *If somebody is interested in this document, please ask Tim Lueth for an additional copy*

%%

% exp_2016_02_13 - EXPERIMENT to create graphs and FEM networks
% (by Tim Lueth, VLFL-Lib, 2016-FEB-13 as class: EXPERIMENTS)
%
% This experiment is initiated by reading the book of Frank-Thomas
% Mellert (1980) "Rechnergestützter Entwurf elektrischer Schaltungen"
% explaining the background of electrical network analysis programs known
% as SPICE. (The book was a gift of Wolfgang Hilberg to Tim Lueth, Nov
% 1986. It was an addition to the introduction of the "Modified Node
% Analyses" explained by Martin Bossert to Tim Lueth in Nov. 1985.) Part
% of the second chapter is a short explanation how to solve linear
% equation systems and partial differential equation systems using
% numerical mathematics.
% Tim Lueth is interested to implement the methods in MATLAB since those
% equation systems are the basics of statics (structural analysis),
% elastostatics of rigid bodies and textiles as well as of electrical
% networks.
%
% (Status of: 2016-02-15)
%
% [VL,FL,BL,A,VT]=exp_2016_02_13
% === OUTPUT RESULTS ======
% VL: Vertex list
% FL: Facet list
% BL: Bow list (arbitrarily directed edges)
% A: Bow-Edge-Incidence-Matrix
% VT: Vertex tree (n x [end vi,bow, start vi])
%

VLFLplotlightoff- switches the camlights on or off

VLFLplotlightoff% VLFLplotlightoff - switches the camlights on or off
% (by Tim Lueth, VLFL-Lib, 2016-JAN-10 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 2.8
%
% See also: rotate3dlight
%
% VLFLplotlightoff
%
% See also: rotate3dlight
%
%
% Copyright 2016-2020 Tim C. Lueth

implot(I,newx,newp)- plots an image as scaled texture

implot(I,newx,newp)% implot(I,newx,newp) - plots an image as scaled texture
% (by Tim Lueth, VLFL-Lib, 2016-JAN-10 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 2.8
%
% See also: imread, getframeaxis
%
% h=implot(I,[newx,newp])
% === INPUT PARAMETERS ===
% I: Image (just nxmx colors) or struct containing cdata and axis
% newx: length of the xaxis
% newp: origin; default is [0 0 0];
% === OUTPUT RESULTS ======
% h: handle
%
% EXAMPLE:
% PLcircle(4);
% I=imread('cameraman.tif');
% h=implot(I,2,[-3 -3])
%
% SGbox; view(0,90); I=getframeaxis(gca); figure(123); implot(I); axis equal;
%
% See also: imread, getframeaxis
%
%
% Copyright 2016-2022 Tim C. Lueth

exp_2016_01_10;- EXPERIMENT

exp_2016_01_10;%% PUBLISHABLE EXP_2016_01_10; EXPERIMENT
% (by Tim Lueth, VLFL-Lib, 2016-JAN-10 as class: EXPERIMENTS)

%%

% exp_2016_01_10; - EXPERIMENT
% (by Tim Lueth, VLFL-Lib, 2016-JAN-10 as class: EXPERIMENTS)
%
% Tim Lueth got 3 bended bars from Marcus Rompf on 2015-01-09 of an
% accordion bass mechanic. TL's goal (Status of: 2016-01-10)
%
% SG=exp_2016_01_10;
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%

CPLarea(CPL)- returns the area of the surfaces (VL/PL)

CPLarea(CPL)% CPLarea(CPL) - returns the area of the surfaces (VL/PL)
% (by Tim Lueth, VLFL-Lib, 2016-JAN-10 as class: SURFACES)
%
% With respect to Heron: A=sqrt(s(s-a)(s-b)(S-c)); s=0.5*(a+b+c).
% New code created with classe polyshape,introduced in R2017b
% (Status of: 2018-10-18)
%
% Introduced first in SolidGeometry 2.8
%
% See also: SGarea, VLFLarea, CPLlength
%
% [ASUM,A]=CPLarea(CPL)
% === INPUT PARAMETERS ===
% CPL: Closed Polygon List
% === OUTPUT RESULTS ======
% ASUM: Area sum of the surface boundaries
% A: Area list for facet list
%
% EXAMPLE:
% CPLarea(CPLsample(12))
% [a,b]=CPLarea_ps(CPLsample(12))
%
% See also: SGarea, VLFLarea, CPLlength
%
%
% Copyright 2016-2022 Tim C. Lueth

SGvolume(SG,sz)- returns the estimated volume of a solid

SGvolume(SG,sz)% SGvolume(SG,sz) - returns the estimated volume of a solid
% (by Tim Lueth, VLFL-Lib, 2016-JAN-10 as class: ANALYTICAL GEOMETRY)
%
% In contrast to SGweight, this fnctn slices the solid. It uses fnctn
% CPLofSGslice2 (Status of: 2019-07-28)
%
% Introduced first in SolidGeometry 2.8
%
% See also: SGweight, VMofSG, CPLofSGslice2, SGseparate, CPLofSGslice
%
% [VSUM,A]=SGvolume(SG,[sz])
% === INPUT PARAMETERS ===
% SG: Solid Geoemtry
% sz: step size in z; default is 1
% === OUTPUT RESULTS ======
% VSUM: Volume in cm^3
% A: Area of the individual slices
%
% See also: SGweight, VMofSG, CPLofSGslice2, SGseparate, CPLofSGslice
%
%
% Copyright 2016-2019 Tim C. Lueth

CPLarea_2016(CPL,sep)- returns the area of the surfaces (VL/PL)

CPLarea_2016(CPL,sep)% CPLarea_2016(CPL,sep) - returns the area of the surfaces (VL/PL)
% (by Tim Lueth, VLFL-Lib, 2016-JAN-10 as class: SURFACES)
%
% =======================================================================
% OBSOLETE (2018-10-18) - USE 'CPLarea' INSTEAD
% =======================================================================
%
% With respect to Heron: A=sqrt(s(s-a)(s-b)(S-c)); s=0.5*(a+b+c).
% (Status of: 2018-08-27)
%
% Introduced first in SolidGeometry 2.8
%
% See also: [ CPLarea ] ; SGarea, VLFLarea, CPLarea
%
% [ASUM,A]=CPLarea_2016(CPL,[sep])
% === INPUT PARAMETERS ===
% CPL: Closed Polygon List
% sep: true=calculate each contour separately; default is false
% === OUTPUT RESULTS ======
% ASUM: Area of the surfaces
% A: Area list for facet list
%
% EXAMPLE: Try:
% CPLarea(CPLsample(12))
% CPLarea(CPLsample(12),true)
%
% See also: [ CPLarea ] ; SGarea, VLFLarea, CPLarea
%
%
% Copyright 2016-2018 Tim C. Lueth

SGarea(SG)- returns the area of the surfaces (VL/PL)

SGarea(SG)% SGarea(SG) - returns the area of the surfaces (VL/PL)
% (by Tim Lueth, VLFL-Lib, 2016-JAN-10 as class: SURFACES)
%
% With respect to Heron: A=sqrt(s(s-a)(s-b)(S-c)); s=0.5*(a+b+c).
% (Status of: 2016-01-10)
%
% See also: SGarea, VLFLarea, CPLarea
%
% [ASUM,A]=SGarea(SG)
% === INPUT PARAMETERS ===
% SG: Solid Geoemtry
% === OUTPUT RESULTS ======
% ASUM: Area of the surfaces
% A: Area list for facet list
%
% EXAMPLE: Try:
% SGarea(SGbox([30,20,10])
%

VLFLarea(VL,FL,fil)- returns the area of the surfaces (VL/PL)

VLFLarea(VL,FL,fil)% VLFLarea(VL,FL,fil) - returns the area of the surfaces (VL/PL)
% (by Tim Lueth, VLFL-Lib, 2016-JAN-10 as class: SURFACES)
%
% With respect to Heron: A=sqrt(s(s-a)(s-b)(S-c)); s=0.5*(a+b+c).
% This fnctn support point lists (2D) or vertex lists (3D)
% (Status of: 2016-01-10)
%
% Introduced first in SolidGeometry 2.8
%
% See also: SGarea, CPLarea
%
% [ASUM,A]=VLFLarea(VL,FL,[fil])
% === INPUT PARAMETERS ===
% VL: Vertex list (nx3) or Point List (nx2)
% FL: Facet list
% fil: optional list of facet; default is 1:size(FL,1)
% === OUTPUT RESULTS ======
% ASUM: Area of the surfaces
% A: Area list for facet list
%
% EXAMPLE: Try:
% VLFLarea([0 0; 10 0; 10 10; 0 10],[1 2 3; 1 3 4])
%
% See also: SGarea, CPLarea
%

synth4Bar3Pose(C1,D1,C2,D2,C3,D3,d)- returns 4 points for a 4 Bar linkage

synth4Bar3Pose(C1,D1,C2,D2,C3,D3,d)% synth4Bar3Pose(C1,D1,C2,D2,C3,D3,d) - returns 4 points for a 4 Bar
% linkage
% (by Tim Lueth, VLFL-Lib, 2016-JAN-08 as class: KINEMATICS AND FRAMES)
%
% 3 Pose synthesis for a 4 Bar Linkage based on two specified poses: By
% describing 3 coupler poses by 2 points (C1_D1, C2_D2, C3_D3) each.
% (Status of: 2016-01-08)
%
% See also: synth4Bar2Pose, plot4Bar, calc4BarAngle, cross2circ,
% synth4Bar3Pose,
%
% LITERATURE:
% - Kerle, H., Pittschellis, R. Corves, B. (2007): Einführung in die
% Getriebelehre, B.G. Teubner Verlag, 3. Auflage
%
% [A0,B0,A1,B1]=synth4Bar3Pose(C1,D1,C2,D2,C3,D3,[d])
% === INPUT PARAMETERS ===
% C1: Coupler point C Pose 1
% D1: Coupler point D Pose 1
% C2: Coupler point C Pose 2
% D2: Coupler point D Pose 2
% C3: Coupler point C Pose 3
% D3: Coupler point D Pose 3
% d: distance from C1/C2/C3 to A1/A2/A3; default [1 -1]
% === OUTPUT RESULTS ======
% A0: Base link A
% B0: Base link B
% A1: End link A
% B1: End link B
%
% EXAMPLE: Try
% synth4Bar3Pose([0 2],[3 2],[1 6],[5 6],[6 5],[8 5])
%

plot4Bar(A0,B0,A1,B1,wl,cc)- plots a 4-Bar-linkage

plot4Bar(A0,B0,A1,B1,wl,cc)% plot4Bar(A0,B0,A1,B1,wl,cc) - plots a 4-Bar-linkage
% (by Tim Lueth, VLFL-Lib, 2016-JAN-08 as class: KINEMATICS AND FRAMES)
%
% simple procedure to animate the movement of a 4-Bar-linkage. Uses
% calc4BarAngle for movement calcualtion (Status of: 2018-08-24)
%
% Introduced first in SolidGeometry 2.8
%
% See also: calc4BarAngle, synth4Bar2Pose, cross2circ
%
% plot4Bar(A0,B0,A1,B1,[wl,cc])
% === INPUT PARAMETERS ===
% A0: Base point of link A
% B0: Base point of link B
% A1: End point of link A
% B1: End point of link B
% wl: list of angles; default is [0..2pi]
% cc: color of the coupler; default is ''
%
% EXAMPLE: Try
% SGfigure; plot4Bar([0 0],[5 1],[6 3],[10 0],'','b-')
%
% See also: calc4BarAngle, synth4Bar2Pose, cross2circ
%
%
% Copyright 2016-2018 Tim C. Lueth

calc4BarAngle(A0,B0,A1,lb,lc)- returns 4-Bar-Linkage points for link B

calc4BarAngle(A0,B0,A1,lb,lc)% calc4BarAngle(A0,B0,A1,lb,lc) - returns 4-Bar-Linkage points for link B
% (by Tim Lueth, VLFL-Lib, 2016-JAN-08 as class: KINEMATICS AND FRAMES)
%
% calculation of the end point(s) of link B of a 4-Bar-linkage for a
% given position. (Status of: 2018-08-24)
%
% Introduced first in SolidGeometry 2.8
%
% See also: synth4Bar2Pose, cross2circ, plot4Bar
%
% [B1,B1a,x,y,e,o]=calc4BarAngle(A0,B0,A1,lb,lc)
% === INPUT PARAMETERS ===
% A0: Base point of link A
% B0: Base point of link B
% A1: Position of point A1
% lb: length of link B
% lc: length of coupler (A1B1)
% === OUTPUT RESULTS ======
% B1: Right hand solution for positive x
% B1a: Left hand solution for positive x
% x: straight distance from A1B0
% y: orthogonal distance from A1B0
% e: unit vector A1B0
% o: orthogonal vector A1B0
%
% EXAMPLE: try
% calc4BarAngle ([0 0],[4 0],[-1 5],2,6)
%
% See also: synth4Bar2Pose, cross2circ, plot4Bar
%
%
% Copyright 2016-2018 Tim C. Lueth

cross2circ(A0,B0,ra,rb);- returns the crossing points of two circles

cross2circ(A0,B0,ra,rb);% cross2circ(A0,B0,ra,rb); - returns the crossing points of two circles
% (by Tim Lueth, VLFL-Lib, 2016-JAN-08 as class: ANALYTICAL GEOMETRY)
%
% Similar to circcirc (mapping toolbox) but without using a toolbox plus
% drawing the result. Only real solutions are return; else NaN NaN
%
% Change name to cross2C, crossLC (Status of: 2019-05-03)
%
% Introduced first in SolidGeometry 2.8
%
% See also: tangent2circ, circcirc, wofcross2circ, crosscircline,
% PLof3dist, PLchordof2PR, crossz, PLcross2Lines
%
% [Q1,Q2,x,y,e,o]=cross2circ(A0,B0,ra,rb);
% === INPUT PARAMETERS ===
% A0: Center of circle A
% B0: Center of circle B
% ra: Radius of circle A
% rb: Radius of circle B
% === OUTPUT RESULTS ======
% Q1: Solution right hand to A0B0 for positive x
% Q2: Solution left hand to A0B0 for positive x
% x: distance from A0 to B0
% y: orthogonal from A0+e*x
% e: unit direction vector
% o: unit orthogonal vector
%
% EXAMPLE: try
% cross2circ([0 0],[4 0],4,2) % 2 Solutions
% cross2circ([0 0],[4 0],2,2) % 1 Solution
% cross2circ([0 0],[4 0],1,6) % No Solution
%
% See also: tangent2circ, circcirc, wofcross2circ, crosscircline,
% PLof3dist, PLchordof2PR, crossz, PLcross2Lines
%
%
% Copyright 2016-2019 Tim C. Lueth

synth4Bar2Pose(C1,D1,C2,D2,d,la,lb)- returns 4 points for a 4 Bar linkage

synth4Bar2Pose(C1,D1,C2,D2,d,la,lb)% synth4Bar2Pose(C1,D1,C2,D2,d,la,lb) - returns 4 points for a 4 Bar
% linkage
% (by Tim Lueth, VLFL-Lib, 2016-JAN-07 as class: KINEMATICS AND FRAMES)
%
% 2 Pose synthesis for a 4 Bar Linkage based on two specified poses: By
% describing 2 coupler poses by 2 points (C1-D1 and C2-D2) each, the two
% lines are constructed where the base frames A0 and B0 must be located.
% The coupler may have a fixed location relative to the links A0-A1 and
% B0-B1. Also it is possible to give an exact distance for A0 and B0 from
% the middle points mA and mB. (Status of: 2016-01-08)
%
% See also: synth4Bar2Pose, plot4Bar, calc4BarAngle, cross2circ
%
% LITERATURE:
% Kerle, H., Pittschellis, R. Corves, B. (2007): Einführung in die
% Getriebelehre, B.G. Teubner Verlag, 3. Auflage
%
% [A0,B0,A1,B1,P12]=synth4Bar2Pose(C1,D1,C2,D2,[d,la,lb])
% === INPUT PARAMETERS ===
% C1: Coupler point C Pose 1
% D1: Coupler point D Pose 1
% C2: Coupler point C Pose 2
% D2: Coupler point D Pose 2
% d: distance from C1/C2/ to A1/A2
% la: length from mA to A0
% lb: length from mB to B0
% === OUTPUT RESULTS ======
% A0: Base link A
% B0: Base link B
% A1: End link A
% B1: End link B
% P12: Pole (A0=B0)
%
% EXAMPLE: Try
% synth4Bar2Pose([0 0],[5 0],[6 3],[10 0])
% synth4Bar2Pose([0 2],[5 2],[0 5],[5 5])
% synth4Bar2Pose([0 0],[5 0],[6 3],[10 0],[0 -1],0,0)
%
%

CPLofSGslice2(SG,z)- return slices of a separated SG

CPLofSGslice2(SG,z)% CPLofSGslice2(SG,z) - return slices of a separated SG
% (by Tim Lueth, VLFL-Lib, 2016-JAN-07 as class: SLICES)
%
% Same as SGslice, but does support separated objects. It also has
% includes code that corrects problems by vertices near the slicing plane.
% The slicer fnctns differ a little bit
% CPLofSGslice - Single Slice
% CPLofSGslice2 - Slices in a list of z values
% CPLofSGslice3 - Slicing in 3 dimensions at the same time, several
% slices (returns also CVL)
% CVLofSGslices - Slices in z (return CVL)
% SGslicer - Basic fnctn behind all of the above (Status of: 2019-07-01)
%
% Introduced first in SolidGeometry 2.8
%
% See also: SGslicer, CPLofSGslice, CPLofSGslice3, CVLofSGslices
%
% CPL=CPLofSGslice2(SG,z)
% === INPUT PARAMETERS ===
% SG: Solid geometry; incl. separated objects
% z: z-plane to slice
% === OUTPUT RESULTS ======
% CPL: CPL of the sliced plane
%
% See also: SGslicer, CPLofSGslice, CPLofSGslice3, CVLofSGslices
%
%
% Copyright 2016-2019 Tim C. Lueth

TofDPhi(D,Phi)- returns a 3x3 HT matrix for 2D link

TofDPhi(D,Phi)% TofDPhi(D,Phi) - returns a 3x3 HT matrix for 2D link
% (by Tim Lueth, HT-Lib, 2016-JAN-07 as class: KINEMATICS AND FRAMES)
%
% Similar to VLtransR, VLtransP, VLtransT (Status of: 2018-09-29)
%
% Introduced first in SolidGeometry 2.8
%
% See also: TofR, TofVL, TPL, TofDPhiH, T3ofT2, T3P, T2P, TofP, TofPez,
% TofPEul
%
% T=TofDPhi(D,Phi)
% === INPUT PARAMETERS ===
% D: Distance in X
% Phi: rotation around Z
% === OUTPUT RESULTS ======
% T: 3x3 HT matrix (2D)
%
% See also: TofR, TofVL, TPL, TofDPhiH, T3ofT2, T3P, T2P, TofP, TofPez,
% TofPEul
%
%
% Copyright 2016-2018 Tim C. Lueth

T3ofT2(T,z)- converts a 3x3 HT-Matrix into a 4x4 HT-Matrix

T3ofT2(T,z)% T3ofT2(T,z) - converts a 3x3 HT-Matrix into a 4x4 HT-Matrix
% (by Tim Lueth, HT-Lib, 2016-JAN-06 as class: KINEMATICS AND FRAMES)
%
% helpful for planar mechanism design.
% Since SG-Lib 4.5 support of lists of HT matrices ( 3 x 3 x n )
% (Status of: 2019-01-30)
%
% Introduced first in SolidGeometry 2.8
%
% See also: TofR, TofVL, TPL, TofDPhiH, T2ofT3, T3P, T2P
%
% T=T3ofT2(T,[z])
% === INPUT PARAMETERS ===
% T: 3x3 HT Matrix
% z: optional z value
% === OUTPUT RESULTS ======
% T: 4x4 HT Matrix
%
% EXAMPLE:
% T=TofPose(Posesample(7)),
% T3ofT2(T)
%
% See also: TofR, TofVL, TPL, TofDPhiH, T2ofT3, T3P, T2P
%
%
% Copyright 2016-2019 Tim C. Lueth

TofR(R,t,w)- returns a HT matrix for an R matrix

TofR(R,t,w)% TofR(R,t,w) - returns a HT matrix for an R matrix
% (by Tim Lueth, HT-Lib, 2016-JAN-06 as class: KINEMATICS AND FRAMES)
%
% Supports 2x2 and 3x3 rotation matrices. (Status of: 2020-07-26)
%
% Introduced first in SolidGeometry 2.8
%
% See also: TofR, TofVL, TPL, TofDPhiH, T3ofT2, T3P, T2P, TofP, TofPez,
% TofPEul, TofT, TofTrel
%
% T=TofR(R,[t,w])
% === INPUT PARAMETERS ===
% R: Rotation matrix 2x3 or 3x3
% t: optional translation vector (x y) or [x y z]
% w: optional torsion angle at the end
% === OUTPUT RESULTS ======
% T: 3x3 or 4x4 transformation matrix
%
% EXAMPLE: Try:
% TofR(rotdeg(30))
% TofR(rotdeg(30,40,30))
% TofR(rotdeg(30),[1 2])
% TofR(rotdeg(30,40,30),[1 2 3])
%
% See also: TofR, TofVL, TPL, TofDPhiH, T3ofT2, T3P, T2P, TofP, TofPez,
% TofPEul, TofT, TofTrel
%
%
% Copyright 2016-2021 Tim C. Lueth

SGTget(SGN,N)- returns a named frame of a solid geometry

SGTget(SGN,N)% SGTget(SGN,N) - returns a named frame of a solid geometry
% (by Tim Lueth, VLFL-Lib, 2016-JAN-05 as class: KINEMATICS AND FRAMES)
%
% returns the T transformation matrix for a named frame
% (Status of: 2020-09-11)
%
% Introduced first in SolidGeometry 2.8
%
% See also: SGTget, SGTset, SGTplot, SGTremove, SGTui, SGTsetBF, SGTrename
%
% [T,a]=SGTget(SGN,[N])
% === INPUT PARAMETERS ===
% SGN: Solid Geometry
% N: Name of required Frame, or ez vector
% === OUTPUT RESULTS ======
% T: Frame matrix
% a: index in Tname (Does work only in structs not in cells)
%
% EXAMPLE: Return a previously set frame:
% SG=SGbox([30,20,10]); SG=SGTset(SG,'A',TofDPhiH([3,6],pi/6,5)); SGT(SG);
% SGTget(SG,'A')
% SGTget(SGsample(40),[0 0 1]);
%
% See also: SGTget, SGTset, SGTplot, SGTremove, SGTui, SGTsetBF, SGTrename
%
%
% Copyright 2016-2022 Tim C. Lueth

SGTset(SGN,N,T,TFiL)- sets or replaces a named frame of a solid geometry

SGTset(SGN,N,T,TFiL)% SGTset(SGN,N,T,TFiL) - sets or replaces a named frame of a solid geometry
% (by Tim Lueth, VLFL-Lib, 2016-JAN-05 as class: KINEMATICS AND FRAMES)
%
% returns the updated SG including the new frame
% see also fnctn TofFS with example TofFS(SGsample(27),[0 0 1])
% (Status of: 2020-07-24)
%
% Introduced first in SolidGeometry 2.8
%
% See also: SGTget, SGTsetBFsimple, SGTsetBF, SGTplot, SGTremove, SGTui,
% TofFS, TofFSui
%
% SGN=SGTset(SGN,N,[T,TFiL])
% === INPUT PARAMETERS ===
% SGN: Solid Geometry
% N: Name of required Frame
% T: 4x4 matrix of the Frame; if empty SGTui is called
% TFiL: optional surface facet index that define the frame's surface
% === OUTPUT RESULTS ======
% SGN: Frame matrix
%
% EXAMPLE: Set a HT Matrix
% SG=SGbox([30,20,10]); SG=SGTset(SG,'A',TofDPhiH([3,6],pi/6,5)); SGT(SG)
% TofFS(SGsample(27),[0 0 1])
%
% See also: SGTget, SGTsetBFsimple, SGTsetBF, SGTplot, SGTremove, SGTui,
% TofFS, TofFSui
%
%
% Copyright 2016-2022 Tim C. Lueth

exp_2016_01_03a- EXPERIMENT to work in the direction of Chamfers

exp_2016_01_03a% exp_2016_01_03a - EXPERIMENT to work in the direction of Chamfers
%
% (by Tim Lueth, VLFL-Lib, 2016-JAN-03 as class: EXPERIMENTS)
%
% This experiment adds to all facets additional points near the vertices
% and creates the missing facets. The absolute number of vertices ins
% increased the number of facets is multiplied by 7! (Status of:
% 2016-01-03)
%
% FL=exp_2016_01_03a
% === OUTPUT RESULTS ======
% FL:
%

exp_2016_01_02a- EXPERIMENT to show the improvement of Radialedges

exp_2016_01_02a% exp_2016_01_02a - EXPERIMENT to show the improvement of Radialedges
% (by Tim Lueth, VLFL-Lib, 2016-JAN-02 as class: EXPERIMENTS)
%
% exp_2016_01_02a
%

exp_2016_01_02- EXPERIMENT explaining appereance of noise

exp_2016_01_02% exp_2016_01_02 - EXPERIMENT explaining appereance of noise
% (by Tim Lueth, VLFL-Lib, 2016-JAN-02 as class: EXPERIMENTS)
%
% 'Details', 'Noise' arise from Boolean operations of polygons.
% They have to be removed by
% a) removing the details after the operation
% b) understanding the rising of the problems (Status of: 2016-01-02)
%
% exp_2016_01_02
%

exp_2015_12_30- EXPERIMENT for a leightweight plate

exp_2015_12_30% exp_2015_12_30 - EXPERIMENT for a leightweight plate
% (by Tim Lueth, VLFL-Lib, 2015-DEZ-30 as class: EXPERIMENTS)
%
% exp_2015_12_30
%

exp_2015_12_29a- EXPERIMENT that creates frame with radial edges

exp_2015_12_29a% exp_2015_12_29a - EXPERIMENT that creates frame with radial edges
% (by Tim Lueth, VLFL-Lib, 2015-DEZ-29 as class: EXPERIMENTS)
%
% exp_2015_12_29a
%

CPLfillHoneycomb(PLs,w,d,ww,n)- fills a contour with honeycomb

CPLfillHoneycomb(PLs,w,d,ww,n)% CPLfillHoneycomb(PLs,w,d,ww,n) - fills a contour with honeycomb
% (by Tim Lueth, VLFL-Lib, 2015-DEZ-29 as class: CLOSED POLYGON LISTS)
%
% This fnctn creates starting with [0 0] a honeycomb structure and fills
% nested closed contours (Status of: 2015-12-29)
%
% Introduced first in SolidGeometry 2.8
%
% See also: CPLfillPattern
%
% CPL=CPLfillHoneycomb([PLs,w,d,ww,n])
% === INPUT PARAMETERS ===
% PLs: [x y] or closed contour of the border
% w: width of the wall; default is 0.5
% d: distance between the walls
% ww: width of the border wall; if ww<0 ; ww=distance to pattern
% n: number of walls per cell; default is 6
% === OUTPUT RESULTS ======
% CPL: Closed contour that can be extruded by SGofCPLz
%
% EXAMPLE: Try:
% CPLfillHoneycomb;
% CPLfillHoneycomb(CPLsample(12));
% CPLfillHoneycomb(PLstar(40,12));
% CPLfillHoneycomb([100,30]);
%
% See also: CPLfillPattern
%
%
% Copyright 2015-2018 Tim C. Lueth

exp_2015_12_29(PLs,w,d,ww,n)- EXPERIMENT to create lightweight boards

exp_2015_12_29(PLs,w,d,ww,n)% exp_2015_12_29(PLs,w,d,ww,n) - EXPERIMENT to create lightweight boards
% (by Tim Lueth, VLFL-Lib, 2015-DEZ-29 as class: EXPERIMENTS)
%
% Originally this procedure should create honey comp structures within a
% square. Next step was to add the possibility to have an outer frame or
% none. The last step was to allow different closed contours to create
% honey comp structures inside. So the final example even works with
% CPLsample(12). (Status of: 2015-12-29)
%
% CPL=exp_2015_12_29([PLs,w,d,ww,n])
% === INPUT PARAMETERS ===
% PLs: [x y] or closed contour of the border
% w: width of the wall; default is 0.5
% d: distance between the walls
% ww: width of the border wall; if ww<0 ; ww=distance to pattern
% n: number of walls per cell; default is 6
% === OUTPUT RESULTS ======
% CPL: Closed contour that can be extruded by SGofCPLz
%
% EXAMPLE: Try:
% exp_2015_12_29;
% exp_2015_12_29(CPLsample(12));
% exp_2015_12_29(PLstar(40,12));
% exp_2015_12_29([100,30]);
%

exp_2015_12_23- EXPERIMENT designing a bass cabinet for an IMPERIAL IIA accordion

exp_2015_12_23%% PUBLISHABLE EXP_2015_12_23 EXPERIMENT DESIGNING A BASS CABINET FOR AN IMPERIAL IIA ACCORDION
% (by Tim Lueth, VLFL-Lib, 2015-DEZ-23 as class: EXPERIMENTS)

%%

% exp_2015_12_23 - EXPERIMENT designing a bass cabinet for an IMPERIAL
% IIA accordion
% (by Tim Lueth, VLFL-Lib, 2015-DEZ-23 as class: EXPERIMENTS)
%
% WORK in progess used to optimize the procedures CPL Pattern and
% SGplatesofSGML.
% The Frame 240*180 (Volume 80.65) had a weight of 98 gramm in Acryl ->
% sw=1.22
% The Frame 120*180 (Volume 55.72) had a weight of 68 gramm in Acryl ->
% sw=1.22
% The Frame 120*180 (Volume 55.72) had a weight of 51 gramm in PA ->
% sw=0.92
% Since PA in in fact heavier than water (1.0), the density of PA is 80%
% (Status of: 2015-12-26)
%
% exp_2015_12_23
%

sbufferget(b,n)- reads bytes out of a struct buffer

sbufferget(b,n)% sbufferget(b,n) - reads bytes out of a struct buffer
% (by Tim Lueth, VLFL-Lib, 2015-DEZ-08 as class: USB INTERFACE)
%
% the basic procedures are:
% sbuffercreate - create a buffer
% sbufferinfo - status info about the buffer
% sbufferwrite - write data into the buffer
% sbufferget - read data out of the buffer
% (Status of: 2016-01-01)
%
% [b,rbytes,err]=sbufferget(b,n)
% === INPUT PARAMETERS ===
% b: struct buffer
% n: number of bytes to get
% === OUTPUT RESULTS ======
% b: updated buffer
% rbytes: array with received bytes
% err: error number
%

sbufferwrite(b,mbytes)- writes bytes into a struct buffer

sbufferwrite(b,mbytes)% sbufferwrite(b,mbytes) - writes bytes into a struct buffer
% (by Tim Lueth, VLFL-Lib, 2015-DEZ-08 as class: USB INTERFACE)
%
% the basic fnctns are:
% sbuffercreate - create a buffer
% sbufferinfo - status info about the buffer
% sbufferwrite - write data into the buffer
% sbufferget - read data out of the buffer
% (Status of: 2017-01-29)
%
% See also: sbuffercreate, sbufferinfo, sbufferget
%
% [b,err]=sbufferwrite(b,mbytes)
% === INPUT PARAMETERS ===
% b: struct buffer
% mbytes: bytes array to write
% === OUTPUT RESULTS ======
% b: updated buffer
% err: error number
%

sbufferinfo(b)- returns information on a struct buffer

sbufferinfo(b)% sbufferinfo(b) - returns information on a struct buffer
% (by Tim Lueth, VLFL-Lib, 2015-DEZ-08 as class: USB INTERFACE)
%
% the basic fnctns are:
% sbuffercreate - create a buffer
% sbufferinfo - status info about the buffer
% sbufferwrite - write data into the buffer
% sbufferget - read data out of the buffer
% (Status of: 2017-01-29)
%
% See also: sbuffercreate, sbufferwrite, sbufferget
%
% [f,l,u]=sbufferinfo(b)
% === INPUT PARAMETERS ===
% b: struct buffer
% === OUTPUT RESULTS ======
% f: number of free bytes
% l: maximum number of bytes
% u: number of used bytes
%

sbuffercreate(n)- creates a struct buffer for async read/write

sbuffercreate(n)% sbuffercreate(n) - creates a struct buffer for async read/write
% (by Tim Lueth, VLFL-Lib, 2015-DEZ-08 as class: USB INTERFACE)
%
% len = length of buffer
% anz = number of used bytes of buffer
% buf = data bytes of buffer
% The basic procedures are:
% sbuffercreate - create a buffer
% sbufferinfo - status info about the buffer
% sbufferwrite - write data into the buffer
% sbufferget - read data out of the buffer
% (Status of: 2016-01-01)
%
% b=sbuffercreate([n])
% === INPUT PARAMETERS ===
% n: number of bytes; default is 256
% === OUTPUT RESULTS ======
% b: buffer struct
%

exp_2015_12_08- Experiment that contains FIFO buffer handling

exp_2015_12_08% exp_2015_12_08 - Experiment that contains FIFO buffer handling
% (by Tim Lueth, VLFL-Lib, 2015-DEZ-08 as class: EXPERIMENTS)
%
% The procedures within this experiment are
% sbuffercreate - create a buffer structure
% sbufferinfo - return current buffer status
% sbufferwrite - write data into the buffer
% sbufferget - read data out of the buffer
% (Status of: 2015-12-08)
%
% exp_2015_12_08
%

exp_2015_12_07- writes an SG file with several planes for make things

exp_2015_12_07% exp_2015_12_07 - writes an SG file with several planes for make things
% (by Tim Lueth, VLFL-Lib, 2015-DEZ-07 as class: EXPERIMENTS)
%
% exp_2015_12_07
%

CPLtextimage(text,dt,f,sx,sy,sz,ha)- returns contour of text string

CPLtextimage(text,dt,f,sx,sy,sz,ha)% CPLtextimage(text,dt,f,sx,sy,sz,ha) - returns contour of text string
% (by Tim Lueth, VLFL-Lib, 2015-DEZ-07 as class: TEXT PROCEDURES)
%
% This is q quite generic but very slow procedure! (Status of: 2018-08-27)
%
% Introduced first in SolidGeometry 2.8
%
% See also: CPLtextimage, VLFLtextimage, imageoftext, VLofimage,
% textHorizontalBlockAlign, CPLoftext
%
% [CPL,VL,EL,FL]=CPLtextimage(text,[dt,f,sx,sy,sz,ha])
% === INPUT PARAMETERS ===
% text: Text String / Latex
% dt: Pixel size; Default is 0.25
% f: Font size; Default is 72
% sx: Size in x; default is 0, i.e. no scaling
% sy: Size in y; default is 0, i.e. no scaling
% sz: Size in z; default is 0, i.e. no scaling
% ha: horizontal alignment: 'l' or 'c' or 'r'
% === OUTPUT RESULTS ======
% CPL: Closed Polygon List
% VL: VertexLlist
% EL: Edge List
% FL: Facet List
%
% EXAMPLE:
% CPLtextimage('sin(x)')
%
% See also: CPLtextimage, VLFLtextimage, imageoftext, VLofimage,
% textHorizontalBlockAlign, CPLoftext
%
%
% Copyright 2015-2021 Tim C. Lueth

USBpololu- USB-communication with a Pololu Maestro Controller (Dual-Port Mode)

USBpololu% USBpololu - USB-communication with a Pololu Maestro Controller (Dual-Port Mode)
% (by Tim Lueth, VLFL-Lib, 2015-DEZ-01 as class: USB INTERFACE)
%
% To use the Pololu Maestro Boards with a MAC it is necessary to have
% also a Windows/PC computer ready for downloading the 'Pololu Maestro
% Control Center' that is available for Windows/PC only. You also need
% the "Pololu Maestro Servo Controller User's Guide" as PDF-File
% (https://www.pololu.com/docs/pdf/0J40/maestro.pdf). With respect to
% page 47, the Maestro has to be set in **Dual-Port Mode**, which is very
% easy using the Control Center but not possible without a Windows/PC.
% The port with the smaller number is the command port on a Mac.
%
% The communication was tested successfully with ML2015b using Captain
% OSX 10.11/MacBook Air 2011/MacBook Pro Retina Mid 2012 and a direct
% connection to the Pololu Mini Maestro 12 Controller in sync mode using
% fwrite and fread. It works also connected to a USB hub.
%
% You find distributors of Pololu at: https://www.pololu.com/distributors
% Some distributors in Germany:
% https://nodna.de, http://www.watterott.com, http://www.exp-tech.de
% (Status of: 2015-12-02)
%
% See also: USBhelp, USBsearch
%
% USBpololu
%

USBsearch()- searches for specific USB serial devices on a MAC

USBsearch()% USBsearch() - searches for specific USB serial devices on a MAC
% (by Tim Lueth, VLFL-Lib, 2015-DEZ-01 as class: USB INTERFACE)
%
% On OSX/Mac all connected USB devices are detected by the command:
% [~,out]=system('ioreg -p IOUSB')
% Nevertheless, only if a device driver is installed, the device could be
% found in the directory:
% dir '/dev/tty*'
% Therefor, this fnctn uses an array consisting of Device name,
% Driver-Name, Driver source.
% Afterwards, a serial port object is defined by
% com1=serial('devicedriver')
% Afterwards, this serial object is used to open or close a
% fh=fopen(com1); fh=fclose(com1)
%
% Currently the following devices are supported:
% - NDI Host USB Converter
% - Pololu Mini Maestro 12-Channel USB Servo Controller
% - Keyspan USA-19H
% - Arduino Mega (Status of: 2017-01-29)
%
% See also: USBhelp, USBpololu
%
% USBsearch([])
%
% EXAMPLE: just type
% USBsearch: % Searches for a couple of useful USB serial devices
%

USBhelp- Help text for the use of USB serial communication on MAC

USBhelp% USBhelp - Help text for the use of USB serial communication on MAC
% (by Tim Lueth, VLFL-Lib, 2015-DEZ-01 as class: USB INTERFACE)
%
% Important OSX/Mac Darwin serial communication commands
% [~,found]=system('ioreg -p IOUSB') % returns all USB devices attached
% ls '/dev/tty*' % shows all existing devices with serial communication
%
% Useful Matlab fnctns:
% instrfindall - finds all registered serial port objects (Status of:
% 2017-01-29)
%
% Introduced first in SolidGeometry 2.8
%
% See also: USBhelp, USBsearch, USBpololu
%
% USBhelp
%
% See also: USBhelp, USBsearch, USBpololu
%

exp_2015_12_01 (t)- EXPERIMENT for servo motor controller at OSX/Mac

exp_2015_12_01 (t)% exp_2015_12_01 (t) - EXPERIMENT for servo motor controller at OSX/Mac
% (by Tim Lueth, VLFL-Lib, 2015-DEZ-01 as class: USB INTERFACE)
%
% This file is also used as USBpololu_1 and USBpololu_2
%
% To use the Pololu Maestro Boards with a MAC it is necessary to have
% also a Windows/PC computer ready for downloading the 'Pololu Maestro
% Control Center' that is available for Windows/PC only. You also need
% the "Pololu Maestro Servo Controller User's Guide" as PDF-File
% (https://www.pololu.com/docs/pdf/0J40/maestro.pdf). With respect to
% page 47, the Maestro has to be set in **Dual-Port Mode**, which is very
% easy using the Control Center but not possible without a Windows/PC.
% With the Control Center, Timeout of the Pololu should be set to 0.00ms
% (disable). You should also disable USB sleep mode.
% On MAC, the port with the smaller number is the Command Port of the
% Pololu.
%
% The communication was tested successfully with ML2015b using Captain
% OSX 10.11/MacBook Air 2011/MacBook Pro Retina Mid 2012 and a direct
% connection to the Pololu Mini Maestro 12 Controller in sync mode using
% fwrite and fread. It works also connected to a USB hub.
%
% There is still a problem of Matlab using USB serial connections. After
% 0.5-0.8 seconds, fwrite and fprint fails.
%
% You find distributors of Pololu at: https://www.pololu.com/distributors
% Some distributors in Germany:
% https://nodna.de, http://www.watterott.com, http://www.exp-tech.de
% (Status of: 2015-12-04)
%
% exp_2015_12_01([t])
% === INPUT PARAMETERS ===
% t: target position
%
% EXAMPLE: exp_2015_12_01 (4000+1000*rand)
%

im2stereo (I1,I2)- returns corresponding points within 2 images taken from different view points

im2stereo (I1,I2)% im2stereo (I1,I2) - returns corresponding points within 2 images taken from different view points
% (by Tim Lueth, VLFL-Lib, 2015-NOV-25 as class: VISUALIZATION)
%
% This is just the implementation of the matlab example "Find
% Corresponding Interest Points Between Pair of Images" that easy can be
% used with an iPhone as ipcam. (Status of: 2017-07-14)
%
% Introduced first in SolidGeometry 2.8
%
% See also: ipcam_2014b
%
% im2stereo(I1,I2)
% === INPUT PARAMETERS ===
% I1: RGB image 1
% I2: RGB image 1
%
% EXAMPLE: url='http://192.168.178.67:8020/image.jpg'; I=imread(url);
% close all; imshow(I); I1=I;
% url='http://192.168.178.67:8020/image.jpg'; I=imread(url); close all;
% imshow(I); I2=I;
% im2stereo(I1,I2)
%
% See also: ipcam_2014b
%

depuseToolbox(fname)- analyzes the current directory for the use of MATLAB Toolbox function

depuseToolbox(fname)% depuseToolbox(fname) - analyzes the current directory for the use of MATLAB Toolbox fnctn
% (by Tim Lueth, VLFL-Lib, 2015-OKT-25 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 2.8
%
% See also: depuseString, depuseTL, publishTL, pcodeTL, depfunTL,
% pcodedirTL
%
% [TBFL,TL]=depuseToolbox(fname)
% === INPUT PARAMETERS ===
% fname:
% === OUTPUT RESULTS ======
% TBFL: Toolbox fnct usage list
% TL: Toolbox fnct list
%
% EXAMPLE: Check all VLFL_Examples for Toolbox use:
% depuseToolbox ('VLFL_EX*.m')
%
% See also: depuseString, depuseTL, publishTL, pcodeTL, depfunTL,
% pcodedirTL
%
RapidWeaver Icon

Last Change Oct 2023 for SG-Lib 5.3