Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8142
| From | Chris Young <cy56@comcast.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Mapping Bezier curve to surface. Locator problem, still. |
| Date | 2012-01-25 12:05 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jfor5q$5rs$1@smc.vnet.net> (permalink) |
Here's a pretty concise way to map curves to surfaces. The tee-arrow
notation for pure functions makes the code a little clearer, I think. I
still can't figure out how to keep the mouse movement from being
captured by the locators. I.e., there's no way I can rotate the 3D
plot. Maybe not possible using Manipulate.
http://home.comcast.net/~cy56/Mma/BezCurveToSurfacePic.png
http://home.comcast.net/~cy56/Mma/BezCurveToSurface.nb
Manipulate[
Grid [
{
{
LocatorPane[
Dynamic @ 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[
{u, v, u v},
{u, -2, 2}, {v, -2, 2},
PlotRange -> 2, Mesh -> False, PlotStyle -> Opacity[opac]
],
ParametricPlot3D[
(f \[Function] {f[[1]], f[[2]],
f[[1]] * f[[2]]})@ \[HorizontalLine]Bez[P, t],
{t, 0, 1},
PlotRange -> 2
] /. Line[pts_, rest___] :> Tube[pts, 0.05, rest]
]
}
}
],
{{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
Mapping Bezier curve to surface. Locator problem, still. Chris Young <cy56@comcast.net> - 2012-01-25 12:05 +0000
csiph-web