Home | Preface | Introduction | Contents | Examples | Card | Erratum
Sphere can be defined by using parametric equation like the one below. In this example we will plot sphere using its parametric equation and procedure Surface3d.
export(plot,Surface3d):
g:=(x,y,z)->[abs(sin(PI-x)),abs(sin(PI-y)),abs(sin(z))]:
Sphere := Surface3d( [2*sin(t)*cos(u), 2*sin(t)*sin(u), 2*cos(t)], t=0..PI, u=0..2*PI, Grid = [30,30], Style = [ColorPatches, Only], Color = [Function,g] ):
plot(Sphere, Scaling=Constrained)
Published 19/04/2002; Updated on 09/06/03 , by M. L. Majewski