Message Boards Message Boards

0
|
7617 Views
|
5 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Subdivide curve to create equal lines perpendicular to the origin

Posted 5 years ago

Hi all, I'm looking for an equation that can produce a series of lines of equal lengths that are perpendicular from their midpoint to point "x", by dividing curve "a" a number of times. I haven't yet been able to come up with a solution that isn't recursive or that subdivides the curve exactly. Would really appreciate being pointed in the right direction as I'm at a little bit of a loss. Thanks, Laurens

Tangent problem

POSTED BY: Laurens Jacobs
5 Replies

Hello Laurens,

I still don't know what you really want. Plots only?

In the following notebook you will find a procedure which generates a plot similar to that you gave above. The problems of the lengths of the Magenta-lines is solved.

p1, p2 are the points delimiting the line you want to subdivide, cp is the point of convergence, n obvious.

If you want more than plots you can find vectors and functions by typing their names after running the procedure.

You should play around with the inputs, and of course it could be necessary to adapt the Options in the ParametricPlot-statments (Dashing, Pointsize, colors etc.).

Attachments:
POSTED BY: Hans Dolhaine

I just noticed that things are even more complicated and a more subtle logic must be used:

If the magenta - lines start from the "lower" points the distances must be calculated similarly, but in the other direction.

Look at the 2nd notebook with

convpoint = {0, 0};
p1 = {10, -7};
p2 = {10, 7};
n = 6;

That is not really complicated, but one should rewrite the notebook from scratch. I don't have the time to do that right now. The basic idea is:

If the slope of "oldlines[[i]]" is negative the magenta-line should have a slope >0 and the distance from the "lower" point to the line through the midpoint is to be calculated.

POSTED BY: Hans Dolhaine

Hello Laurens,

I modified the notebook having calculated the appropriate lengths of the magenta lines and I attach it here (under the same date - you might consider to save it under another name).

You get a graphic very similar to yours with

convpoint = {0, 0};
p1 = {10, -3};
p2 = {10, 3};
n = 6;
linea = p1 + (p2 - p1) t

In this picture the magenta lines start always from the "upper" points of "subdivisions".

To get your pic one has to implement a logic that if the magenta line points to the negative direction it should start at the lower point. I did that in the 2nd notebook.

I am sure, all this can be reorganized to yield a more stringent procedure.

The question remaining is what do you want? A picture or the equations of the magenta lines?

POSTED BY: Hans Dolhaine

Hi Laurens,

like this perhaps? I did not have enough time to calculate the lengths of the magenta-lines, but that should not be too difficult.

Attachments:
POSTED BY: Hans Dolhaine
Posted 5 years ago

Hi Hans, thanks for your solution, should be helpful. I was wondering as well rather than measure the lengths of the magenta lines how to derive the subdivisions for length "a" in order to produce magenta lines of equal length? It's important that the magenta lines do no overlap the thicker black dashed lines

POSTED BY: Laurens Jacobs
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract