MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

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


  • Prev by Date: Re: About UnitStep and ZeroValue
  • Next by Date: Re: weird behavior when plotting multiple functions in 6.0
  • Previous by thread: Re: Re: Graphics3D of the official "arbitrary surface"
  • Next by thread: How to use the Simpson 1/3 rule to write this program