-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
Add new option to hyperbolic graphics to select the model #22081
Comments
Changed keywords from none to hyperbolic geometry plot |
New commits:
|
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:6
I like this new functionality. It would be great if regular polygons could also be drawn in the Poincare disc model. Here are a few issues with the coding style: In hyperbolic_arc.py, HyperbolicArc.init, the code
would better be
which then requires less indenting for the following block. HyperbolicArc.init should also report an error if The same two remarks apply to HyperbolicPolygon.init. The style guide in PEP 8 says "Method definitions inside a class are surrounded by a single blank line.". Please do that here. The coding guideline for docstrings says It describes the function or method’s effect as a command (“Do this”, “Return that”), not as a description like “Returns the pathname ...”. So for example, the documentation for _PD_hyperbolic_arc, "Function to construct an hyperbolic arc ...", should start "Construct an hyperbolic arc ...". The docstring for _bezier_path, "Returns the corresponding bezier path", should not start with "Returns the" and in any case should be more informative about the function. As this function does not in fact return anything, the docstring is quite misleading. The docstrings should be more complete as well, for all method definitions, describing the inputs and output and containing at least one example or test. See http://doc.sagemath.org/html/en/developer/coding_basics.html#section-documentation-strings There are several identical methods in hyperbolic_arc.py and hyperbolic_polygon.py. This code duplication is never a good idea if the functions are truly the same. Perhaps the two classes could inherit from some new class that contains a singly copy of these definitions---this will make repair easier if an error is discovered in future or some new functionality is to be added. It would be useful somewhere to describe the different coordinate systems used for the two models, as it is not immediately obvious what are legitimate PD coordinates. It is too bad that there is no model-independent way to specify the points (which would make it easy to plot the same diagram in the two different models). However, adding this probably goes beyond the scope of what you are trying to do here. Finally, file /src/bin/sage-env-config should not be tracked. |
comment:7
thank you for your time reviewing the ticket. I'll work on this issues (one at a time) |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:10
This is a partial commit, it lacks your suggestion about a description of the different hyperbolic plane models yet. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:42
Thank you for the additional changes. There were still a few bugs dealing with the different input types of I managed to streamline the arc construction with a little bit of refactoring and a well-placed I made some other documentation tweaks and fixes. If the bot comes back green (in particular, I think we should look at the doc output with the new tag above), then we can set a positive review if my changes are good. Also, sometimes it can be good to ignore what the any linter/codestyle tool says in favor of readability and consistency with other code. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:44
Doc looked good modulo a few more tweaks I did. I also fixed up some pyflakes, which modulo that the patchbot was green. |
comment:45
From the log, the one patchbot docbuild seems like it has an unrelated error. Everything else is green. |
comment:46
looks good to me. Thanks for your contribution. I learn new python tricks everyday :-) |
comment:47
Then positive review? |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:49
Documentation did build prior to my trivial typo change. |
comment:50
Replying to @tscrim:
I do not understand. Are you asking me to change the status? :-)I don't mind changing it, if you prefer so |
comment:51
I have changed it, but since you were the one reviewing my changes (as I pushed them last), you are well within your rights to do so. |
comment:52
Ok. I were not sure of how the 'etiquette' worked out in this case :-) |
comment:53
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:55
This should take care of any numerical noise. |
Changed branch from public/graphics/hyperbolic_graphics-22081 to |
As a first approach add the poincare disc model, and an option to select the model to use the drawing hyperbolic arcs and polygons
CC: @tscrim
Component: graphics
Keywords: hyperbolic geometry plot
Author: Javier Honrubia González
Branch/Commit:
29f335c
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/22081
The text was updated successfully, but these errors were encountered: