Skip to main content
added 28 characters in body
Source Link

Edit: changed the answer according to new images and clarification.

for every control point p(k, n)
   p'(k, n) = ( p(k, n) - p(k) ) * d * l(k) + p(k, n)

where k is the row index and n is the column index of control point. l is the elevation factor and is equal to {-1, -1/3, 1/3, 1}. p(k) is the center of the k'th row.

Rationale: FromRationale:

From the new images, red and blue lines are drawn from the center of the line (p(k) which is basically (k, 0)) to that point. On the first line, all control points, including the ones on the graph (red lines) are moved to the same point on that line. p(k, n) - p(k) gives the vector which moves a point from p(k) to p(k, n) which now should be applied to the other way, moving the point to the desired location. On your graphs, d = 1 so that all first line points would be moved to the center. You can easily solve the equation to verify this. d * l(0) is -1, so it would be -p(k, n) + p(k) + p(k, n) which would give p(k).

On the second line, your blue line is again from point to the center, but this time it stopped before reaching it. I cannot tell if it really is cut from 1/3 but that would be a good starting point. So the same formula still applies. l is -1/3 d is 1, so the point would be moved in 1/3 of the way. 3rd is the same as the second but it now moves outwards, thus l is 1/3.

On the final line, all control points are moved out from the center point of that line. This is quite clear since your lines meet up at that center.

The only problem this formula can have is assumption of 1/3, other than that I do not see the reason why it should fail.

Note: I used row, column while indexing, thus if you are using x, y you should switch their locations.

Edit: changed the answer according to new images and clarification.

for every control point p(k, n)
   p'(k, n) = ( p(k, n) - p(k) ) * d * l(k) + p(k, n)

where k is the row index and n is the column index of control point. l is the elevation factor and is equal to {-1, -1/3, 1/3, 1}. p(k) is the center of the k'th row.

Rationale: From the new

Edit: changed the answer according to new images and clarification.

for every control point p(k, n)
   p'(k, n) = ( p(k, n) - p(k) ) * d * l(k) + p(k, n)

where k is the row index and n is the column index of control point. l is the elevation factor and is equal to {-1, -1/3, 1/3, 1}. p(k) is the center of the k'th row.

Rationale:

From the new images, red and blue lines are drawn from the center of the line (p(k) which is basically (k, 0)) to that point. On the first line, all control points, including the ones on the graph (red lines) are moved to the same point on that line. p(k, n) - p(k) gives the vector which moves a point from p(k) to p(k, n) which now should be applied to the other way, moving the point to the desired location. On your graphs, d = 1 so that all first line points would be moved to the center. You can easily solve the equation to verify this. d * l(0) is -1, so it would be -p(k, n) + p(k) + p(k, n) which would give p(k).

On the second line, your blue line is again from point to the center, but this time it stopped before reaching it. I cannot tell if it really is cut from 1/3 but that would be a good starting point. So the same formula still applies. l is -1/3 d is 1, so the point would be moved in 1/3 of the way. 3rd is the same as the second but it now moves outwards, thus l is 1/3.

On the final line, all control points are moved out from the center point of that line. This is quite clear since your lines meet up at that center.

The only problem this formula can have is assumption of 1/3, other than that I do not see the reason why it should fail.

Note: I used row, column while indexing, thus if you are using x, y you should switch their locations.

added 28 characters in body
Source Link

Edit: changed the answer according to new images and clarification.

for every control point p(k, n)
   p'(k, n) = ( p(k, n) - p(k) ) * d * l(k) + p(k, n)

where k is the row index and n is the column index of control point. l is the elevation factor and is equal to {-1, -1/3, 1/3, 1}. p(k) is the center of the k'th row.

Rationale: From the new

Edit: changed the answer according to new images and clarification.

for every control point p(k, n)
   p'(k, n) = ( p(k, n) - p(k) ) * d * l(k) + p(k, n)

where k is the row index and n is the column index of control point. l is the elevation factor and is equal to {-1, -1/3, 1/3, 1}. p(k) is the center of the k'th row.

Edit: changed the answer according to new images and clarification.

for every control point p(k, n)
   p'(k, n) = ( p(k, n) - p(k) ) * d * l(k) + p(k, n)

where k is the row index and n is the column index of control point. l is the elevation factor and is equal to {-1, -1/3, 1/3, 1}. p(k) is the center of the k'th row.

Rationale: From the new

deleted 18 characters in body
Source Link

Edit: changed the answer according to clarification.

The effect applied to the Bezier surface is the following, assuming center is 0, 0new images and corners are (-1, -1), (1, -1), (-1, 1), (1, 1)clarification.

for every control point p(k, n)
   p.xp'(k, n) = ( p.x(k, +n) - p.x(k) ) * d * l(k) + p.y(k, n)

Apply this formula to allwhere k is the row index and n is the column index of control pointspoint. l is the elevation factor and is equal to {-1, your surface will be deformed as-1/3, 1/3, 1}. p(k) is the reference imagescenter of the k'th row.

Edit: changed the answer according to clarification.

The effect applied to the Bezier surface is the following, assuming center is 0, 0 and corners are (-1, -1), (1, -1), (-1, 1), (1, 1).

for every control point p
   p.x = p.x + p.x * p.y

Apply this formula to all control points, your surface will be deformed as the reference images.

Edit: changed the answer according to new images and clarification.

for every control point p(k, n)
   p'(k, n) = ( p(k, n) - p(k) ) * d * l(k) + p(k, n)

where k is the row index and n is the column index of control point. l is the elevation factor and is equal to {-1, -1/3, 1/3, 1}. p(k) is the center of the k'th row.

deleted 122 characters in body
Source Link
Loading
Source Link
Loading