0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

wslでmanim

Last updated at Posted at 2024-08-10

概要

wslでmanimやってみた。
開発環境構築編。

環境

windows11
wsl(wsl2じゃない)
ubuntu 22.04

手順

>sudo apt update

>sudo apt install build-essential python3-dev libcairo2-dev libpango1.0-dev ffmpeg

>sudo apt install python3-pip

>pip3 install manim


サンプルコード

from manim import *

class Test(Scene):
	def construct(self):
		func = lambda pos: np.sin(pos[0] / 2) * UR + np.cos(pos[1] / 2) * LEFT
		stream_lines = StreamLines(func, stroke_width=2, max_anchors_per_line=30)
		self.add(stream_lines)
		stream_lines.start_animation(warm_up=False, flow_speed=1.5)
		self.wait(stream_lines.virtual_time / stream_lines.flow_speed)




コンパイル手順

> export PATH=/home/****/.local/bin:$PATH

> cd project

> manim test0.py -ql -i


成果物

Test_ManimCE_v0.18.1.gif

追加インストール

sudo apt install texlive texlive-latex-extra texlive-fonts-extra texlive-latex-recommended texlive-science tipa

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?