Dear All,
I am using DirectX to write application and I cannot figure out how to do this:
I have a polygon and I want to create inward contours offset of that polygon by giving number of contours that I want and the distance from one contour to another as well.
I would highly appreciate if anyone can advise me the algorithm of doing this
Regards,
LG

Contour offset of a polygon
Shabari
Also, stencil shadows uses a real time contour extraction (from the point of view) to be rendered. This extraction can be done either on the cpu or using shader. So maybe this could be a good starting point for you. Once you have contour vertices (on the cpu side), then simply use line primitives.
_Gerry_
Ibrahim Hamouda
I won't be able to explain you how to do, but you can easily find tutorials and samples around the net. You can try Nvidia and ATI developper pages, Nehe (but it's opengl), and of course google...
Lawrence 007
Dear BLANC Guillaume,
Thanks for your advice. I was trying to find any example on the net but I cannot find one. Could you please advise me the link or just provide a small example of sample codes so that I can learn to do this. You can provide in any language VB.NET or C#.
I look forward to hearing from you!
Regards,
LG
Ray Laubert
Dear Blanc Guillaume,
Thanks for your advice. I don't want to have a shadow of the polygon but I want to calculate something similiar in this link http://www.cgal.org/Manual/3.2/doc_html/cgal_manual/Straight_skeleton_2/Chapter_main.html in Figure : Offset contours of a sample polygon
Please let me know if you know how to draw offset contours of a polygon as in this link.
Regards,
LG