POV-Ray : Newsgroups : povray.unofficial.patches : Simulation in MegaPov : Re: Simulation in MegaPov Server Time 6 Jun 2023 22:31:22 EDT (-0400)
 Re: Simulation in MegaPov
 From: Le Forgeron Date: 19 Aug 2011 01:44:43 Message: <4e4df84b\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#4e4df84b%241%40news.povray.org",
"dateCreated": "2011-08-19T05:44:43+00:00",
"datePublished": "2011-08-19T05:44:43+00:00",
"author": {
"@type": "Person",
"name": "Le Forgeron"
}
}
Le 19/08/2011 05:11, H. Karsten a écrit :
> Hi
>
> Does anybody have an idea, how to do a simulation in MegaPov, like this?
>
> 1st gear is fixed
> connection is fixed on one point in movement, not in rotation
> 2nd gear if fixed to another point to the connection in movement, but not in
> rotation
>
> 2nd gear is rotating because of the friction with gear one.
>
> Is this possible in MegaPov?

It is even possible on chalkboard.

The main question for the simulation: do you want iterative steps or
time-based function ?

Iterative steps means storing position and speed of each object
(presently: center of gear 2, rotating speed of gear 2) and using physic
equations (and physical pieces of data, like mass, weight, friction,
cinetic energy... ) to compute the next position and speed (for a small
elapsed time for which you use linear algebra on the acceleration to
Pro: 1. it's easy, once you get the basic equations.
Con: 1. you cannot go to time X without computing (rendering ?) all the
previous steps
2. The actual speed of the simulation is not controled by the clock
value of the command line.

time-based function: same as iterative, but you perform the integration
before hand and get directly the position & speed with time as a parameter.
Pro: 1. You have an accurate simulation, which can be slowed down or
sped up as you want (in number of frame per second)
Con: 1. The integration is not always obvious and sometime it is even
impossible (if you consider a pendulum of 4 or more parts: one central
core with 3 children pendulum of different size & weight, it can turn
2. You often need to push in the solution the initial position &
speed (so as to simplify the equation and being able to integrate),
which means any changes implies you have to start again from the very start.

How to store data from one frame from to another with povray ?

Also, notice: gears are not using friction. Interaction of Ideal gears
in fact would have a resulting strength (for action/reaction) which
would be perpendicular to the line of axis, and no friction would occurs
at the contact of teeth (in ideal gear, the teeth roll on each other,
without slipping)

--
Software is like dirt - it costs time and money to change it and move it
around.

Just because you can't see it, it doesn't weigh anything,
and you can't drill a hole in it and stick a rivet into it doesn't mean
it's free.
```