pplot

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Visualization
Introduced first in SolidGeometry 1.0, Creation date: 2010-08-06, Last change: 2025-09-14

pplot shows a 3D-plot figure of a point or a list of points

Description

p is a list 2xn or 3xn

See Also: aplot , lplot , tfplot , tlplot , slplot , plotTP , plotL , plotT

Example Illustration

 missing image of pplot(p,c,w)

Syntax

h=pplot(p,[c,w])

Input Parameter

p: Point or list of points to be plotted 2xn or 3xn
c: Color and symbol of points
w: width of the used line

Output Parameter

h: Handle to figure

References

- Kerle, H., Pittschellis, R. Corves, B. (2007): Einführung in die Getriebelehre, B.G. Teubner Verlag, 3. Auflage



Copyright 2010-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)

Input Parameters:

Output:

Algorithm Steps:

  1. Check if the input p has exactly 2 elements. If so, convert it to a 3-element column vector by appending a zero: p = [p(1); p(2); 0].
  2. If p is a 2xn matrix, convert it to a 3xn matrix by appending a row of zeros: p = [p; zeros(size(p,2),1)'].
  3. Set the default color and symbol c to 'r*-' if not provided.
  4. Set the default line width w to 1 if not provided.
  5. Use the plot3 function to create a 3D plot of the points in p:
    • If w is 1, call plot3(p(1,:), p(2,:), p(3,:), c).
    • If w is not 1, call plot3(p(1,:), p(2,:), p(3,:), c, 'LineWidth', w).
  6. Return the handle h to the created plot.
Algorithm explaination created using ChatGPT on 2025-08-19 00: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