Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
A 'Big ' Challenge for groups of programmers has been created by Nonki. We are recruiting during August for development in September.
In summary the challenge is to create a marionette puppet in Small Basic, here is an extract of the challenge:
"create a marionette (or puppet) per group which can be moved by user interaction"
If you fancy working on this in a group effort, whatever your programming level, then add a post to the Small Basic Big Challenge Thread. Working in a group can make learning programming more fun.
This blog outlines some ideas for the physics part of the challenge which could be a bit tricky, other aspects of the challenge not addressed here include:
Basically, a marionette will consist of limbs connected together. We can say that each limb will have a certain length (L) and perhaps a mass (M). The limbs could all have equal mass or have a mass dependent on the limb size in some way.
The limbs are connected at joints (or nodes), so each node has one or more limbs connected to it.
The simplest analogy is to think of the limbs as connected springs to help calculate their movements.
Here are some physical principals.
Here is a schematic picture of a node at (X,Y) connected to 3 limbs.
The natural length of the limbs are shown in blue (L1, L2 and L3)
Limbs 1 and 2 are stretched beyond this length by E1 and E2, while limb 3 is compressed by distance C3.
Each force vector can be resolved into X and Y components, and added separately with a contribution to each node from its connected limbs.
Where a and b are scaling factors and Lext is the extended (or compressed) length of a limb. If compression is not used, then only terms where Lext > L are included.
The exact physics isn't that critical, just the basic principals.
The net force vectors (Fx,Fy) for each node are calculated, then used to move the nodes towards stationary (zero net force) positions. We can move the nodes by an amount proportional to the net forces and their directions, then recalculate everything with the updated node positions.
, where c is another scaling factor.
In some cases, stability may be improved by averaging (Fx,Fy) from one step to the next to reduce oscillation about a zero force solution.
If the scheme forces are well scaled, then after a few steps the marionette nodes will be balanced with zero net force, until we move the strings. The top of the strings are fixed positions and are moved only by the user in some way.
Anonymous
August 26, 2014
Wow, thank you, LitDev! Very enlightening!
Anonymous
August 27, 2014
The concept of limb pieces stretching and compressing, while not impossible, is not standard in a marionette. What one will expect to see is a pendulum effect with decay over time as the limbs are pulled into motion by the strings.
Anonymous
August 28, 2014
The comment has been removed
Anonymous
August 20, 2015
I just added rain to litdevs prototype:
smallbasic.com/program
Anonymous
September 23, 2015
Thanks Jibba Jabba!
Anonymous
October 18, 2016
demo.puppets.lifeCheers
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in