ManimCommunity / manim

A community-maintained Python framework for creating mathematical animations.
https://www.manim.community
MIT License
24.89k stars 1.74k forks source link

CoordinateSystem method: get_line_from_axis_to_point() not working.. #1612

Closed bikashsinghgurung closed 3 years ago

bikashsinghgurung commented 3 years ago

Description of bug / unexpected behavior

I wanted to draw a horizontal line and vertical line from a point to axes. I tried with the method get_line_from_axis_to_point() to draw. But this didn't work. ` class AxesEx(Scene):
def construct(self): myAxis = Axes( x_range=[-3, 5], y_range=[-4, 5], axis_config={ 'include_numbers':True, } ) dot = Dot(color=ORANGE) dot.move_to(myAxis.c2p(3,4)) self.add(myAxis, dot)

    hline = myAxis.get_line_from_axis_to_point(0, myAxis.c2p(3,4))
    self.add(hline)
    vline = myAxis.get_line_from_axis_to_point(1, myAxis.c2p(3,4))
    self.add(vline)`

OUTPUT: AxesEx_ManimCE_v0 6 0

I rechecked calculating the point of projection by a given point on the axes using method: get_projection(point) which is not giving correct result.

I tried checking get_projection() method on a Line() and also on a NumberLine(). It worked perfectly.. But same method didn't work on axes of Axes().

issue2

CAN SOMEBODY HELP??? I am new to manim as well as this github

abhijithmuthyala commented 3 years ago

Hi @bikashsinghgurung, looks like you are using the version v0.6.0? This issue no longer exists on v0.7.0 (which was released just yesterday I believe). Please upgrade to v0.7.0 (pip install -U manim if you've installed manim via pip) and it should work fine.

bikashsinghgurung commented 3 years ago

Thanks @abhi3019 . It worked after upgrading to v0.7.0 AxesEx_ManimCE_v0 7 0