Comments (12)
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.
Yeah I think that would be a good fit in this library. I'll work on it sometime soon.
from scikit-spatial.
ehm, thank you. didn't refresh... please read the edit, and thanks a lot!
from scikit-spatial.
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.
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.
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.
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 aCircle
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.
Will from_arc
still be needed after adding from_points
?
from scikit-spatial.
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.
Are you able to solve your problem with Circle.from_points
? It's available now in the new release.
from scikit-spatial.
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.
Yeah I think opening a new issue would be appropriate here.
from scikit-spatial.
Related Issues (20)
- [enhancement] Signed Area - Shoelace Formula HOT 4
- [enhancement] Projection of a line onto a plane. HOT 2
- Slicing the Vector HOT 2
- Mesh for cylinders has wrong radius if not axis-aligned. HOT 2
- Faster Line.best_fit with scipy.sparse.linalg.svds HOT 4
- Value range for fitted plane is not right HOT 6
- Add object for line segment (closed line) HOT 3
- `angle_signed` for 3D Vectors HOT 2
- python3.6.x HOT 2
- Cylinder.best_fit HOT 8
- intersection line are not complanar with line in plane HOT 13
- Method for computing the distance between two parallel planes? HOT 2
- Intersection between 2 Circles HOT 5
- Why raising ValueError instead of returning an empty list? HOT 3
- Vector from angle HOT 5
- 2D geometry problem: fillet two curves HOT 1
- AttributeError: 'LineSegment' object has no attribute 'plotter' HOT 3
- `Line.distance_line` bug? HOT 3
- `Ellipse`/`Ellipsoid` classes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scikit-spatial.