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

Adding new example to documentation of MovingCamera and MovingCameraScene #3098

Closed
MrDiver opened this issue Dec 28, 2022 · 10 comments · Fixed by #3972
Closed

Adding new example to documentation of MovingCamera and MovingCameraScene #3098

MrDiver opened this issue Dec 28, 2022 · 10 comments · Fixed by #3972
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers new feature Enhancement specifically adding a new feature (feature request should be used for issues instead)

Comments

@MrDiver
Copy link
Collaborator

MrDiver commented Dec 28, 2022

I don't think we have a good example for how to use MovingCameraScene in the actual documentation for either MovingCamera or MovingCameraScene.

class Test(MovingCameraScene):
  def construct(self):
    def create_scene(number):
      frame = Rectangle(width=16,height=9)
      circ = Circle().shift(LEFT)
      text = Tex(f"This is Scene {str(number)}").next_to(circ, RIGHT)
      frame.add(circ,text)
      return frame

    group = VGroup(*(create_scene(i) for i in range(4))).arrange_in_grid(buff=4)
    self.add(group)
    self.camera.auto_zoom(group[0], animate=False)
    for scene in group:
      self.play(self.camera.auto_zoom(scene))
      self.wait()
    
    self.play(self.camera.auto_zoom(group, margin=2))

Here is a little example

scriptoutput.mp4
@MrDiver MrDiver added documentation Improvements or additions to documentation good first issue Good for newcomers new feature Enhancement specifically adding a new feature (feature request should be used for issues instead) labels Dec 28, 2022
@solomonsanderson
Copy link

Would you like the documentation for the mentioned classes to be similar to that for moving_camera_scene which has plenty of examples? I would be happy to take on this task if so.

@MrDiver
Copy link
Collaborator Author

MrDiver commented Jan 11, 2023

I actually missed that there is Documentation on the Module, it is sometimes unclear which parts are documented. The documentation should either be referenced in MovingCameraScene or some parts should be moved over there.

I think referencing on this page https://docs.manim.community/en/stable/reference/manim.camera.moving_camera.MovingCamera.html#manim.camera.moving_camera.MovingCamera should be good, to find the documentation

@pranav-ravuri
Copy link

Hi, is this issue still open, if so I would like to help.

@MrDiver
Copy link
Collaborator Author

MrDiver commented Mar 29, 2023

Seems to still be open, you are free to change the docs if you want @pranav-ravuri i would just reference the moving_camera_scene in the docs mentioned above. They're already mentioned here https://docs.manim.community/en/stable/reference/manim.camera.moving_camera.html but i am not quite sure if many people walk over that, so expanding the other reference would be great.

@pranav-ravuri
Copy link

Okay, can you assign this task to me?

@MrDiver MrDiver moved this from 🆕 New to 🏗 In progress in Dev Board Mar 31, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Dev Board Mar 31, 2023
@pranav-ravuri
Copy link

Hi, @MrDiver sorry for the delay, I needed time to look into the source code a little bit to understand what is happening. So, my understanding is that there is camera_class attribute base Scene class which holds the camera class to be used. The default Scene class initializes Camera into the camera_class and this class does not allow any camera movement. On the other hand, MovingCameraScene initializes MovingCamera class instead of standard Camera class along with modifying the existing get_moving_mobjects method . This change allows us to render the movement of camera in a scene as the name suggests.

So, it does not seem like class MovingCamera in itself is not intended to be used as is but rather to be used by indirectly by importing the necessary Scene class like MovingCameraScene.

Finally the documentation of MovingCameraScene has been already linked in the documentation of moving_camera and MovingCamera as a "see also" info card. So, do you thing paraphrasing the my first paragraph and adding it to the documentation of MovingCamera would make it clear?

@MrDiver
Copy link
Collaborator Author

MrDiver commented Mar 31, 2023

The problem is that MovingCameraScene does not really have documentation. Rather the module moving_camera_scene has the documentation. Just linking to the module too would help find the documentation a little bit more easily. moving_camera_scene has a lot of documentation which is not easily found by serching because people will most likely click on the classes and not on the modules.

grafik

Which is also not helped by the fact that you can't just search moving camera and find the documentation you want, because the first useful result is the MovingCameraScene which doesn't have such extensive documentation.

@pranav-ravuri
Copy link

Okayyy so, should I just link the documentation of moving_camera_scene (the module) documentation in the documentation of the MovingCameraScene (the class). It would appear in the see also info box (marked in red in the below image) next to the MovingCamera link which is already present.

image

I am thinking to add the new moving_camera_scene (the module) documentation as the first link and then the documentation of MovingCamera (which is already there) as the second link in the order.

@MrDiver MrDiver moved this from 🏗 In progress to 📋 Backlog in Dev Board Dec 10, 2023
@TahitiX
Copy link
Contributor

TahitiX commented Oct 18, 2024

Hi, MrDiver!
We are a group of university student and would like to make first contributions towards this repo.
Can we work on this issue?

@uwezi
Copy link
Contributor

uwezi commented Oct 18, 2024

Hi, MrDiver! We are a group of university student and would like to make first contributions towards this repo. Can we work on this issue?

I'm not MrDiver but I believe I am speaking for everyone here: sure, go ahead, every contribution is welcome!

Have a look here: https://docs.manim.community/en/stable/contributing.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers new feature Enhancement specifically adding a new feature (feature request should be used for issues instead)
Projects
Status: 📋 Backlog
Development

Successfully merging a pull request may close this issue.

5 participants