Repository: ManimCommunity/manim

Issue:
Division by zero upon instancing of PointCloudDot
### Unexpected Behavior
Instantiating a `PointCloudDot` results in a division by zero. The problematic line can be found [here](https://github.com/ManimCommunity/manim/blob/fc754fa7f60a7b49840628311f809840c98cdceb/manim/mobject/types/point_cloud_mobject.py#L239).

### Analysis
The variable `r` is defined at `r in np.arange(0, self.radius, self.epsilon)`. Since `np.arange()` includes the lower bound, `r` will assume the value zero and thus leads to a division by zero in the next line. To avoid that division, it's enough to change the lower bound of `np.arange()` to `self.epsilon`. `r=0` does not occur anymore, while other values of `r` remain unchanged.


### Minimal Example
```py
class PointCloudDotTest(ThreeDScene):
    def construct(self):
        p = PointCloudDot()
        self.play(FadeIn(p))

PointCloudDotTest().render()
```
Division by zero upon instancing of PointCloudDot
### Unexpected Behavior
Instantiating a `PointCloudDot` results in a division by zero. The problematic line can be found [here](https://github.com/ManimCommunity/manim/blob/fc754fa7f60a7b49840628311f809840c98cdceb/manim/mobject/types/point_cloud_mobject.py#L239).

### Analysis
The variable `r` is defined at `r in np.arange(0, self.radius, self.epsilon)`. Since `np.arange()` includes the lower bound, `r` will assume the value zero and thus leads to a division by zero in the next line. To avoid that division, it's enough to change the lower bound of `np.arange()` to `self.epsilon`. `r=0` does not occur anymore, while other values of `r` remain unchanged.


### Minimal Example
```py
class PointCloudDotTest(ThreeDScene):
    def construct(self):
        p = PointCloudDot()
        self.play(FadeIn(p))

PointCloudDotTest().render()
```
Division by zero upon instancing of PointCloudDot
### Unexpected Behavior
Instantiating a `PointCloudDot` results in a division by zero. The problematic line can be found [here](https://github.com/ManimCommunity/manim/blob/fc754fa7f60a7b49840628311f809840c98cdceb/manim/mobject/types/point_cloud_mobject.py#L239).

### Analysis
The variable `r` is defined at `r in np.arange(0, self.radius, self.epsilon)`. Since `np.arange()` includes the lower bound, `r` will assume the value zero and thus leads to a division by zero in the next line. To avoid that division, it's enough to change the lower bound of `np.arange()` to `self.epsilon`. `r=0` does not occur anymore, while other values of `r` remain unchanged.


### Minimal Example
```py
class PointCloudDotTest(ThreeDScene):
    def construct(self):
        p = PointCloudDot()
        self.play(FadeIn(p))

PointCloudDotTest().render()
```


Discussion:
Thanks for reporting. Sounds like an easy PR :wink: 
Thanks for reporting. Sounds like an easy PR :wink: 
Thanks for reporting. Sounds like an easy PR :wink: 

Resolving patch:
diff --git a/manim/constants.py b/manim/constants.py
--- a/manim/constants.py
+++ b/manim/constants.py
@@ -101,7 +101,7 @@
 
 # Misc
 DEFAULT_POINT_DENSITY_2D: int = 25
-DEFAULT_POINT_DENSITY_1D: int = 250
+DEFAULT_POINT_DENSITY_1D: int = 10
 DEFAULT_STROKE_WIDTH: int = 4
 
 # Mathematical constants
diff --git a/manim/mobject/types/point_cloud_mobject.py b/manim/mobject/types/point_cloud_mobject.py
--- a/manim/mobject/types/point_cloud_mobject.py
+++ b/manim/mobject/types/point_cloud_mobject.py
@@ -214,7 +214,7 @@ class PointCloudDot(Mobject1D):
     def __init__(
         self,
         center=ORIGIN,
-        radius=0.075,
+        radius=2.0,
         stroke_width=2,
         density=DEFAULT_POINT_DENSITY_1D,
         color=YELLOW,
@@ -235,8 +235,11 @@ def generate_points(self):
         self.add_points(
             [
                 r * (np.cos(theta) * RIGHT + np.sin(theta) * UP)
-                for r in np.arange(0, self.radius, self.epsilon)
-                for theta in np.arange(0, 2 * np.pi, self.epsilon / r)
+                for r in np.arange(self.epsilon, self.radius, self.epsilon)
+                # Num is equal to int(stop - start)/ (step + 1) reformulated.
+                for theta in np.linspace(
+                    0, 2 * np.pi, num=int(2 * np.pi * (r + self.epsilon) / self.epsilon)
+                )
             ]
         )
 


Test patch:
diff --git a/tests/control_data/graphical_units_data/mobjects/PointCloudDotTest.npz b/tests/control_data/graphical_units_data/mobjects/PointCloudDotTest.npz
new file mode 100644
Binary files /dev/null and b/tests/control_data/graphical_units_data/mobjects/PointCloudDotTest.npz differ
diff --git a/tests/test_graphical_units/test_mobjects.py b/tests/test_graphical_units/test_mobjects.py
new file mode 100644
--- /dev/null
+++ b/tests/test_graphical_units/test_mobjects.py
@@ -0,0 +1,19 @@
+import pytest
+
+from manim import *
+from ..utils.testing_utils import get_scenes_to_test
+from ..utils.GraphicalUnitTester import GraphicalUnitTester
+
+
+class PointCloudDotTest(ThreeDScene):
+    def construct(self):
+        p = PointCloudDot()
+        self.play(Animation(p))
+
+
+MODULE_NAME = "mobjects"
+
+
+@pytest.mark.parametrize("scene_to_test", get_scenes_to_test(__name__), indirect=False)
+def test_scene(scene_to_test, tmpdir, show_diff):
+    GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir).test(show_diff=show_diff)