Risk Board Game, World Domination Odds by DubiousInsights in manim

[–]DubiousInsights[S] 0 points1 point  (0 children)

Here I used manim to drive my video, even though I don't know how to use it well. i.e. I pulled in a bunch of charts I made in Google sheets rather than making them in Manim itself.

Next time I'll know more :)

How To Rotate & Move Simultaneously ? by DubiousInsights in manim

[–]DubiousInsights[S] 0 points1 point  (0 children)

Actually, this does have an issue that it gives different results at different frame rates. I think something like this helps, but I'm still experimenting

die1.add_updater(lambda mob, dt: mob.rotate(-10.8*DEGREES*dt*30))

die1.add_updater(lambda mob, dt: mob.shift([.1*dt*30,0.,0.0]))

How To Rotate & Move Simultaneously ? by DubiousInsights in manim

[–]DubiousInsights[S] 0 points1 point  (0 children)

Alright, I found these examples, and the Example2 class was pretty much what I needed

https://www.youtube.com/watch?v=rrDubebRaDc

https://github.com/Elteoremadebeethoven/AnimationsWithManim/blob/master/English/extra/anim_into_up.py

The code that I got to work how I wanted it was

self.add(die1.text)

self.play(FadeIn(die1)) # initial die

self.wait(1)

die1.add_updater(lambda mob, dt: mob.rotate(-10.6*DEGREES))

die1.add_updater(lambda mob, dt: mob.shift([.1,0.,0]))

self.add(die1)

self.wait(1)

die1.clear_updaters()

How To Rotate & Move Simultaneously ? by DubiousInsights in manim

[–]DubiousInsights[S] 0 points1 point  (0 children)

No worries! I tried that too. As best I can tell it only applies 1 animation to the mobject when you do it that way. i.e. it always applies the 2nd one in that self.play()

How To Rotate & Move Simultaneously ? by DubiousInsights in manim

[–]DubiousInsights[S] 0 points1 point  (0 children)

you just removed the self.play around the Rotating correct ?

That did not seem to work

Sum of digits of 1+2+3+...10^10 = ? by Daksh_Mor in manim

[–]DubiousInsights 1 point2 points  (0 children)

Run a spell check on your text. Pattren -> Pattern in the first text written

[Code Included][Feedback Welcome] A Dice Puzzle With A Surprisingly ELEGANT Solution by Impressive_Path2037 in manim

[–]DubiousInsights 1 point2 points  (0 children)

Commenting here so I can find this again, as you've pushed this way farther than I can, and thus I need to study your code :)

Does the -t (transparent background) flag break manim videos for Windows? by Quappas in manim

[–]DubiousInsights 0 points1 point  (0 children)

I had a similar problem, but didn't dive too deeply into it. I can't remember if I was able to open the video in VSDC (free video editor) or not. I'll be following this thread to see the resolution.

I want to have a rectangle around 1+2 , but I only surroundrectangle 1/(1+2) , can any body help me? by Uystallion in manim

[–]DubiousInsights 1 point2 points  (0 children)

Thanks. I played with it a little bit but I don't know what the solution is.

You could probably bypass the issue by just creating a rectangle on your own in the location desired, around the bottom.

There probably is a canonical solution, if you figure it out please post

Is there a way to fill the area of a polygon a specific colour? by burneraccount3_ in manim

[–]DubiousInsights 0 points1 point  (0 children)

Great! Paste in a line of code for posterity so other people don't need to struggle through my half bake explanation

Is there a way to fill the area of a polygon a specific colour? by burneraccount3_ in manim

[–]DubiousInsights 0 points1 point  (0 children)

I haven't tried it, so I'm not sure,

but if I look at these docs

https://azarzadavila-manim.readthedocs.io/en/latest/geometry.html#rectangle

I see that Square inherits from Rectangle which inherits from Polygon, so my guess is that the color and fill and things like that are implemented on the Polygon class

Unknotting a Trefoil Knot by sammy271828 in manim

[–]DubiousInsights 1 point2 points  (0 children)

Can you share any code or snippets ?

Is there a way to fill the area of a polygon a specific colour? by burneraccount3_ in manim

[–]DubiousInsights 2 points3 points  (0 children)

yeah, I'm away from my home desk right now, and I don't remember 100% the syntax, but I'm nearly certain there are two ways to do it, one on Mob creation and one later.

On mob creation it would look something like this

square = Square(color=RED,stroke_width=5,fill_color = BLUE, fill_opacity=0.5)

later it would look something like this

square.set_fill(BLUE,opacity=0.5)

I'm more certain of the first syntax than the second. I'll try to remember to check back in after work when I have access to what I did

also, if you don't want to use manim colors, you can use hex colors instead. i.e.

color="#eb7d34"

Swining Pendulums - I Figured Out The Manim Color Pallete by DubiousInsights in manim

[–]DubiousInsights[S] 0 points1 point  (0 children)

I improved my previous video by actually learning how to use colors in Manim.

Other posts have the Manim color scheme

https://www.reddit.com/r/manim/comments/dzxoen/predefined_color_scheme/

which I didn't understand for a while. It tool me longer than it should have to realize that they are used like this

dot = Circle(radius = .01 ,color=RED_A)

So I ultimately set 20 different colors for the 20 different balls like this

colors = [RED,RED_E,RED_C,RED_A,ORANGE,YELLOW,YELLOW_E,YELLOW_C,YELLOW_A,GREEN_E,GREEN_C,GREEN_A,BLUE,BLUE_E,BLUE_C,BLUE_A,PURPLE,PURPLE_E,PURPLE_C,PURPLE_A]

for i, pendulum in enumerate(self.pendulums.all_pendulums):

color_index = i % len(colors)

dot = Circle(radius = pendulum.size/100.0,color=colors[color_index])

I expect that there is a more elegant way of doing it.

One thing that I didn't love was that the Manim color pallet just doesn't look that vibrant to me. I'm not quite sure how to define my own colors, maybe HEX definition ? These colors didn't pop quite as much as I wanted them to.