-
Notifications
You must be signed in to change notification settings - Fork 2.2k
ThreeDScene PolarPlane units are not aligned with actual drawing units #4241
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
Comments
If I remove the polar_plane = PolarPlane(
radius_max=10.0,
radius_step=1,
azimuth_step=16,
azimuth_units="degrees",
azimuth_label_font_size=16,
radius_config={"font_size": 16},
faded_line_ratio=4,
#size=10,
).add_coordinates() Q01: If I did have to specify the |
This is true for every coordinate system both in 2D and 3D. The coordinate system objects work as coordinate transformations between a local system inside the object and the global scene coordinates. You have always to choose the correct scaling to make the axes match - but normally you would not care to much to have your coordinate system fit to the (fixed) scene coordinates. That's just the great thing about the coordinate systems, that you can have as many as you wish... here in 2D: The So the way to go is to define your coordinate systems with whichever coordinate ranges you want, and then don't mix these with any placement of objects in scene coordinates, but rather always use the coordinate systems' coordinate translation functions, |
This second version of the example also contains a polar plane: |
So what should you do if you have an arbitrarily sized polar plane and want to draw a circle with a given in-plane radius? unitradius = np.linalg.norm(pplane.pr2pt(1,0)-pplane.pr2pt(0,0))
circle = Circle(radius=3*unitradius, arc_center=pplane.pr2pt(0,0))
class pplaneCirc(Scene):
def construct(self):
pplane = PolarPlane(
radius_max=10,
size=7,
radius_step=2,
azimuth_step=8
).add_coordinates().rotate(PI/8).shift([2,0,0])
self.add(pplane)
unitradius = np.linalg.norm(pplane.pr2pt(1,0)-pplane.pr2pt(0,0))
circle = Circle(radius=3*unitradius, arc_center=pplane.pr2pt(0,0))
self.add(circle) |
Description of bug / unexpected behavior
I created a ThreeDScene and added a PolarPlane.
I notice that the PolarPlane units are not aligned with actual drawing units in the render.
If I try to draw a circle with radius 2.0, on the PolarPlane, the circle is drawn with a radius of 4.
The units for the axes for the ThreeDScene and not aligned with the units of the axes for the PolarPlane.
Expected behavior
I expect both the ThreeDScene and PolarPlane axes units to be identical.
How to reproduce the issue
Code for reproducing the problem
System specifications
System Details
pip list
):LaTeX details
The text was updated successfully, but these errors were encountered: