Getting Ordered Intersection Points of a Line along a Particular Direction (Part II)

This part II of a two part post. Please see part one here.

We’re moving forward with the next set of requirements. Once we have the intersection points we need to do the following:

Notice how these lines are staggered (in terms of their offset from the main line) and how the colours are alternating?
Notice how these lines are staggered (in terms of their offset from the main line) and how the colours are alternating?
  1. Create lines out of them, and then
  2. Offset them from the main line, and staggered them by a specified amount
  3. and color every alternating line a certain color.

The code to do so is as follows. Hopefully it will be pretty self explanatory:


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *