Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8156
| From | Chris Young <cy56@comcast.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Using same pure function for curve and surface mappings |
| Date | 2012-01-25 12:10 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jforgc$63q$1@smc.vnet.net> (permalink) |
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}
]
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Using same pure function for curve and surface mappings Chris Young <cy56@comcast.net> - 2012-01-25 12:10 +0000
csiph-web