Skip, David, et al, [moved to programming]
I am considering simulating this system with the turtle graphics system, tgsjhs.ijs. In tgsjhs, each turtle is controlled by telling how many steps forward it should take and how much it should turn. Typically those two, fd for forward and pt for a pitch turn (which is the kind of turn I imagine in this case), are done one after the other (alternatingly?), producing paths that are not exactly smooth, but may be close enough to smooth with small increments. By the way, both fd and pt can receive positive or negative real numbers. The system retains a history of the moves, and I am assuming that the difference between the recent fd move and the penultimate fd move can be used to produce an estimate of the acceleration of each turtle. Each turtle will have its own yz plane to swing in and the turtles are separated by uniform intervals in the x direction. I am starting the turtles directly below the y axis. So for example if their were 4 turtles their starting positions could be in the following array, where the three columns are x,y, and z, respectively. TPosition _60 _50 0 _20 _60 0 20 _70 0 60 _80 0 I would like some help figuring out how to use the equation given by David. FREQUENCY =: GRAVITY %:@:% LENGTH For starters I have translated it into J as follows, using | to cope with positive and negative values of gravity, which I suspect uses the above mentioned differences between turtle fds, but I may be wrong with that assumption and would like some feedback. freqPend =: *@[*(%:@:%)&| NB. accelPend freqPend lengthPend In the current starting case lengths are 50 60 70 80. and the accelPend would be 20 20 20 20 if each of the pendula were issued the command fd 20. Let's start there. Does that make any sense, or not? Initially the turtles/pendula are set with the following heading vectors, which says they are at a negative 90 degree angle in the z axis, pointing away from the viewer in front of the xy-axes plane. But I imagine, that before a fd command is given for each turtle/pendulum each would be pitched upward slightly once a calculation determines where it should be next based on its position, speed, and acceleration. That calculation escapes me though. THeading 0 0 _90 0 0 _90 0 0 _90 0 0 _90 I am also assuming that arctan of the current y and z position of the turtles can be used to compute their current angle relative to the xy axis plan and their heading angle, ( the 2 of which are paired and 90 different because of their relation relative to their circles circumference?). All ideas would be appreciated, here. On Thu, Apr 24, 2014 at 1:21 PM, David Lambert <[email protected]>wrote: > The frequency of a low amplitude undriven pendulum is the square root of > the acceleration divided by length. > > FREQUENCY =: GRAVITY %:@:% LENGTH > > hence the logarithmic curve drawn by the steel bobs in the movie. > > > Date: Wed, 23 Apr 2014 12:30:55 -0500 >> From: Skip Cave <[email protected]> >> To: Chat forum <[email protected]> >> Subject: [Jchat] Pendulum Waves >> Message-ID: >> <caj8lg_egcbgrftxvm3gz_qbqvfovcbaggzbv40gmdfqkur9...@mail.gmail.com> >> Content-Type: text/plain; charset=ISO-8859-1 >> >> >> Interesting video: http://bit.ly/1rliEz0 >> >> Cool patterns from a very simple process. I'm wondering if it would be >> possible to create this same imagery in a synthetically-generated video >> using J to generate the video frames, similar to how the the "game of >> life" matrix can run through multiple generations in a single sequence... >> >> Skip >> >> >> Skip Cave >> Cave Consulting LLC >> >> > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- (B=) <-----my sig Brian Schott ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
