TAILIEUCHUNG - Advanced 3D Game Programming with DirectX - phần 8

phân chia các cạnh để thêm hình tam giác Phương trình, chúng tôi sử dụng để chia nhỏ một cạnh phụ thuộc vào hóa trị thiết bị đầu cuối của nó. Hóa trị của một đỉnh trong bối cảnh này được định nghĩa là số lượng đỉnh đỉnh là tiếp giáp với. Có ba trường hợp có thể là chúng ta phải xử lý. Các trường hợp đầu tiên là khi cả hai đỉnh của một lợi thế cạnh cụ thể có một hóa trị = 6. . | Figure Subdividing edges to add triangles The equation we use to subdivide an edge depends on the valence of its endpoints. The valence of a vertex in this context is defined as the number of other vertices the vertex is adjacent to. There are three possible cases that we have to handle. The first case is when both vertices of a particular edge have a valence 6. We use a mask on the neighborhood of vertices around the edge. This mask is where the modified butterfly scheme gets its name because it looks sort of like a butterfly. It appears in Figure . Figure The butterfly mask The modified butterfly scheme added two points and a tension parameter that lets you control the sharpness of the limit surface. Since this scheme complicates the code I chose to go with a universal 498 w-value of instead which resolves to the above Figure . The modified butterfly mask appears in Figure . Figure The modified butterfly mask To compute the location of the subdivided edge vertex the white circle in both images we step around the neighborhood of vertices and sum them multiplying each vector by the weight dictated by the mask . You ll notice that all the weights sum up to . This is good it means our subdivided point will be in the right neighborhood compared to the rest of the vertices. You can imagine if the sum was much larger the subdivided vertex would be much farther away from the origin than any of the vertices used to create it which would be incorrect. When only one of our vertices is regular . has a valence 6 we compute the subdivided location using the irregular vertex otherwise known as a k-vertex. This is where the modified butterfly algorithm shines over the original butterfly algorithm which handled k-vertices very poorly . An example appears in Figure . The right vertex has a valence of 6 and the left vertex has a valence of 9 so we use the left vertex to compute the location for the new vertex indicated by the white circle .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.