Drawing surfaces in 6.0
- To: mathgroup at smc.vnet.net
- Subject: [mg76142] Drawing surfaces in 6.0
- From: Hatto von Aquitanien <abbot at AugiaDives.hre>
- Date: Wed, 16 May 2007 05:52:59 -0400 (EDT)
This is how it is done:
f[x_, y_] := {x, y, Sin[x] + Sin[y]}
\[CapitalDelta]u = \[CapitalDelta]v = \[Pi];
\[Delta]u = \[Delta]v = \[CapitalDelta]u/10;
stride = 30;
data = With[{u = \[Delta]u Mod[# - 1, stride],
v = \[Delta]v Quotient[ # - 1, stride]}
, f[u, v]] & /@ Range@(stride^2);
normals =
With[{u = \[Delta]u Mod[# - 1, stride],
v = \[Delta]v Quotient[ # - 1, stride]}
, Cross[(f[u + \[Delta]u, v] - f[u, v]), (f[u, v + \[Delta]v] -
f[u, v])]] & /@ Range@(stride^2);
di = With[{s =
Mod[#, stride - 1, 1] + stride Quotient[ # - 1, stride - 1]}
, {s, s + 1, s + stride + 1, s + stride}] & /@
Range@((stride - 1)^2);
Graphics3D[{EdgeForm[],
GraphicsComplex[data, Polygon[di], VertexNormals -> normals]}]
(************************)
Where did these people get the idea that counting begins with one? That's
confusing!
--
http://www.dailymotion.com/video/x1ek5w_wtc7-the-smoking-gun-of-911-updated
http://911research.wtc7.net
http://vehme.blogspot.com
Virtus Tutissima Cassis