updategco([h,PL])
h : | handle to graphics object | |
PL : | new point list |
SGfigure; h=PLplot(PLcircle(10),'b--',4); updategco(h,PLsquare(4,5));
This function, updategco
, updates a graphics object with new coordinates. It is part of the SolidGeometry library and is used in the fourBarLinkageplotanimui
function.
h
from the input parameters or use the current graphics object if h
is empty.PL
from the input parameters.get(h, 'type')
.PL
to a 3D format using VLaddz(CPLofPL(PL))
.XData
, YData
, and ZData
properties of the line object with the new coordinates.PL
has two columns, create a polyshape
object with the points and set it to the Shape
property of the polygon object.PL
has more than two columns, directly set PL
to the Shape
property.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)