Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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 -> GrayLevel@.7]

enter image description here

share|improve this question
    
Right. More clear. –  rhomboidRhipper Mar 31 at 21:32

1 Answer 1

up vote 3 down vote accepted

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 -> GrayLevel@.7]
share|improve this answer
    
Thanks. I understand. –  rhomboidRhipper Apr 1 at 15:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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