Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with ShapeSolver and Circle #320

Open
Jammy2211 opened this issue Nov 11, 2024 · 0 comments
Open

Bug with ShapeSolver and Circle #320

Jammy2211 opened this issue Nov 11, 2024 · 0 comments
Assignees

Comments

@Jammy2211
Copy link
Owner

I was trying to use the ShapeSolver to compute points within a Circle.

When I used this API:

        centre = self.source_plane_centre.in_list[0]

        triangles = solver.solve_triangles(
            tracer=self.max_log_likelihood_tracer,
            shape=aa.Circle(y=centre[0], x=centre[1], radius=0.3)
        )

I did not compute solutions which matched the PointSolver, but instead were quite different.

When I use this API (swapping y and x I get a good solution:

        centre = self.source_plane_centre.in_list[0]

        triangles = solver.solve_triangles(
            tracer=self.max_log_likelihood_tracer,
            shape=aa.Circle(y=centre[1], x=centre[0], radius=0.3)
        )

Digging into the Circle object, I think the problem is that grids are (unintuitively) defined where index [0] is y and index [1] is x, however the Circle object defines them the other way round.

Thus, the use of Circle in certain calculation is likely incorrect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants