Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8142 > unrolled thread
| Started by | Chris Young <cy56@comcast.net> |
|---|---|
| First post | 2012-01-25 12:05 +0000 |
| Last post | 2012-01-25 12:05 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Mapping Bezier curve to surface. Locator problem, still. Chris Young <cy56@comcast.net> - 2012-01-25 12:05 +0000
| From | Chris Young <cy56@comcast.net> |
|---|---|
| Date | 2012-01-25 12:05 +0000 |
| Subject | Mapping Bezier curve to surface. Locator problem, still. |
| Message-ID | <jfor5q$5rs$1@smc.vnet.net> |
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 top | Article view | comp.soft-sys.math.mathematica
csiph-web