Grasshopper

algorithmic modeling for Rhino

Hi all,

 I would like from a line find precise coordinates in X and Y to implement this line.

Exemple: this line:

I looking a coordinate round in the "infinte" line:

In this example I cheated by first tracing the line with precise coordinates, but the goal would be to start from a Line Draws without coorodnées.

Thanks for all !

Views: 1049

Replies to This Discussion

The bigger the search domain, the better the final answer you can get.

Look at my line;

with large coordinates: Y seems stuck ...

It's possible to defined a domain X and Y ?

You could create the domain based on your line:

Attachments:

The problem is a domain defined for X coordinates.

For Y there is no limitation.

This does not work for my line!

One thing I noticed is that your line is extremely off from 0,0,0.

Moving it near the start of the ucs returns a line. 

If this still doesn't work, then maybe I didn't understand David's solution and the domain is not the line's X coordinates domain.....?

I feel that there is a limit in Y
With your définition i solve my problem but the points are so far !

That is correct, the search domain is bounded along the X-axis only. The points in the Y direction are computed by intersection, so they are not limited to a specific domain.

This algorithm will return the best possible point pair within the given x-domain. If you want a better solution you need to enlarge the domain so more points become available for the search. If points are too far away from the line you need to shrink the domain to get them closer.

Your problem is basically like the Heisenberg uncertainty principle. The more accurately you measure one thing, the less accurate another becomes. Either you want points near the original line and you don't care much about accuracy, or you want high accuracy in which case you are not allowed to care if the points end up far away.

Nice explanation, too bad my English is bad I can not dwell on the subject.

In topography there are principle for solving this kind of thing, I'm going out my class!

you are both right, looking at it a bit more I ended up doing what FRiou sugested: 

Starting with a (finite...) series of X integers, you can find the 2 y coordinates closest to an integer. 

Attachments:

It's good, the only problem is the distance of points.
The desired points should not be too far from the starting points.

With slider Start and Count it's possible to approach the desired result.

Thanks

Playing a bit with Galapagos I found two round points for my random line (with a 0.00011 and 0.000159 precision... not bad!)

But these points are definitely not close to the original ones... too bad.

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service