Giter Club home page Giter Club logo

Comments (12)

ajhynes7 avatar ajhynes7 commented on May 26, 2024 1

Update: I have a working rough draft of the code to compute a circle from three points.

I'll add the class method Circle.from_points which takes three points as inputs and returns a Circle object.

from scikit-spatial.

ajhynes7 avatar ajhynes7 commented on May 26, 2024

Yeah I think that would be a good fit in this library. I'll work on it sometime soon.

from scikit-spatial.

typhoon71 avatar typhoon71 commented on May 26, 2024

ehm, thank you. didn't refresh... please read the edit, and thanks a lot!

from scikit-spatial.

CristianoPizzamiglio avatar CristianoPizzamiglio commented on May 26, 2024

Hi @typhoon71!
After you edited your own question, it's not clear to me if you still want a classmethod to compute a circle from three points or something else. Can you provide further details, please? Thanks!

from scikit-spatial.

typhoon71 avatar typhoon71 commented on May 26, 2024

My case:
I'm given the 2 end-points of a segment, and the value of the sagitta (which basically gives me a third point).
I need to get the circle passing by those 3 points.

  • in my original request I was thinking of calculating that third point myself, and just ask for a classmethod to compute a circle from three points
  • then I started to think to use the sagitta value

So I'm actually asking 2 class method.

I have segments lenghts around 50 to 200, and sagitta values from .5 to 5.

(I'm currently experiencing some issues with what I found online and I'm trying to understand if the cause is related to rounding or is just a mistake of mine; I may ask for help about this later, in another post)

from scikit-spatial.

typhoon71 avatar typhoon71 commented on May 26, 2024

Thank you, awesome news.

I really want to test this new method because when I try to do it with what I got... the circle I get does not pass from the 3 starting points - there's a really small distance, but it's there.

from scikit-spatial.

CristianoPizzamiglio avatar CristianoPizzamiglio commented on May 26, 2024

Update: I have a working rough draft of the code to compute a circle from three points.

I'll add the class method Circle.from_points which takes three points as inputs and returns a Circle object.

Hi @ajhynes7, great! Thanks!

@typhoon71 Two points and the sagitta value are the inputs required to define a circular arc. So, maybe, we could define a from_arc classmethod that requires two points and a float.
@ajhynes7 Do you think this classmethod could be a valuable addition to the library?

from scikit-spatial.

ajhynes7 avatar ajhynes7 commented on May 26, 2024

Will from_arc still be needed after adding from_points?

from scikit-spatial.

typhoon71 avatar typhoon71 commented on May 26, 2024

from_arc would be easier to use when you don't have the 3 points, but 2 points the arc sagitta (my case).
I guess it would be a particular case.

from scikit-spatial.

ajhynes7 avatar ajhynes7 commented on May 26, 2024

Are you able to solve your problem with Circle.from_points? It's available now in the new release.

from scikit-spatial.

typhoon71 avatar typhoon71 commented on May 26, 2024

I just tested Circle.from_points (thank you), and while it works fine it doesn't solve my issue.

I'm pretty sure (after some investigation) that what I'm experiencing is floating point rounding/precision - and that doesn't go well with the stuff I'm doing (geometry).

If you are interested I can open a post about it - hopefully some better mind can give me a good push in the right direction.

from scikit-spatial.

ajhynes7 avatar ajhynes7 commented on May 26, 2024

Yeah I think opening a new issue would be appropriate here.

from scikit-spatial.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.