texmf-dist/doc/metapost/featpost/example/hexagonaltrimesh.mp
raw| 1 | % hexagonaltrimesh.mp |
| 2 | % L. Nobre G. |
| 3 | % 2003 |
| 4 | |
| 5 | input featpost3Dplus2D; |
| 6 | |
| 7 | def zsurface( expr xc, yc ) = |
| 8 | cosd(xc*57)*cosd(yc*57)+4*mexp(-(xc**2+yc**2)*6.4) |
| 9 | enddef; |
| 10 | |
| 11 | f := 7*(4,1,5); |
| 12 | Spread := 35; |
| 13 | LightSource := 10*(4,-3,4); |
| 14 | SubColor := 0.4background; |
| 15 | |
| 16 | beginfig(1); |
| 17 | numeric np, ssize; |
| 18 | path chair; |
| 19 | np = 40; |
| 20 | ssize = 15; |
| 21 | |
| 22 | hexagonaltrimesh( true,np,ssize,zsurface); |
| 23 | endfig; |
| 24 | |
| 25 | end; |