3
$\begingroup$

I changed the weights of my points, but nothing has changed. What should I do to solve this problem?

k = {{{16.24, 44.3486, 642}, {16.24, 44.3652, 625}, {16.24, 44.3818, 
     717}, {16.24, 44.3984, 940}, {16.24, 44.415, 955}, {16.24, 
     44.4316, 798}, {16.24, 44.4482, 764}, {16.24, 44.4648, 
     671}, {16.24, 44.4814, 606}, {16.24, 44.498, 1125}, {16.24, 
     44.5146, 1315}, {16.24, 44.5312, 1265}, {16.24, 44.5478, 
     1083}, {16.24, 44.5644, 639}, {16.24, 44.581, 625}, {16.24, 
     44.5976, 640}, {16.24, 44.6142, 591},
    {16.24, 44.6308, 608},
    {16.24, 44.6474, 591},
    {16.24, 44.664, 596}},

   {{16.2566, 44.3486, 664},
    {16.2566, 44.3652, 820}, {16.2566, 44.3818, 1025}, {16.2566, 
     44.3984, 1020}, {16.2566, 44.415, 942}, {16.2566, 44.4316, 
     632}, {16.2566, 44.4482, 486}, {16.2566, 44.4648, 674}, {16.2566,
      44.4814, 1005}, {16.2566, 44.498, 1395}, {16.2566, 44.5146, 
     1643}, {16.2566, 44.5312, 1289}, {16.2566, 44.5478, 
     769}, {16.2566, 44.5644, 605}, {16.2566, 44.581, 653}, {16.2566, 
     44.5976, 620}, {16.2566, 44.6142, 627},
    {16.2566, 44.6308, 643},
    {16.2566, 44.6474, 635}, {16.2566, 44.664, 643}},

   {{16.2732, 44.3486, 848}, {16.2732, 44.3652, 1002}, {16.2732, 
     44.3818, 1023}, {16.2732, 44.3984, 969},
    {16.2732, 44.415, 905}, {16.2732, 44.4316, 573},
    {16.2732, 44.4482, 649}, {16.2732, 44.4648, 1092}, {16.2732, 
     44.4814, 1362}, {16.2732, 44.498, 1298}, {16.2732, 44.5146, 
     1219}, {16.2732, 44.5312, 968}, {16.2732, 44.5478, 
     720}, {16.2732, 44.5644, 599}, {16.2732, 44.581, 597}, {16.2732, 
     44.5976, 613}, {16.2732, 44.6142, 659},
    {16.2732, 44.6308, 669},
    {16.2732, 44.6474, 742}, {16.2732, 44.664, 824}},

   {{16.2898, 44.3486, 1120}, {16.2898, 44.3652, 1008}, {16.2898, 
     44.3818, 1014},
    {16.2898, 44.3984, 967}, {16.2898, 44.415, 758}, {16.2898, 
     44.4316, 447},
    {16.2898, 44.4482, 821}, {16.2898, 44.4648, 1289}, {16.2898, 
     44.4814, 1495}, {16.2898, 44.498, 1393}, {16.2898, 44.5146, 
     1247}, {16.2898, 44.5312, 955}, {16.2898, 44.5478, 
     668}, {16.2898, 44.5644, 616}, {16.2898, 44.581, 615}, {16.2898, 
     44.5976, 635}, {16.2898, 44.6142, 659},
    {16.2898, 44.6308, 753},
    {16.2898, 44.6474, 764}, {16.2898, 44.664, 891}},

   {{16.3064, 44.3486, 1062}, {16.3064, 44.3652, 889}, {16.3064, 
     44.3818, 771},
    {16.3064, 44.3984, 742}, {16.3064, 44.415, 492}, {16.3064, 
     44.4316, 684}, {16.3064, 44.4482, 856}, {16.3064, 44.4648, 
     1326}, {16.3064, 44.4814, 1336}, {16.3064, 44.498, 
     1152}, {16.3064, 44.5146, 1206}, {16.3064, 44.5312, 
     772}, {16.3064, 44.5478, 681}, {16.3064, 44.5644, 622}, {16.3064,
      44.581, 632}, {16.3064, 44.5976, 677}, {16.3064, 44.6142, 679},
    {16.3064, 44.6308, 852},
    {16.3064, 44.6474, 857}, {16.3064, 44.664, 879}}};

w = {{0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5,
    0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5}, {0.5, 0.5, 0.5, 0.5, 0.5, 0.5,
    0.5, 0.5, 1, 1, 1, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 
   0.5}, {0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 
   0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5}, {0.5, 0.5, 0.5, 0.5, 0.5, 
   0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 
   0.5, 0.5}, {0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 
   0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5}}

f = Graphics3D[{BSplineSurface[k, SplineDegree -> 3], 
    SplineWeights -> w}, BoxRatios -> 1];


Show[Graphics3D[{PointSize[Medium], Red, Map[Point, k]}], 
 Graphics3D[{Gray, Line[k], Gray, Line[Transpose[k]]}], f, 
 BoxRatios -> 1]
$\endgroup$

1 Answer 1

6
$\begingroup$

Comparing two SplineWeights, w and (w /. 1-> .5):

pos = Position[w, 1];
{fa, fb} = Graphics3D[{BSplineSurface[k, SplineDegree -> 3, 
       SplineWeights -> #]}, BoxRatios -> 1] & /@ {(w /. 1 -> .5), w};
{ga, gb} =  Show[Graphics3D[{PointSize[Medium], Red, Map[Point, k], Blue, 
       PointSize[.03], Point@k[[##]] & @@@ pos, Gray, Line[k], 
       Line[Transpose[k]]}], #, BoxRatios -> 1,  ImageSize -> 300] & /@ {fa, fb};
Row[{ga, gb}]

we get

enter image description here

Using Manipulate, you can see the effect of changing the weights more clearly:

ww = w /. {.5 -> wa, 1 -> wb};
pos = Position[w, 1];
Manipulate[f2 = Graphics3D[{BSplineSurface[k, SplineDegree -> 3, 
     SplineWeights -> (ww /. {wa -> a, wb -> b})]}, BoxRatios -> 1];
 Show[Graphics3D[{PointSize[Medium], Red, Map[Point, k], Blue, 
    PointSize[.03], Point@k[[##]] & @@@ pos, Gray, Line[k], 
    Line[Transpose[k]]}], f2, BoxRatios -> 1], 
 {{a, .5}, 0.001, 1}, {{b, 1.}, 0, 1}]

enter image description here

$\endgroup$

Your Answer

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

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