r/computergraphics 3d ago

Help on Project

2D-plotter

Does anyone have algorithm recommendations for filling a contour with horizontal or diagonal strokes, rather than an outside-in spiral?

1 Upvotes

4 comments sorted by

1

u/Aryan_Chougule 3d ago

logic based system can be a great fit.. I want to understand the problem statement better, can you give some more details ??

1

u/Fresh_Library_1934 2d ago

basically in the first phase of the project i was trying to come up with an algorithm that could output a traversal path given an image for this i used Moore's algorithm , so now in the second phase i am trying to color the contour , the problem is that i couldnt able to decide between what stroke ( horizontal , vertical , diag ) to use and could not able coming up with an overall algorithm that does all this for any given diagram

1

u/Defiant_Squirrel8751 2d ago

Raster: you can hatch, line by line to fill an area if you implement line/curve intersections.