updategco

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Visualization
Introduced first in SolidGeometry 4.5, Creation date: 2019-02-14, Last change: 2025-09-14

updates an graphics object with new coordiantes

Description

used in fourBarLinkageplotanimui

See Also: fourBarLinkageplotanimui

Example Illustration

 missing image of updategco(h,PL)

Syntax

updategco([h,PL])

Input Parameter

h: handle to graphics object
PL: new point list

Examples


SGfigure; h=PLplot(PLcircle(10),'b--',4); updategco(h,PLsquare(4,5));




Copyright 2019-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 function, updategco, updates a graphics object with new coordinates. It is part of the SolidGeometry library and is used in the fourBarLinkageplotanimui function.

Input Parameters

Algorithm Steps

  1. Retrieve the handle h from the input parameters or use the current graphics object if h is empty.
  2. Retrieve the new point list PL from the input parameters.
  3. Determine the type of the graphics object using get(h, 'type').
  4. Use a switch statement to handle different types of graphics objects:

Example Usage

The function can be used as follows:

SGfigure; 
h = PLplot(PLcircle(10), 'b--', 4); 
updategco(h, PLsquare(4, 5));

This example creates a figure, plots a circle, and then updates the plot with a square.

Algorithm explaination created using ChatGPT on 2025-08-19 00:21. (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