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

Issue with halo/sky drawing plot in chapter 5. #30

Closed
CamDavidsonPilon opened this issue Mar 28, 2013 · 2 comments
Closed

Issue with halo/sky drawing plot in chapter 5. #30

CamDavidsonPilon opened this issue Mar 28, 2013 · 2 comments

Comments

@CamDavidsonPilon
Copy link
Owner

Brought to me attention by Gabriel Kronberger:

I'm almost sure that your draw_sky routine has a bug. This is apparent in one-halo sky (7) because the nearest galaxies are not elongated tangentially but instead point into the direction of the halo. Comparing your picture with my outputs some galaxies are shown correctly while others are elongated in the wrong direction. This indicates that there might by a problem with the calculation of the angle using arctan / atan2. I checked your code but can't point the finger at the bug, because I'm not familiar with the ellipse command, does it handle negative angles correctly?

If it helps I used linear transformations for the graphical output in C#

        m.Translate(x, y]);
        m.Rotate(45);
        m.Scale(1f + Math.Max(0, e2[i]), 1.0f - Math.Min(e2[i], 0));
        m.Rotate(-45);
        m.Scale(1f + Math.Max(0, e1[i]), 1.0f - Math.Min(e1[i], 0));
        graphics.Transform = m;
        graphics.FillEllipse(Brushes.Black, -2f, -2f, 4f, 4f);

A main issue is the strange reference system for e1 and e2.
One thing you can try is to check skys that have one very pronounced halo (e.g. 3). For comparison I attached my visualization of training sky number 3.

Training_Sky3

@CamDavidsonPilon
Copy link
Owner Author

pinging @vgoklani as my code was adapted from his. Maybe he can assist?

@CamDavidsonPilon
Copy link
Owner Author

Fixed, small indexing error

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

1 participant