Bezier patch continuity




















For the Bezier patch, I have created a simple program that you will work with. This program creates the 16 points for a Bezier surface patch and lets you play with them. You'll have to add some code to make these display a Bezier surface patch. Then, you are going to create a second patch that exhibits G 1 continuity with the first patch.

An additional purpose of the lab this week is to define the projects for Project 3 and submit a project proposal. Your group is to spend some lab time preparing the proposal and then turn in a signed project proposal at the end of the lab session. The project proposal will be of the following form:.

But, back to the programming task, for this lab part A you'll be working with some code I've created. This code displays a flat surface. There's a "patch" menu.

If you select the new option, 16 blocks appear. These are the control points for a Bezier curve surface patch. You can use the mouse to spin the scene around.

Then, you can right-click on any control point to select it. If you hold down the right mouse button, you can drag the point. Be sure you are familiar with this operation before proceeding. You may notice that the mouse moves the block in the X,Y directions relative to the screen, no matter which way you view the scene from.

If you are curious as to how this feat is accomplished, take a look at the mouse move handler function. There you will find an interesting function called gluUnProject.

This seemingly miraculous function converts a 2D point on the screen back to a 3D point in space. Of course, for any 2D point on the screen there are in infinite number of 3D point.

We resolve the ambiguity by providing a depth to the function. We can then move the blocks anywhere we want, provided the depth to the block remains the same. If you have questions about how this functionality works, feel free to ask. There are a few other fun things in this problem you may be interested in. It's worth looking up what it does. There 3 dimensional array is: the u dimension, the v dimension, and 3 values for x,y, and z.

So, when you see the first 16 control points, the front row are defined in p[0][0], p[1][0], p[2][0], and p[3][0] from left to right. The u dimension goes to the right in my implementation and the v dimension goes to the back -Z direction. It's initially empty. My initial patch is very simple. They work by providing a set of points we will use to evaluate, definating a range for the u,v values often 0 to 1 , defining how the curve will be broken into quadrilaterals, and drawing the curve faces.

Note that OpenGL does not draw curves at all. It just provides a way for you to translate a curve to quadrilaterals or triangles. If you look in the OnGLDraw code, you'll find a comment indicating where you will put the code to draw your surface.

I do this so you can still see the control points even when they are below the surface. If you've been wondering how to make something transparent, here's a simple example. Because we are using lighting, we have to have normals. But, the normals are dependent on the underlying curve functions. This just tells OpenGL to do this work for us. The first parameter says we are using 3D vertices over a surface with two control variables, u and v.

The next three lines define characteristics of the u dimension. We are indicating that u will be over the range 0. Linear interpolation. Equation 75 is obviously a linear interpolation between two points.

Equation 76 can be rewritten as a linear interpolation between linear interpolations between points:. Continuity You should note that each Bezier curve is independent of any other Bezier curve. From Fig. The partial derivatives are estimated by using Goodman et al. Then, by simple derivation, the following are obtained:. By substituting 7 to 8 , we obtain.

To achieve this, we have adopted the main idea from the scheme proposed by Foley and Opitz [ 8 ]. Consider the two adjacent triangles as shown in Fig. A minor modification of the cubic precision method is required for boundary triangles because adjacent triangles are considered. In this case, the hybrid patch will be a standard cubic patch. It is well described in the following paragraphs.

Triangulate the domain by using Delaunay triangulation [ 13 ]. Calculate the error measurement such as maximum error Max. Error and coefficient of determination COD i. In Goodman and Said [ 13 ], the other version of convex combination is used such that. But both schemes require only 10 control points. This is consequent from the work of Goodman and Said [ 13 ]. As an example of the surface interpolation, by using the proposed scheme, we use the following two well-known test functions:.

We compare the proposed method with meshfree method of radial basis function RBF consisting of four different basis functions which are linear, thin plate spline, Gaussian, and multiquadric. The interpolating surfaces are given in Fig. Based on the observation from the interpolating surfaces, the proposed scheme gives a very visually pleasing surface compared to all RBF techniques. This is significant in scattered data interpolation. The triangulation domain of 36 data points is given in Fig.

Tables 1 , 2 , 3 show the error analysis for all four functions with respective nodes i. We compare the performance between the proposed scheme and RBFs methods such as linear, thin plate spline, Gaussian, and multiquadric.

Therefore, maybe this is the main reason why RBFs are better for the data from that function. For more details on numerical results including graphical images for the proposed method including the comparison between the implementation using Goodman and Said [ 13 ] and Foley and Opitz [ 8 ] schemes, the reader can refer to Karim and Saaban [ 19 ].

Table 4 summarizes the main results for error analysis shown in Tables 1 , 2 , 3. Our final example considers the irregular scattered data from Ibraheem et al. The total number of the data is 72 as shown in Table 5. Figure 11 a shows the Delaunay triangulation for data in Table 5. Figure 1 b shows the linear interpolant for the irregular data.

Figure 11 c to 11 e show the surface interpolation with different values of the parameters. Meanwhile Fig. Clearly, the produced surface is smooth and visually pleasing. Interestingly, the given data is positive, and the proposed scheme has the capability to preserve the positivity of the data without the need to apply any positivity-preserving as discussed in Ibraheem et al.

It should be noted that we cannot compare the results with the work of Ibraheem et al. In this study, a new cubic triangular patch with three parameters is constructed. Some properties of the proposed basis are studied in detail. An application in scattered data interpolation is investigated in detail. Throughout this study, we test the proposed scheme with regular and irregular scattered data. For regular data sets, we compare the performance with meshfree based methods i.

Furthermore, based on graphical images, the proposed scheme is more visually pleasing compared with all RBFs. For irregular scattered data, the proposed scheme can reconstruct the surface that is visually pleasing.

Meanwhile if we apply Goodman and Said [ 13 ] scheme to calculate the inner ordinates, we will obtain same interpolating surface for different values of the parameters. This results as well as comprehensive numerical comparison can be obtained in Karim and Saaban [ 19 ]. The proposed scheme can be used for surface reconstruction for cloud data i. Furthermore, by using the proposed scheme, we can preserve the positivity of the scattered data by manipulating the three parametric values.

Work on shape-preserving interpolation is underway. Furthermore, we also can extend the main results in this study to construct more general triangulation surface based on Clough—Tocher splitting method. This will avoid the use of rational corrected as shown in formulas 16 and Such results will be explored in the future. Bracco, C. Aided Geom.

Article Google Scholar. Brodlie, K. Forum 24 4 , — Chan, E. Chen, Z. Neurocomputing , — Crivellaro, A. Farin, G. Morgan Kaufmann, San Diego Google Scholar. Fasshauer, G. Interdisciplinary Mathematical Sciences, vol.



0コメント

  • 1000 / 1000