5
$\begingroup$

I am going throug the topic scan line conversion where the scan line parallel to the x-axis is put through the intersection test with all the edges of the polygon.

Would there be any large theoretical differences if we take a small line segment instead, between (x1,y1) and (x2,y2) that is parallel to the x-axis or y-axis and test for intersection with the polygon edges ? The usual case the y = a ( parallel to x-axis) and what I am asking is also parallel to x-axis or y-axis,but constrained between two points instead.

I am trying to develop a tool-path for 3D printing and looking forward to implement HIlbert curve as a tool-path. Generally the very same scan-line concept is used in 3D printing techniques whenever it comes to tool-path generation where parallel scan line to x-axis is used for scanline and polygon edges interesection. I have already got the typical linear scan line for 3D printing and looking forward to implement another way to maneuever the printing head according to the Hilbert curve. In Hilbert curve you have a line segments that change its orientation in such a calculated manner it never self-intersects and simple it follows the FASS characteristics. Hilbert curve containes several small line segments that are parallel to x-axis or y-axis. I am trying to narrow it down to the one line segment of Hilbert curve where the intersection test is to be conducted between one line segment [ (x1,y1) and (x2,y2) ] and the polygon edges.

I hope that I explained the issue well enough to get some hints to the question asked. Please do ask if anything that I have explained so far is not clear enough.

Thanks

$\endgroup$
  • $\begingroup$ What you are saying may be a valid thing I haven't heard of before, but for the purposes of high performance, I've always heard of scan line conversion working like you convert 3d object to 2d screenspace objects and then use something like bressenham (for triangles, drawing a line down each edge, one y step at a time) to know where to start and end on the x axis for the current y. In your case I could see similar working, where you do that N times, where each index of N is a slice of the Z axis. I haven't ever done what you are trying though so can't say for sure if that is a good idea. $\endgroup$ – Alan Wolfe Feb 21 '16 at 21:31
  • $\begingroup$ Whenever it comes to scanline conversion for 2D graphics, definitely it is not a good idea. But in a particular technology of 3d printing, this type of printing head manuevoring has been deemed to effective to generate better printing outputs. This is why I want to find out intersection between scan line segment [(x1,y1)------(x2,y2)] parallel to x-axis or y-axis and polygon edges. $\endgroup$ – sajis997 Feb 21 '16 at 23:33
  • $\begingroup$ Your question is still unclear but I figure that you are trying to fill a polygon with a Hilbert curve, right ? So you are asking about an algorithm that finds the useful portions of a Hilbert curve inside a given polygon ? If yes, do you want whole segments only or precise clipping to the polygonal window ? $\endgroup$ – Yves Daoust Feb 24 '16 at 11:03
  • $\begingroup$ You guessed right!. I am looking for the whole segments that reside inside the given polygon contour. In the usual scan line conversion we have parallel scan lines that fill the inside region and in my specific case I am using Hilbert curve to fill the inside region. Here goes a sample image that shows the pattern. As you can see that intersection test has to be performed with hilbert line segments and polygon outer and inner borders to define the inner region and I need tips in intersection test. $\endgroup$ – sajis997 Feb 24 '16 at 21:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.