3
$\begingroup$

Why are those surfaces different?

cpts = Table[{x, y, RandomReal[{0, 2}]}, {x, 0, 7}, {y, 0, 5}];
surf = BSplineSurface[cpts];
surfFn = BSplineFunction[cpts];


Show[
 Plot3D[surfFn[x/7, y/5][[3]], {x, 0, 7}, {y, 0, 5}, Mesh -> None, PlotStyle -> Red,          
                                              BoundaryStyle -> Red, BaseStyle -> Thick],
 Graphics3D[{EdgeForm[{Blue, Thick}], surf}], 
 Background -> [email protected]]

enter image description here

$\endgroup$
1
  • $\begingroup$ Right. More clear. $\endgroup$ Commented Mar 31, 2014 at 21:32

1 Answer 1

7
$\begingroup$

BSplineFunction[{{0., 1.}, {0., 1.}}, "<>"] is a map from parametric space to "plotting" space, i.e. $\mathrm{BSplineFunction}:(u,v)\mapsto (x,y,z)$, so instead of Plot3D[surfFn[x/7, y/5][[3]], {x, 0, 7}, {y, 0, 5}], it should be written as ParametricPlot3D[surfFn[u, v], {u, 0, 1}, {v, 0, 1}].

cpts = Table[{x, y, RandomReal[{0, 2}]}, {x, 0, 7}, {y, 0, 5}];
surf = BSplineSurface[cpts];
surfFn = BSplineFunction[cpts];

Show[
    ParametricPlot3D[surfFn[u, v], {u, 0, 1}, {v, 0, 1},
        Mesh -> None, PlotStyle -> Red, BoundaryStyle -> Red, 
        BaseStyle -> Thick],
    Graphics3D[{EdgeForm[{Blue, Thick}], surf}],
    Background -> [email protected]]
$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.