2
$\begingroup$

First time posting here - Apologies for the slightly vague title, found it hard to explain in one line. Hopefully this will make more sense.

I'm not heavy into math knowledge, so apologies if I don't use the best terminologies, but I am comfortable with it as I like using it regularly on my projects for 3D applications.

In my search to create a fast and efficient system that distributes points in a circle evenly regardless of the size (in either axis) I came up with an interesting relationship between the points in the original circle position and the ones in the scaled one (the ellipse). I am able to use this findings by creating a look-up table that query values as I need, but I was wondering if this could be wrapped into a known (or unknown) function? If so, how would I go about it?

Here's my findings

This is half a circle, with their original point positions, scaled in the X axis (3x):

Stretched Points - By scaling the circle, their original points stop being evenly distributed and tend to clump together the closer they get to both ends.

This is the same half circle, with evenly distributed points:

Evenly Distributed Points

What I did next, is map the position of each points to their relative position in the curve that represents the half-circle where the beginning = 0 and the end = 1 - I call this the U value.

I then subtracted each point's U value from their relative one in the other curve, and thus getting the change in U necessary in each point to reach the 'evenly distributed' position.

What I found interesting, is that there seemed to be a relationship between those values. I plotted those values into a curve and the more I increased the scale factor, the tighter the curve became and at one point, it barely even changed.

This is the result of plotting those differences (scaled 100x and 500 points to get a better resolution):

U Relationship

From here on, no matter how big I went, this curve didn't change much at all. It's only when you get closer to 1x scale that it draws closer to a flat line.

So, has anyone seen that particular curve before? After some research the closest I found was the Clausen Function, but it didn't quite fit. Both ends seem to have completely vertical tangents. Do you guys know if it would be possible for me to turn that into a useful function?

The reason I'm interested by this, is because I feel I can potentially be able to predict the right U value based on the scale factor and thus evenly distribute points in any ellipse without any form of arc-particularization (which I need to avoid due to limitations on my current project). Using a look-up table as I expressed above does the job for me now (with a small error threshold) but I bet there is a cleaner way to do this.

I hope this made some sense, I'm happy to expand further if I'm missing information that my help. Would love to hear your thoughts on this. Thanks!


Side notes:

Those graphs were plotted in Houdini, my 3D application of choice which allows me to prototype ideas pretty efficiently.

$\endgroup$
1

1 Answer 1

1
$\begingroup$

Calculating arclength along an ellipse calls for evaluating an elliptic integral. These are well studied functions that do not have closed form expressions of the type you seek. I suspect you will have to use tables, or other approximations.

There are images on this this wikipedia page that resemble yours.

$\endgroup$
2
  • $\begingroup$ Thanks for the feedback! I gathered it may be the case... At the moment I'm using a table that stores those differences (and allows me to use it in any shaped ellipse effectively). I guess it was far too hopeful to expect a function may come out of it. $\endgroup$ Commented Jun 17, 2019 at 1:51
  • 1
    $\begingroup$ You're welcome. You stumbled on a very important question. It's never wrong to hope. $\endgroup$ Commented Jun 17, 2019 at 2:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .