Python Physics: Building a Lagrangian Model for a Half Atwood with Spring

  Рет қаралды 510

Dot Physics

Dot Physics

Күн бұрын

Пікірлер: 3
@fizixx
@fizixx 10 күн бұрын
The diagrams are as tricky to do as anything else. I started building a library of shapes I can use to build things. It's handy. This is a super demo.
@ajejebrazor4936
@ajejebrazor4936 10 күн бұрын
Thank you! Great example! It makes me wonder if is possible to redefine some 3D objects in order to put them on sides instead of the center
@marcrindermann9482
@marcrindermann9482 10 күн бұрын
I was wondering how you connected the two strings. I've been recreating the machine before I watched the video. I started building my scene with the pulley at (0,0,0) and created the rest from there. I obviously used a different scale from yours but here is my solution for the arc r = 0.6 points = [vp.vector(r * vp.cos(theta), r * vp.sin(theta), 0) for theta in np.linspace(0, np.pi / 2, 12)] self.arc = vp.curve(pos=points, radius=0.2, color=vp.color.white) My pulley has a radius of 0.5, my string is maybe a bit thick. I never used vpython's curve before so it was a good opportunity to test it. Advantage of leaving the pulley at the origin is that I didn't need to be careful about adding any vectors to the points I created using python's list comprehension. I never used a list comprehension with a linspace either. So this has been a great little project to do something I've never done before. In case anybody is reading this and wondering what vp., np. and self. mean. I'm using python on my local machine instead of a cloud based solution. So I've got import vpython as vp import numpy as np to access the objects like vp.box, vp.cylinder, np.linspace etc. And I've put my scene in a class Atwood, which is why I refer to self.arc, self, slider, self.string, etc. using the curve instead of spheres leaves tiny gaps where the arc connects to the strings but if you don't zoom in too closely it's not noticeable.
Classical Mechanics: First Semester Course Review
28:44
Dot Physics
Рет қаралды 891
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
Python Physics: Symbolic Lagrangian Solutions Using Sympy
23:33
Dot Physics
Рет қаралды 1 М.
2024's Biggest Breakthroughs in Math
15:13
Quanta Magazine
Рет қаралды 451 М.
Python laid waste to my C++!
17:18
Sheafification of G
Рет қаралды 142 М.
Modern Languages Don't Help Solve Hard Problems (Jonathan Blow)
6:45
How is THIS a thing in Python?!
9:54
Carberra
Рет қаралды 8 М.
Someone improved my code by 40,832,277,770%
28:47
Stand-up Maths
Рет қаралды 2,6 МЛН
Python Physics: Modeling Exploding Balls
31:59
Dot Physics
Рет қаралды 535
The Fascinating Programming of a Chess Engine
6:45
Bartek Spitza
Рет қаралды 352 М.
The Simple Math Problem That Revolutionized Physics
32:44
Veritasium
Рет қаралды 8 МЛН