17

This question is too interesting to resist, so I'll talk about how to analyze the problem. Take a look at sketch above. It describes an arbitrary moment during the rolling. From the kinematics view, $P$ is the "instant center of rotation". From the energy view, the square's center of mass $O$ keeps its height, thus the potential of the square doesn't change,...


16

Here is a very crude first implementation (code at the bottom): (note that the updated version is called as `dragDropList[Dynamic@l) Some notes: The black box serves both as insertion marker and as spacer to move the other items out of the way - obviously, it will need some better styling I'm not sure what the best size for the insertion point is - one ...


10

I once approached this. I never finished it so let me know if you face any issues: ResourceFunction["GitHubInstall"]["kubapod", "mgui"] << MGUI` And here is an example: DynamicModule[{ labels = Range[7] } , labels[[1]] = Style[1, "Section"] ; Grid[{ { "Default", "ContinuousAction", "", "ref"} , { MSorter[Dynamic@labels] , MSorter[...


10

Your curves show a bit strange case when central point keeps the same altitude. However, such situation can be simulated by the following way: R = 1; ϕ = π/4; center = {#, 1} &; crn = {center@# + {-R Cos@(# + ϕ), R Sin@(# + ϕ)}, center@# + {-R Cos@(# + ϕ + π/2), R Sin@(# + ϕ + π/2)}, center@# + {-R Cos@(# + ϕ + π), R Sin@(# + ϕ ...


7

To make it a bit shorter n = 4 (*number of corners*) crn = {Cos[#/n 2 Pi], Sin[#/n 2 Pi]} & /@ Range[n]; cen = {0, 1}; v[t_] = {t, 0};(*linear velocity*) w[t_] = -0.2 t 2 Pi;(*angular velocity*) tmax = 10; dt = 0.1; trj = Table[(cen + v[t] + RotationMatrix[w[t]].#) & /@ crn, {t, 0, tmax, dt}]; ListAnimate[Table[Graphics[{Gray, Polygon[t], Black, ...


5

By the following proof, we can know that the horizontal ordinate of the center of the rectangle is the same as that of the tangent point. (x + (1 - ArcLength[-Cosh[t] + Sqrt[2], {t, 0, x}]) Cos[ ArcTan[D[-(Cosh[x]) + Sqrt[2], x]]] + (x - (1 + ArcLength[-Cosh[t] + Sqrt[2], {t, 0, x}]) Cos[ ArcTan[D[-(Cosh[x]) + Sqrt[2], x]]] - 2*...


3

I'm trying to numerically solve a system of differential equations describing two pendula connected to each other by a spring, and then make an animation of their evolution in time Here is something to get you started. You can do all this in Mathematica directly by solving the equations of motion and then use NDSolve to solve them and then do the ...


3

Silvia already gave a pretty rigorous derivation (compare this with the treatment by Hall and Wagon), so let me show how to plot the desired trajectory of the rolling polygon's corner. One could certainly modify the code I gave here for this, but I will instead adapt this solution I previously wrote in OpenGL to Mathematica: With[{n = 4}, (* number of sides ...


2

You should try to use local variables by wrapping all your code for each animation into a DynamicModule. This evoid multiple asigments to variables you are using. For example, DynamicModule[{here your local variables} . . . asigments . . . Animate[ . . .] ] Well, in fact this approach works enough fine DynamicModule[{mu, cd1, cd2, l, g, eq, sol1, max1, ...


1

This code is written by Shenlan rotationPoint[φ_] := Line[{Cos[#] - φ, Sin[#] + 1} & /@ Range[φ, φ + 2 π, π/2]] f[φ_] := 1 - Sqrt[2]/2 Sec[Mod[Pi/4 - φ, Pi/2, -Pi/4]] Manipulate[ Show[{ Graphics[ {{Red, Circle[{φ, 1}]}, rotationPoint[-φ]}, PlotRange -> {{0, 2 Pi}, {0, 2}}], Plot[f[φ1], {φ1, 0, φ}]}], {φ, 0.001, 2 Pi, 0.1}, ...


1

First of all, your first animation runs fine with or without the second one; however, the second animation is slow even on its own. So this is not a problem of interactions between the two. Something is making the second animation very very slow. I noticed that, if I remove all the formatting options, your animations run just fine. It is my opinion that ...


Only top voted, non community-wiki answers of a minimum length are eligible