keppel opened this issue on Mar 23, 2013 · 24 posts
lesbentley posted Sun, 24 March 2013 at 2:21 PM
This rocking chair prop should work for at least P4 and above. There is a dial named "ROCK" to implement the rocking motion, this is just a dial name slapped on to the xRotate channel. Another dial "Ratio_A" lets you set the ratio of zTran to xRotate. The default ratio of 0.444 is probably not correct, but I could not be bothered to get it exactly right.
Here is the relevant coding:
valueParm Ratio_A
{
name Ratio_A
initValue 0.445
hidden 0
enabled 1
forceLimits 0
min -100000
max 100000
trackingScale 0.001
keys
{
static 1
k 0 0.445
}
interpStyleLocked 0
staticValue 0.445
}
valueParm TranMaster
{
name TranMaster
initValue 0
hidden 1
enabled 1
forceLimits 0
min -100000
max 100000
trackingScale 0.1
keys
{
static 0
k 0 0
}
interpStyleLocked 0
valueOpDeltaAdd
NO_FIG
RockingChair
xRotate
deltaAddDelta 0.010000
valueOpTimes
NO_FIG
RockingChair
Ratio_A
}
The two valueParm channels above have been added to the top of the channel stack. The value in the Ratio_A channel, "0.445" in the above example, is to be determined experimentally, or mathamatically based on Pi.
The zTran channel (below) has had slaving code added (showen in green).
translateZ zTran
{
name ztran
initValue 0
hidden 0
enabled 1
forceLimits 0
min -100000
max 100000
trackingScale 0.001
keys
{
static 0
k 0 0
}
interpStyleLocked 0
valueOpDeltaAdd
NO_FIG
RockingChair
TranMaster
deltaAddDelta 1.000000
trackingScaleMult 1.000000
}
The "#" is just to mark interesting places in the file.
In this prop, the origin has been set at the center of the circle formed by the arc of the rails. The motion of the chair is corrected by using zTran. This is probably the simplest way to do the slaving.
I might get round to doing another version with the origin at the bottom of the chair and using yTran to correct the motion.