Drawing perpendicular lines in between two paths

1

I am an architect working in ancient sites for architectural documentation. I am now trying to make an oldschool landscape drawing, which includes the height curves. (contour lines)

So for that, I am trying to drawing perpendicular lines arrayed along one line, starting from it and ending at the next one. which, i need to do it atleast 750 lines.

so to sum up, I want to fill the gap in between two lines with lines which are perpendicular to the path they are starting from and ending at the next one.

Kivanc Basak

Posted 2015-11-18T13:27:26.327

Reputation: 11

1Do you have a question? – Phlamajam – 2015-11-18T13:38:22.953

how can i draw these lines? – Kivanc Basak – 2015-11-18T13:44:08.580

I think that this question is off topic here. http://superuser.com/help/on-topic You will get more answers if you ask in the correct place.

– Katu – 2015-11-18T15:18:51.543

Answers

1

If I got your question right, you want to draw something like a stairs. I will assume that one of the lines has an equation

a x + b y + c = 0

with nonzero a and b (special cases a=0 or b=0 are trivial). I will also assume that a^2+b^2=1 (if not, just divide the equation by 1/sqrt(a^2+b^2)).

Then if have the lengths of your lines L, and the coordinate of starting point is (x0,y0), then coordinates of other points, where perpendicular lines start are

(x_i, y_i) = ( x0 + (b L i)/(N-1), y0 - (a L i)/(N-1) )

where i runs fro 0 to N-1, and N is the number of points, that you need for your staircase.

Note: if points will go in the wrong direction, use the opposite sign

(x_i, y_i) = ( x0 - (b L i)/(N-1), y0 + (a L i)/(N-1) )

After you have points, where the perpendicular lines start, the parametric equations for each perpendicular line is

x_i(t) = x_i + a t D, y_i(t) = y_i + b t D

where t changes from 0 to 1 and D is the distance between your parallel lines.

Note: if perpendicular lines go to the wrong direction, change sign

x_i(t) = x_i - a t D, y_i(t) = y_i - b t D

That is more or less it)

John Smith

Posted 2015-11-18T13:27:26.327

Reputation: 143

and what if you are dealing with a wavy stair case instead of a circular or straight one? – Forward Ed – 2018-10-10T23:09:18.550