M-File Help: plot_sphere | View code for plot_sphere |
Plot spheres
plot_sphere(C, R, color) add spheres to the current figure. C is the centre of the sphere and if its a 3xN matrix then N spheres are drawn with centres as per the columns. R is the radius and color is a Matlab color spec, either a letter or 3-vector.
H = plot_sphere(C, R, color) as above but returns the handle(s) for the spheres.
H = plot_sphere(C, R, color, alpha) as above but alpha specifies the opacity of the sphere were 0 is transparant and 1 is opaque. The default is 1.
Create four spheres
plot_sphere( mkgrid(2, 1), .2, 'b')
and now turn on a full lighting model
lighting gouraud light
© 1990-2012 Peter Corke.