<p>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. </p>

<p>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.</p>

<p>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.</p>

<p>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.</p>

<p>Thanks    </p>

CC BY-SA 3.0
2016-02-21T21:31:20.850Z
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.
Alan Wolfe
CC BY-SA 3.0
2016-02-21T23:33:27.227Z
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.
sajis997
CC BY-SA 3.0
2016-02-24T21:07:50.960Z
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](http://i.imgur.com/NTtPYoB.jpg) 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.
sajis997
<vector-graphics>
scan line conversion
sajis997
# scan line conversion

(Asked by: username_0 on 2016-02-20)

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

**Tags:** vector-graphics

> **Comments:**
> **username_1**: 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.  
> **username_0**: 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.  
> **username_0**: 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](http://i.imgur.com/NTtPYoB.jpg) 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.  

---

## 0 answers

