about LCD

    Mar 28 2019 | 2:36 pm
    I’m a beginner, ask everyone
    This patch is used to control the servo motor of cnc.
    I made a black line to walk randomly in the LCD.
    Can it walk only in irregular shape areas, such as pink triangles?
    Or when black lines pass through different color areas, there will be different signal outputs.
    If I can, I will be able to set different color areas on the LOD so that the black lines can walk in the designated area.
    thanks in advance

    • Mar 28 2019 | 2:40 pm
    • Mar 29 2019 | 9:55 am
      interesting problem. I found this which might be of help: http://totologic.blogspot.com/2014/01/accurate-point-in-triangle-test.html if you are only using triangles try the barycentric coordinate system to determine if the a point in time is inside or outside the triangle
    • Mar 30 2019 | 2:17 am
      here's one approach to one aspect of your problem(s):
      it only works with triangles though. It may be of help if you can make the line change direction when it goes outside of the boundary adapted from the link I provided earlier
    • Mar 30 2019 | 9:39 am
      fantastic, so amazing. let me take some time to study it. thank you very much.
    • Mar 31 2019 | 3:16 am
      here's another way of checking if a point is inside or outside. This works for any polygon, not just triangles:
    • Apr 01 2019 | 8:43 pm
      It's really powerful, thanks very much!