#### Archived

This topic is now archived and is closed to further replies.

# Math in Bezier Deformation?

This topic is 6103 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi there!!!! I am using two Bezier patches to represent a right circular cylinder. These are bi-cubic patches (both planes look like half of the letter "O" extended into the screen) , so 16 control points on each patch. I was able to generate a perfect cylinder after tedious computations for the control points and render it in an OpenGL environment. This is the situation... if i am given any point of collision with my cylinder, and the fact that this point WILL gradually extend into the cylinder, i need to produce deformation effects, perhaps not precise, but at least with some degree of realism. Now, i can perform crude deformation by moving around the nearest single control point, but it is ridiculously crude. And it looks quite pathetic. My problem is how to identify the necessary control points properly (for eg. shortest distance? how many points? etc), and more importantly, how exactly to modify the original control points to make the required deformation! Any math formulas to calculate the magic numbers?? Furthermore, since the cylinder is coded using two of these confounded Bezier patches (each patch represents a half cylinder, like half of the letter "O") which are then stiched together , if there is some deformation along the seams of cylinder, then both the patches need to be modified!

##### Share on other sites
I played a bit with four bezier patches that approximate a cylindar. It looks like you can control the center of the deformation by adjusting the four adjacent control points. You move them straight toward or away from the axis in a plane orthogonal to the axis. The relative magnitudes of the movement as a percentage controls the position of the deformation. So if you move only one the deformation is centered under that control point. If you move two equally then it is centered between the two. It is difficult to describe exactly how you control it because of the number of variables. Assuming the control points are both in the same plane orthogonal to the axis then a ray from the axis to one control point and another from the axis to the other control point forms an angle. A ray to the deformation splits that angle. The ratio of the relative magnitude of the change in each control point determines the ratio of that split.

I just played with a single patch reflected across the coordinate planes. So I don''t know how you are going to control the edges of the patches. It seems like you are basically screwed there since you have to move three control points at once. I think that is simply a limitation of using bezier patches. You can use more patches which will give you more control, but eventually you might as well just deform the mesh itself instead of hassling with the beziers.

Just a small point, but you can''t get a perfect right circular cylindar with two bezier patches or even four. If you could then you would be able to perfectly calculate sine and cosine from a cubic over the interval from 0 to pi.

1. 1
Rutin
31
2. 2
3. 3
4. 4
5. 5

• 13
• 40
• 11
• 10
• 14
• ### Forum Statistics

• Total Topics
632963
• Total Posts
3009533
• ### Who's Online (See full list)

There are no registered users currently online

×