manpagez: man pages & more
info mathgl
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.5.12 Glass-like transparency

../png/type1

C++ code

gr->Alpha(true);	gr->Light(true);
mglData a(50,40);
a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))");

gr->TranspType = 1;	gr->Clf();
gr->SubPlot(2,2,0);	gr->Rotate(40,60);	gr->Surf(a);	gr->Box();
gr->SubPlot(2,2,1);	gr->Rotate(40,60);	gr->Dens(a);	gr->Box();
gr->SubPlot(2,2,2);	gr->Rotate(40,60);	gr->Cont(a);	gr->Box();
gr->SubPlot(2,2,3);	gr->Rotate(40,60);	gr->Axial(a);	gr->Box();

MGL code

alpha on: light on
new a 50 40
modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))'

transptype 1: clf
subplot 2 2 0: rotate 40 60: surf a:  box
subplot 2 2 1: rotate 40 60: dens a:  box
subplot 2 2 2: rotate 40 60: cont a:  box
subplot 2 2 3: rotate 40 60: axial a: box

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.