Repository: ManimCommunity/manim
Pull request: Reduced default resolution of :class:`~.Dot3D`
<!--
Thanks for your contribution to ManimCommunity!

Before filling in the details, ensure:
- Your local changes are up-to-date with ManimCommunity/manim
  
- The title of your PR gives a descriptive summary to end-users. Some examples:
  - Fixed last animations not running to completion
  - Added gradient support and documentation for SVG files
  Examples of what *NOT* to do:
  - "fixed that styling issue" - not descriptive enough
  - "fixed issue #XYZ" - end-user needs to do further research
-->
## Changelog / Overview
<!-- Optional (Recommended): a detailed overview of the PR for the upcoming
release's changelog entry. Useful for when the PR title isn't enough. 

DO NOT REMOVE THE FOLLOWING CHANGELOG LINES, EVEN IF YOU DON'T USE THEM.-->
<!--changelog-start-->

<!--changelog-end-->

## Motivation
<!-- In what way do your changes improve the library? -->
Running a scene with the current resolution takes a long time as stated in #1771 
## Explanation for Changes
<!-- How do your changes improve the library? -->
I've added a parameter in ```dot3d``` class to set the default resolution as ```(8,8)``` 
## Documentation Reference
<!-- Please include links to the affected documentation pages below. --> 


## Testing Status
<!-- Optional (Recommended): your computer specs and what tests you ran with
their results, if any. This section is also intended for other
testing-related comments. -->
I've ran ```pytest``` and ```black manim``` 
## Further Comments
<!-- Optional: any further comments that might be useful for reviewers. -->

## Checklist
- [x] I have read the [Contributing Guidelines](https://docs.manim.community/en/latest/contributing.html)
- [x] I have written a descriptive PR title (see top of PR template for examples)
- [x] I have written a changelog entry for the PR or deem it unnecessary
- [ ] My new functions/classes either have a docstring or are private
- [ ] My new functions/classes have [tests](https://github.com/ManimCommunity/manim/wiki/Testing) added and (optional) examples in the docs
- [ ] My new documentation builds, looks correctly formatted, and adds no additional build warnings
<!-- Once again, thanks for contributing to ManimCommunity! -->


<!-- Do not modify the lines below. These are for the reviewers of your PR -->
## Reviewer Checklist
- [ ] The PR title is descriptive enough
- [ ] The PR is labeled correctly
- [ ] The changelog entry is completed if necessary
- [ ] Newly added functions/classes either have a docstring or are private
- [ ] Newly added functions/classes have [tests](https://github.com/ManimCommunity/manim/wiki/Testing) added and (optional) examples in the docs
- [ ] Newly added documentation builds, looks correctly formatted, and adds no additional build warnings


Problem statement:
Reduce the resolution of `Dot3D`
## Enhancement proposal
Currently, `Dot3D` uses the default `Sphere` resolution of (12, 24). Running a scene with lots of `Dot3D`s, like a scene with polyhedra, takes incredibly long because of the high resolution. I think a resolution of (8, 8) is a good balance between speed and visual looks. After changing the resolution, the control data for some tests have to be regenerated.


## Additional comments
<!-- Add further context that you think might be relevant. -->

Hints from issue discussion:
Hi! Can I pick up this issue ? I am a newbie to this project and would like to contribute whatever I can!
Sure! I've assigned you to this issue 👍

Commit message: added parameter to reduce resolution of Dot3D

Patch to review:
diff --git a/manim/mobject/three_dimensions.py b/manim/mobject/three_dimensions.py
index cf1e0e6bd3..ec6a62fa60 100644
--- a/manim/mobject/three_dimensions.py
+++ b/manim/mobject/three_dimensions.py
@@ -340,7 +340,7 @@ def construct(self):
     """
 
     def __init__(self, point=ORIGIN, radius=DEFAULT_DOT_RADIUS, color=WHITE, **kwargs):
-        Sphere.__init__(self, center=point, radius=radius, **kwargs)
+        Sphere.__init__(self, center=point, radius=radius, resolution=(8, 8), **kwargs)
         self.set_color(color)
 
 


Code review comments:
diff_hunk: @@ -340,7 +340,7 @@ def construct(self):
     """
 
     def __init__(self, point=ORIGIN, radius=DEFAULT_DOT_RADIUS, color=WHITE, **kwargs):
-        Sphere.__init__(self, center=point, radius=radius, **kwargs)
+        Sphere.__init__(self, center=point, radius=radius, resolution=(8, 8), **kwargs)
path: manim/mobject/three_dimensions.py
text: @user1:
This will cause an error to be thrown if a user passes in a resolution parameter:
```py
TypeError: manim.mobject.three_dimensions.Sphere.__init__() got multiple values for keyword argument 'resolution'
```
a safer approach would be to include it in `__init__` and doing `resolution=resolution`

(also change a `Sphere.__init__` to super since you're already on that line 😄)
```suggestion
        super().__init__(center=point, radius=radius, resolution=(8, 8), **kwargs)
```


@author:
Noted, thanks for the quick response!
But shouldn't I change the ```resolution``` to ```(8,8)``` in the ```__init__``` method ?

@user2:
Yes, and do `resolution=resolution` in the superclass init.