Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I am constructing wireframe model of 3d objects (prisms,..etc.). from a triangular mesh, I have obtained boundary points and fit striaght lines in order to get polygon edges refering to prism faces. Assume, I am having polygon edges as shown in green line segments. now I want to refine their positions. For example, If I take upper two planes (plane P1 and P2), then I am having two horizontal edges namely AB and CD. Elevation of these edges are h1 and h2 (h1 lessthan to h2). So I want to sweep the upper edge (i.e. AB edge) till it also has the same elevation as in CD (lower edge). In here, I should sweep the AB edge along the steepest gradient direction but on top of the P2 plane to come to A’B’ position.

please refer, figure to get a clear idea.

enter image description here

I want to implement this in C++ and still I am struggling to find a correct way to do it as my mathematics are so poor, so that, please someone help me by given equations to do this. then i can implement in c++ Thank you

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.