This function needs three input parameters:
*position of the circle midpoint
*vector perpendicular to the surface in which the circle is plotted.
With help of scatter3, the circle is plotted into the current axes and the handle for the new plot is returned to the user
I works well (my version is 2011b).
May I suggest that you use plot3 instead of scatter3 as the graphic becomes really slow when many circles are superimposed in 1 plot?
I modified the last line of the code such that
h_circle=plot3(x, y, z, 'Parent', hAxis);
It would also be useful if the code accepts multiple circle inputs.
V 1.1 :Updated as suggested by Atipong => scatter3 replaced by plot3, worked well in a first try
The finding of the second vector (v) has been simplified and is more stable now.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.