Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8156 > unrolled thread

Using same pure function for curve and surface mappings

Started byChris Young <cy56@comcast.net>
First post2012-01-25 12:10 +0000
Last post2012-01-25 12:10 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Using same pure function for curve and surface mappings Chris Young <cy56@comcast.net> - 2012-01-25 12:10 +0000

#8156 — Using same pure function for curve and surface mappings

FromChris Young <cy56@comcast.net>
Date2012-01-25 12:10 +0000
SubjectUsing same pure function for curve and surface mappings
Message-ID<jforgc$63q$1@smc.vnet.net>
By defining a pure function for a mapping, we can streamline the 
process of mapping curves to a surface. I'm just a little worried that 
the syntax coloring puts the "Saddle" in bright blue. Does this mean 
it's still an undefined global?

http://home.comcast.net/~cy56/Mma/CurveMapViaPureFunction.nb

http://home.comcast.net/~cy56/Mma/CurveMapViaPureFunctionPic.png

\[HorizontalLine]Saddle = (f \[Function] {f[[1]], f[[2]],
    f[[1]] * f[[2]]})

Manipulate[
 Grid [
  {
   {
    LocatorPane[
     P,

     Show[
      ParametricPlot[\[HorizontalLine]Bez[P, t], {t, 0, 1}],
      Graphics @ {Dotted, Line[P]},
      PlotRange -> 2,
      Axes -> True
      ],
     {{-2, -2}, {2, 2}, {.25, .25}}
     ],
    Show[
     ParametricPlot3D[
      \[HorizontalLine]Saddle @ {u, v}, {u, -2, 2}, {v, -2, 2},
      PlotStyle -> Opacity[opac],
      Mesh -> False
      ],
     ParametricPlot3D[
       \[HorizontalLine]Saddle @  \[HorizontalLine]Bez[P, t], {t, 0, 1}
       ]
      /.
      Line[pts_, rest___] :> Tube[pts, 0.05, rest],
     PlotRange -> 2
     ]
    }
   }
  ],
 {{P,
   {{-1, -1}, {-1, -.5}, {-1, 0}, {-1, .5}, {-1, 1},
    {  1, -1}, {   1, -.5}, {  1, 0}, {   1, .5}, {  1, 1}}}, Locator},
 {{opac, 0.75}, 0, 1}
 ]

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web