SGplot4

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

plots a solid in 4 views



See Also: VLFLplot4 , SGplot

Example Illustration

 missing image of SGplot4(SG,)

Syntax

SGplot4(SG,[])

Input Parameter

SG: Solid Geometry

Examples

SGplot4(SGsample(25),'m')



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

The function SGplot4 is designed to plot a solid geometry object in four different views using MATLAB. It is part of the SolidGeometry library and is used for visualization purposes.

Input Parameters

Function Workflow

  1. The function begins by calling SGfigure, which likely sets up a new figure window for plotting.
  2. The plotting area is divided into a 2x2 grid using the subplot function, allowing for four separate plots within the same figure.
  3. Each subplot is configured to display the solid geometry from a different viewpoint:
    • subplot(2,2,1); view(90,0); - This sets the first subplot to show a side or left view of the solid.
    • subplot(2,2,2); view(0,0); - This sets the second subplot to show a side or front view of the solid.
    • subplot(2,2,4); view(0,90); - This sets the fourth subplot to show a top view of the solid.
    • subplot(2,2,3); view(30,30); - This sets the third subplot to show a 3D perspective view of the solid.
  4. In each subplot, the SGplotalpha function is called with the solid geometry and any additional parameters. This function is responsible for the actual rendering of the solid in the specified view.
  5. Each subplot is given a title corresponding to the view it represents (e.g., "side/left", "side/front", "top", "3D").

The function does not return any values; its purpose is solely to create a visual representation of the solid geometry in multiple views.

Algorithm explaination created using ChatGPT on 2025-08-18 22:30. (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