mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Clean up Arc init
This commit is contained in:
parent
b967c04c2c
commit
dba70ceded
1 changed files with 3 additions and 8 deletions
|
@ -226,14 +226,9 @@ class Arc(TipableVMobject):
|
|||
start_angle: float = 0,
|
||||
n_components: int = 8
|
||||
) -> Vect3:
|
||||
samples = np.array([
|
||||
[np.cos(a), np.sin(a), 0]
|
||||
for a in np.linspace(
|
||||
start_angle,
|
||||
start_angle + angle,
|
||||
2 * n_components + 1,
|
||||
)
|
||||
])
|
||||
n_curves = 2 * n_components + 1
|
||||
angles = np.linspace(start_angle, start_angle + angle, n_curves)
|
||||
samples = np.array([np.cos(angles), np.sin(angles), np.zeros(n_curves)]).T
|
||||
theta = angle / n_components
|
||||
samples[1::2] /= np.cos(theta / 2)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue