generalize power start-from-1

starting output is determined by (gain) offset
This commit is contained in:
a1xd 2021-09-18 05:20:53 -04:00
parent 1fd8881608
commit 115030165d
21 changed files with 317 additions and 411 deletions

View file

@ -11,13 +11,13 @@ namespace rawaccel {
struct classic_base {
double base_fn(double x, double accel_raised, const accel_args& args) const
{
return accel_raised * pow(x - args.offset, args.exponent_classic) / x;
return accel_raised * pow(x - args.input_offset, args.exponent_classic) / x;
}
static double base_accel(double x, double y, const accel_args& args)
{
auto power = args.exponent_classic;
return pow(x * y * pow(x - args.offset, -power), 1 / (power - 1));
return pow(x * y * pow(x - args.input_offset, -power), 1 / (power - 1));
}
};
@ -70,7 +70,7 @@ namespace rawaccel {
double operator()(double x, const accel_args& args) const
{
if (x <= args.offset) return 1;
if (x <= args.input_offset) return 1;
return sign * minsd(base_fn(x, accel_raised, args), cap) + 1;
}
@ -96,7 +96,7 @@ namespace rawaccel {
}
{
double a = gain_accel(cap.x, cap.y, args.exponent_classic, args.offset);
double a = gain_accel(cap.x, cap.y, args.exponent_classic, args.input_offset);
accel_raised = pow(a, args.exponent_classic - 1);
}
constant = (base_fn(cap.x, accel_raised, args) - cap.y) * cap.x;
@ -105,7 +105,7 @@ namespace rawaccel {
accel_raised = pow(args.acceleration, args.exponent_classic - 1);
if (args.cap.x > 0) {
cap.x = args.cap.x;
cap.y = gain(cap.x, args.acceleration, args.exponent_classic, args.offset);
cap.y = gain(cap.x, args.acceleration, args.exponent_classic, args.input_offset);
constant = (base_fn(cap.x, accel_raised, args) - cap.y) * cap.x;
}
break;
@ -121,7 +121,7 @@ namespace rawaccel {
sign = -sign;
}
cap.x = gain_inverse(cap.y, args.acceleration, args.exponent_classic, args.offset);
cap.x = gain_inverse(cap.y, args.acceleration, args.exponent_classic, args.input_offset);
constant = (base_fn(cap.x, accel_raised, args) - cap.y) * cap.x;
}
break;
@ -132,7 +132,7 @@ namespace rawaccel {
{
double output;
if (x <= args.offset) return 1;
if (x <= args.input_offset) return 1;
if (x < cap.x) {
output = base_fn(x, accel_raised, args);

View file

@ -11,7 +11,7 @@ namespace rawaccel {
double limit;
natural_base(const accel_args& args) :
offset(args.offset),
offset(args.input_offset),
limit(args.limit - 1)
{
accel = args.decay_rate / fabs(limit);

View file

@ -7,10 +7,66 @@
namespace rawaccel {
struct power_base {
static double base_fn(double x, double scale, const accel_args& args)
vec2d offset;
double scale;
double constant;
power_base(const accel_args& args)
{
// f(x) = w(mx)^k
return pow(scale * x, args.exponent_power);
auto n = args.exponent_power;
if (args.cap_mode != classic_cap_mode::io) {
scale = args.scale;
}
else if (args.gain) {
scale = scale_from_gain_point(args.cap.x, args.cap.y, n);
}
else {
/*
* special case for legacy + io cap mode
*
* offset is ignored because of the circular dependency:
* scale -> constant -> offset
*/
offset = {};
constant = 0;
scale = scale_from_sens_point(args.cap.x, args.cap.y, n, constant);
return;
}
offset.x = gain_inverse(args.output_offset, n, scale);
offset.y = args.output_offset;
constant = offset.x * offset.y * n / (n + 1);
}
double base_fn(double x, const accel_args& args) const
{
if (x <= offset.x) {
return offset.y;
}
else {
return pow(scale * x, args.exponent_power) + constant / x;
}
}
static double gain(double input, double power, double scale)
{
return (power + 1) * pow(input * scale, power);
}
static double gain_inverse(double gain, double power, double scale)
{
return pow(gain / (power + 1), 1 / power) / scale;
}
static double scale_from_gain_point(double input, double gain, double power)
{
return pow(gain / (power + 1), 1 / power) / input;
}
static double scale_from_sens_point(double input, double sens, double power, double C)
{
return pow(sens - C / input, 1 / power) / input;
}
};
@ -19,88 +75,44 @@ namespace rawaccel {
template <>
struct power<LEGACY> : power_base {
double cap = DBL_MAX;
double scale = 0;
power(const accel_args& args)
power(const accel_args& args) :
power_base(args)
{
// Note that cap types may overwrite scale below.
scale = args.scale;
switch (args.cap_mode){
case classic_cap_mode::in:
if (args.cap.x > 0)
{
cap = base_fn(
args.cap.x,
args.scale,
args);
}
break;
case classic_cap_mode::io:
if (args.cap.x > 0 &&
args.cap.y > 1)
{
cap = args.cap.y;
scale = scale_from_sens_point(
args.cap.y,
args.cap.x,
args.exponent_power);
}
cap = args.cap.y;
break;
case classic_cap_mode::in:
if (args.cap.x > 0) cap = base_fn(args.cap.x, args);
break;
case classic_cap_mode::out:
default:
if (args.cap.y > 1)
{
cap = args.cap.y;
}
if (args.cap.y > 0) cap = args.cap.y;
break;
}
/*
if (args.cap.x > 0) {
cap.x = args.cap.x;
cap.y = base_fn(cap.x, args);
}
*/
}
double operator()(double speed, const accel_args& args) const
{
if (args.powerStartFromOne) {
return minsd(maxsd(base_fn(speed, scale, args), 1), cap);
}
else {
return minsd(base_fn(speed, scale, args), cap);
}
return minsd(base_fn(speed, args), cap);
}
double static scale_from_sens_point(double sens, double input, double power)
{
return pow(sens, 1 / power) / input;
}
};
template <>
struct power<GAIN> : power_base {
vec2d cap = { DBL_MAX, DBL_MAX };
double constant = 0;
double scale = 0;
vec2d startFromOne{ 0, 0 };
double constant_b;
power(const accel_args& args)
power(const accel_args& args) :
power_base(args)
{
/*
if (args.cap.x > 0) {
cap.x = args.cap.x;
double output = base_fn(cap.x, args);
cap.y = output * (args.exponent_power + 1);
constant = -args.exponent_power * output * args.cap.x;
}
*/
// Note that cap types may overwrite this below.
scale = args.scale;
switch (args.cap_mode) {
case classic_cap_mode::io:
cap = args.cap;
break;
case classic_cap_mode::in:
if (args.cap.x > 0) {
cap.x = args.cap.x;
@ -110,111 +122,32 @@ namespace rawaccel {
scale);
}
break;
case classic_cap_mode::io:
if (args.cap.x > 0 &&
args.cap.y > 1) {
cap.x = args.cap.x;
cap.y = args.cap.y;
scale = scale_from_gain_point(
args.cap.x,
args.cap.y,
args.exponent_power);
}
break;
case classic_cap_mode::out:
default:
if (args.cap.y > 1) {
cap.y = args.cap.y;
if (args.cap.y > 0) {
cap.x = gain_inverse(
args.cap.y,
args.exponent_power,
scale);
cap.y = args.cap.y;
}
break;
}
if (args.powerStartFromOne)
{
startFromOne.x = gain_inverse(
1,
args.exponent_power,
scale);
startFromOne.y = -1 * integration_constant(startFromOne.x,
1,
base_fn(startFromOne.x, scale, args));
}
if (cap.x < DBL_MAX && cap.y < DBL_MAX)
{
if (args.powerStartFromOne) {
constant = integration_constant(
cap.x,
cap.y,
startFromOneOutput(
startFromOne,
cap.x,
scale,
args));
}
else {
constant = integration_constant(
cap.x,
cap.y,
base_fn(cap.x, scale, args));
}
}
constant_b = integration_constant(cap.x, cap.y, base_fn(cap.x, args));
}
double operator()(double speed, const accel_args& args) const
{
if (speed < cap.x) {
if (args.powerStartFromOne) {
return startFromOneOutput(
startFromOne,
speed,
scale,
args);
}
else {
return base_fn(speed, scale, args);
}
return base_fn(speed, args);
}
else {
return cap.y + constant / speed;
return cap.y + constant_b / speed;
}
}
double static startFromOneOutput(
const vec2d& startFromOne,
double speed,
double scale,
const accel_args& args)
{
if (speed > startFromOne.x) {
return base_fn(speed, scale, args) + startFromOne.y / speed;
}
else
{
return 1;
}
}
double static gain_inverse(double gain, double power, double scale)
{
return pow(gain / (power + 1), 1 / power) / scale;
}
double static gain(double input, double power, double scale)
{
return (power + 1) * pow(input * scale, power);
}
double static scale_from_gain_point(double input, double gain, double power)
{
return pow(gain / (power + 1), 1 / power) / input;
}
double static integration_constant(double input, double gain, double output)
static double integration_constant(double input, double gain, double output)
{
return (output - gain) * input;
}

View file

@ -42,7 +42,8 @@ namespace rawaccel {
accel_mode mode = accel_mode::noaccel;
bool gain = 1;
double offset = 0;
double input_offset = 0;
double output_offset = 0;
double acceleration = 0.005;
double decay_rate = 0.1;
double growth_rate = 1;
@ -53,7 +54,7 @@ namespace rawaccel {
double limit = 1.5;
double midpoint = 5;
double smooth = 0.5;
bool powerStartFromOne = true;
vec2d cap = { 15, 1.5 };
classic_cap_mode cap_mode = classic_cap_mode::out;

View file

@ -50,16 +50,20 @@ namespace rawaccel {
error("data size > max");
}
if (args.offset < 0) {
if (args.input_offset < 0) {
error("offset can not be negative");
}
else if (args.mode == accel_mode::jump && args.offset == 0) {
else if (args.mode == accel_mode::jump && args.input_offset == 0) {
error("offset can not be 0");
}
if (args.output_offset < 0) {
error("offset can not be negative");
}
bool jump_or_io_cap =
(args.mode == accel_mode::jump ||
(args.mode == accel_mode::classic &&
((args.mode == accel_mode::classic || args.mode == accel_mode::power) &&
args.cap_mode == classic_cap_mode::io));
if (args.cap.x < 0) {
@ -76,6 +80,11 @@ namespace rawaccel {
error("cap (output) can not be 0");
}
if (args.cap.x > 0 && args.cap.x < args.input_offset ||
args.cap.y > 0 && args.cap.y < args.output_offset) {
error("cap < offset");
}
if (args.growth_rate <= 0 ||
args.decay_rate <= 0 ||
args.acceleration <= 0) {

View file

@ -71,12 +71,6 @@ namespace grapher
System.Windows.Forms.DataVisualization.Charting.Title title6 = new System.Windows.Forms.DataVisualization.Charting.Title();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RawAcceleration));
this.optionsPanel = new System.Windows.Forms.Panel();
this.powerStartsFromOneBoxY = new System.Windows.Forms.CheckBox();
this.powerStartsFromZeroBoxY = new System.Windows.Forms.CheckBox();
this.powerStartsFromOneBoxX = new System.Windows.Forms.CheckBox();
this.powerStartsFromZeroBoxX = new System.Windows.Forms.CheckBox();
this.powerStartFromLabelY = new System.Windows.Forms.Label();
this.powerStartFromLabelX = new System.Windows.Forms.Label();
this.OutCapActiveYLabelPower = new System.Windows.Forms.Label();
this.InCapActiveYLabelPower = new System.Windows.Forms.Label();
this.OutCapActiveXLabelPower = new System.Windows.Forms.Label();
@ -188,22 +182,26 @@ namespace grapher
this.OptionSetXTitle = new System.Windows.Forms.Label();
this.constantThreeLabelY = new System.Windows.Forms.Label();
this.limitLabelY = new System.Windows.Forms.Label();
this.offsetLabelY = new System.Windows.Forms.Label();
this.inputOffsetLabelY = new System.Windows.Forms.Label();
this.outputOffsetLabelY = new System.Windows.Forms.Label();
this.inCapLabelYClassic = new System.Windows.Forms.Label();
this.constantOneLabelY = new System.Windows.Forms.Label();
this.ByComponentXYLock = new System.Windows.Forms.CheckBox();
this.MidpointActiveYLabel = new System.Windows.Forms.Label();
this.LimitActiveYLabel = new System.Windows.Forms.Label();
this.OffsetActiveYLabel = new System.Windows.Forms.Label();
this.InputOffsetActiveYLabel = new System.Windows.Forms.Label();
this.OutputOffsetActiveYLabel = new System.Windows.Forms.Label();
this.AccelerationActiveLabelY = new System.Windows.Forms.Label();
this.accelTypeDropY = new System.Windows.Forms.ComboBox();
this.midpointBoxY = new System.Windows.Forms.TextBox();
this.limitBoxY = new System.Windows.Forms.TextBox();
this.offsetBoxY = new System.Windows.Forms.TextBox();
this.inputOffsetBoxY = new System.Windows.Forms.TextBox();
this.outputOffsetBoxY = new System.Windows.Forms.TextBox();
this.accelerationBoxY = new System.Windows.Forms.TextBox();
this.MidpointActiveXLabel = new System.Windows.Forms.Label();
this.LimitActiveXLabel = new System.Windows.Forms.Label();
this.OffsetActiveXLabel = new System.Windows.Forms.Label();
this.InputOffsetActiveXLabel = new System.Windows.Forms.Label();
this.OutputOffsetActiveXLabel = new System.Windows.Forms.Label();
this.InCapActiveYLabelClassic = new System.Windows.Forms.Label();
this.InCapActiveXLabelClassic = new System.Windows.Forms.Label();
this.AccelerationActiveLabelX = new System.Windows.Forms.Label();
@ -218,8 +216,10 @@ namespace grapher
this.inCapBoxYClassic = new System.Windows.Forms.TextBox();
this.VertHorzRatioBox = new System.Windows.Forms.TextBox();
this.writeButton = new System.Windows.Forms.Button();
this.offsetLabelX = new System.Windows.Forms.Label();
this.offsetBoxX = new System.Windows.Forms.TextBox();
this.inputOffsetLabelX = new System.Windows.Forms.Label();
this.outputOffsetLabelX = new System.Windows.Forms.Label();
this.inputOffsetBoxX = new System.Windows.Forms.TextBox();
this.outputOffsetBoxX = new System.Windows.Forms.TextBox();
this.constantThreeLabelX = new System.Windows.Forms.Label();
this.midpointBoxX = new System.Windows.Forms.TextBox();
this.limitLabelX = new System.Windows.Forms.Label();
@ -254,8 +254,6 @@ namespace grapher
this.GainChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
this.VelocityChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
this.AccelerationChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
this.powerStartFromActiveLabelX = new System.Windows.Forms.Label();
this.powerStartFromActiveLabelY = new System.Windows.Forms.Label();
this.optionsPanel.SuspendLayout();
this.DirectionalityPanel.SuspendLayout();
this.menuStrip1.SuspendLayout();
@ -271,14 +269,6 @@ namespace grapher
// optionsPanel
//
this.optionsPanel.AutoSize = true;
this.optionsPanel.Controls.Add(this.powerStartFromActiveLabelY);
this.optionsPanel.Controls.Add(this.powerStartFromActiveLabelX);
this.optionsPanel.Controls.Add(this.powerStartsFromOneBoxY);
this.optionsPanel.Controls.Add(this.powerStartsFromZeroBoxY);
this.optionsPanel.Controls.Add(this.powerStartsFromOneBoxX);
this.optionsPanel.Controls.Add(this.powerStartsFromZeroBoxX);
this.optionsPanel.Controls.Add(this.powerStartFromLabelY);
this.optionsPanel.Controls.Add(this.powerStartFromLabelX);
this.optionsPanel.Controls.Add(this.OutCapActiveYLabelPower);
this.optionsPanel.Controls.Add(this.InCapActiveYLabelPower);
this.optionsPanel.Controls.Add(this.OutCapActiveXLabelPower);
@ -371,22 +361,26 @@ namespace grapher
this.optionsPanel.Controls.Add(this.OptionSetXTitle);
this.optionsPanel.Controls.Add(this.constantThreeLabelY);
this.optionsPanel.Controls.Add(this.limitLabelY);
this.optionsPanel.Controls.Add(this.offsetLabelY);
this.optionsPanel.Controls.Add(this.inputOffsetLabelY);
this.optionsPanel.Controls.Add(this.outputOffsetLabelY);
this.optionsPanel.Controls.Add(this.inCapLabelYClassic);
this.optionsPanel.Controls.Add(this.constantOneLabelY);
this.optionsPanel.Controls.Add(this.ByComponentXYLock);
this.optionsPanel.Controls.Add(this.MidpointActiveYLabel);
this.optionsPanel.Controls.Add(this.LimitActiveYLabel);
this.optionsPanel.Controls.Add(this.OffsetActiveYLabel);
this.optionsPanel.Controls.Add(this.InputOffsetActiveYLabel);
this.optionsPanel.Controls.Add(this.OutputOffsetActiveYLabel);
this.optionsPanel.Controls.Add(this.AccelerationActiveLabelY);
this.optionsPanel.Controls.Add(this.accelTypeDropY);
this.optionsPanel.Controls.Add(this.midpointBoxY);
this.optionsPanel.Controls.Add(this.limitBoxY);
this.optionsPanel.Controls.Add(this.offsetBoxY);
this.optionsPanel.Controls.Add(this.inputOffsetBoxY);
this.optionsPanel.Controls.Add(this.outputOffsetBoxY);
this.optionsPanel.Controls.Add(this.accelerationBoxY);
this.optionsPanel.Controls.Add(this.MidpointActiveXLabel);
this.optionsPanel.Controls.Add(this.LimitActiveXLabel);
this.optionsPanel.Controls.Add(this.OffsetActiveXLabel);
this.optionsPanel.Controls.Add(this.InputOffsetActiveXLabel);
this.optionsPanel.Controls.Add(this.OutputOffsetActiveXLabel);
this.optionsPanel.Controls.Add(this.InCapActiveYLabelClassic);
this.optionsPanel.Controls.Add(this.InCapActiveXLabelClassic);
this.optionsPanel.Controls.Add(this.AccelerationActiveLabelX);
@ -401,8 +395,10 @@ namespace grapher
this.optionsPanel.Controls.Add(this.inCapBoxYClassic);
this.optionsPanel.Controls.Add(this.VertHorzRatioBox);
this.optionsPanel.Controls.Add(this.writeButton);
this.optionsPanel.Controls.Add(this.offsetLabelX);
this.optionsPanel.Controls.Add(this.offsetBoxX);
this.optionsPanel.Controls.Add(this.inputOffsetLabelX);
this.optionsPanel.Controls.Add(this.outputOffsetLabelX);
this.optionsPanel.Controls.Add(this.inputOffsetBoxX);
this.optionsPanel.Controls.Add(this.outputOffsetBoxX);
this.optionsPanel.Controls.Add(this.constantThreeLabelX);
this.optionsPanel.Controls.Add(this.midpointBoxX);
this.optionsPanel.Controls.Add(this.limitLabelX);
@ -423,59 +419,7 @@ namespace grapher
this.optionsPanel.Name = "optionsPanel";
this.optionsPanel.Size = new System.Drawing.Size(483, 956);
this.optionsPanel.TabIndex = 34;
//
// powerStartsFromOneBoxY
//
this.powerStartsFromOneBoxY.Location = new System.Drawing.Point(363, 220);
this.powerStartsFromOneBoxY.Name = "powerStartsFromOneBoxY";
this.powerStartsFromOneBoxY.Size = new System.Drawing.Size(32, 17);
this.powerStartsFromOneBoxY.TabIndex = 0;
this.powerStartsFromOneBoxY.Text = "1";
this.powerStartsFromOneBoxY.UseVisualStyleBackColor = true;
//
// powerStartsFromZeroBoxY
//
this.powerStartsFromZeroBoxY.Location = new System.Drawing.Point(332, 220);
this.powerStartsFromZeroBoxY.Name = "powerStartsFromZeroBoxY";
this.powerStartsFromZeroBoxY.Size = new System.Drawing.Size(32, 17);
this.powerStartsFromZeroBoxY.TabIndex = 0;
this.powerStartsFromZeroBoxY.Text = "0";
this.powerStartsFromZeroBoxY.UseVisualStyleBackColor = true;
//
// powerStartsFromOneBoxX
//
this.powerStartsFromOneBoxX.Location = new System.Drawing.Point(136, 220);
this.powerStartsFromOneBoxX.Name = "powerStartsFromOneBoxX";
this.powerStartsFromOneBoxX.Size = new System.Drawing.Size(32, 17);
this.powerStartsFromOneBoxX.TabIndex = 0;
this.powerStartsFromOneBoxX.Text = "1";
this.powerStartsFromOneBoxX.UseVisualStyleBackColor = true;
//
// powerStartsFromZeroBoxX
//
this.powerStartsFromZeroBoxX.Location = new System.Drawing.Point(106, 220);
this.powerStartsFromZeroBoxX.Name = "powerStartsFromZeroBoxX";
this.powerStartsFromZeroBoxX.Size = new System.Drawing.Size(32, 17);
this.powerStartsFromZeroBoxX.TabIndex = 0;
this.powerStartsFromZeroBoxX.Text = "0";
this.powerStartsFromZeroBoxX.UseVisualStyleBackColor = true;
//
// powerStartFromLabelY
//
this.powerStartFromLabelY.Location = new System.Drawing.Point(266, 220);
this.powerStartFromLabelY.Name = "powerStartFromLabelY";
this.powerStartFromLabelY.Size = new System.Drawing.Size(52, 13);
this.powerStartFromLabelY.TabIndex = 0;
this.powerStartFromLabelY.Text = "Start from";
//
// powerStartFromLabelX
//
this.powerStartFromLabelX.Location = new System.Drawing.Point(38, 220);
this.powerStartFromLabelX.Name = "powerStartFromLabelX";
this.powerStartFromLabelX.Size = new System.Drawing.Size(55, 13);
this.powerStartFromLabelX.TabIndex = 0;
this.powerStartFromLabelX.Text = "Start from";
//
//
// OutCapActiveYLabelPower
//
this.OutCapActiveYLabelPower.AutoSize = true;
@ -1452,12 +1396,19 @@ namespace grapher
//
// offsetLabelY
//
this.offsetLabelY.AutoSize = true;
this.offsetLabelY.Location = new System.Drawing.Point(263, 248);
this.offsetLabelY.Name = "offsetLabelY";
this.offsetLabelY.Size = new System.Drawing.Size(35, 13);
this.offsetLabelY.TabIndex = 135;
this.offsetLabelY.Text = "Offset";
this.inputOffsetLabelY.AutoSize = true;
this.inputOffsetLabelY.Location = new System.Drawing.Point(263, 248);
this.inputOffsetLabelY.Name = "inputOffsetLabelY";
this.inputOffsetLabelY.Size = new System.Drawing.Size(35, 13);
this.inputOffsetLabelY.TabIndex = 135;
this.inputOffsetLabelY.Text = "Input Offset";
this.outputOffsetLabelY.AutoSize = true;
this.outputOffsetLabelY.Location = new System.Drawing.Point(263, 248);
this.outputOffsetLabelY.Name = "outputOffsetLabelY";
this.outputOffsetLabelY.Size = new System.Drawing.Size(35, 13);
this.outputOffsetLabelY.TabIndex = 135;
this.outputOffsetLabelY.Text = "Output Offset";
//
// inCapLabelYClassic
//
@ -1508,12 +1459,19 @@ namespace grapher
//
// OffsetActiveYLabel
//
this.OffsetActiveYLabel.AutoSize = true;
this.OffsetActiveYLabel.Location = new System.Drawing.Point(414, 248);
this.OffsetActiveYLabel.Name = "OffsetActiveYLabel";
this.OffsetActiveYLabel.Size = new System.Drawing.Size(13, 13);
this.OffsetActiveYLabel.TabIndex = 129;
this.OffsetActiveYLabel.Text = "0";
this.InputOffsetActiveYLabel.AutoSize = true;
this.InputOffsetActiveYLabel.Location = new System.Drawing.Point(414, 248);
this.InputOffsetActiveYLabel.Name = "InputOffsetActiveYLabel";
this.InputOffsetActiveYLabel.Size = new System.Drawing.Size(13, 13);
this.InputOffsetActiveYLabel.TabIndex = 129;
this.InputOffsetActiveYLabel.Text = "0";
this.OutputOffsetActiveYLabel.AutoSize = true;
this.OutputOffsetActiveYLabel.Location = new System.Drawing.Point(414, 248);
this.OutputOffsetActiveYLabel.Name = "OutputOffsetActiveYLabel";
this.OutputOffsetActiveYLabel.Size = new System.Drawing.Size(13, 13);
this.OutputOffsetActiveYLabel.TabIndex = 129;
this.OutputOffsetActiveYLabel.Text = "0";
//
// AccelerationActiveLabelY
//
@ -1549,10 +1507,15 @@ namespace grapher
//
// offsetBoxY
//
this.offsetBoxY.Location = new System.Drawing.Point(332, 245);
this.offsetBoxY.Name = "offsetBoxY";
this.offsetBoxY.Size = new System.Drawing.Size(76, 20);
this.offsetBoxY.TabIndex = 106;
this.inputOffsetBoxY.Location = new System.Drawing.Point(332, 245);
this.inputOffsetBoxY.Name = "inputOffsetBoxY";
this.inputOffsetBoxY.Size = new System.Drawing.Size(76, 20);
this.inputOffsetBoxY.TabIndex = 106;
this.outputOffsetBoxY.Location = new System.Drawing.Point(332, 245);
this.outputOffsetBoxY.Name = "outputOffsetBoxY";
this.outputOffsetBoxY.Size = new System.Drawing.Size(76, 20);
this.outputOffsetBoxY.TabIndex = 106;
//
// accelerationBoxY
//
@ -1581,12 +1544,19 @@ namespace grapher
//
// OffsetActiveXLabel
//
this.OffsetActiveXLabel.AutoSize = true;
this.OffsetActiveXLabel.Location = new System.Drawing.Point(197, 248);
this.OffsetActiveXLabel.Name = "OffsetActiveXLabel";
this.OffsetActiveXLabel.Size = new System.Drawing.Size(13, 13);
this.OffsetActiveXLabel.TabIndex = 125;
this.OffsetActiveXLabel.Text = "0";
this.InputOffsetActiveXLabel.AutoSize = true;
this.InputOffsetActiveXLabel.Location = new System.Drawing.Point(197, 248);
this.InputOffsetActiveXLabel.Name = "InputOffsetActiveXLabel";
this.InputOffsetActiveXLabel.Size = new System.Drawing.Size(13, 13);
this.InputOffsetActiveXLabel.TabIndex = 125;
this.InputOffsetActiveXLabel.Text = "0";
this.OutputOffsetActiveXLabel.AutoSize = true;
this.OutputOffsetActiveXLabel.Location = new System.Drawing.Point(197, 248);
this.OutputOffsetActiveXLabel.Name = "OutputOffsetActiveXLabel";
this.OutputOffsetActiveXLabel.Size = new System.Drawing.Size(13, 13);
this.OutputOffsetActiveXLabel.TabIndex = 125;
this.OutputOffsetActiveXLabel.Text = "0";
//
// InCapActiveYLabelClassic
//
@ -1715,20 +1685,33 @@ namespace grapher
//
// offsetLabelX
//
this.offsetLabelX.AutoSize = true;
this.offsetLabelX.Location = new System.Drawing.Point(37, 248);
this.offsetLabelX.Name = "offsetLabelX";
this.offsetLabelX.Size = new System.Drawing.Size(35, 13);
this.offsetLabelX.TabIndex = 107;
this.offsetLabelX.Text = "Offset";
this.offsetLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.inputOffsetLabelX.AutoSize = true;
this.inputOffsetLabelX.Location = new System.Drawing.Point(37, 248);
this.inputOffsetLabelX.Name = "inputOffsetLabelX";
this.inputOffsetLabelX.Size = new System.Drawing.Size(35, 13);
this.inputOffsetLabelX.TabIndex = 107;
this.inputOffsetLabelX.Text = "Input Offset";
this.inputOffsetLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.outputOffsetLabelX.AutoSize = true;
this.outputOffsetLabelX.Location = new System.Drawing.Point(37, 248);
this.outputOffsetLabelX.Name = "outputOffsetLabelX";
this.outputOffsetLabelX.Size = new System.Drawing.Size(35, 13);
this.outputOffsetLabelX.TabIndex = 107;
this.outputOffsetLabelX.Text = "Output Offset";
this.outputOffsetLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// offsetBoxX
//
this.offsetBoxX.Location = new System.Drawing.Point(106, 245);
this.offsetBoxX.Name = "offsetBoxX";
this.offsetBoxX.Size = new System.Drawing.Size(76, 20);
this.offsetBoxX.TabIndex = 92;
this.inputOffsetBoxX.Location = new System.Drawing.Point(106, 245);
this.inputOffsetBoxX.Name = "inputOffsetBoxX";
this.inputOffsetBoxX.Size = new System.Drawing.Size(76, 20);
this.inputOffsetBoxX.TabIndex = 92;
this.outputOffsetBoxX.Location = new System.Drawing.Point(106, 245);
this.outputOffsetBoxX.Name = "outputOffsetBoxX";
this.outputOffsetBoxX.Size = new System.Drawing.Size(76, 20);
this.outputOffsetBoxX.TabIndex = 92;
//
// constantThreeLabelX
//
@ -2206,24 +2189,6 @@ namespace grapher
title6.Text = "Sensitivity";
this.AccelerationChart.Titles.Add(title6);
//
// powerStartFromActiveLabelX
//
this.powerStartFromActiveLabelX.AutoSize = true;
this.powerStartFromActiveLabelX.Location = new System.Drawing.Point(197, 220);
this.powerStartFromActiveLabelX.Name = "powerStartFromActiveLabelX";
this.powerStartFromActiveLabelX.Size = new System.Drawing.Size(13, 13);
this.powerStartFromActiveLabelX.TabIndex = 225;
this.powerStartFromActiveLabelX.Text = "0";
//
// powerStartFromActiveLabelY
//
this.powerStartFromActiveLabelY.AutoSize = true;
this.powerStartFromActiveLabelY.Location = new System.Drawing.Point(414, 221);
this.powerStartFromActiveLabelY.Name = "powerStartFromActiveLabelY";
this.powerStartFromActiveLabelY.Size = new System.Drawing.Size(13, 13);
this.powerStartFromActiveLabelY.TabIndex = 226;
this.powerStartFromActiveLabelY.Text = "0";
//
// RawAcceleration
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -2273,22 +2238,26 @@ namespace grapher
private System.Windows.Forms.Label OptionSetXTitle;
private System.Windows.Forms.Label constantThreeLabelY;
private System.Windows.Forms.Label limitLabelY;
private System.Windows.Forms.Label offsetLabelY;
private System.Windows.Forms.Label inputOffsetLabelY;
private System.Windows.Forms.Label outputOffsetLabelY;
private System.Windows.Forms.Label inCapLabelYClassic;
private System.Windows.Forms.Label constantOneLabelY;
private System.Windows.Forms.CheckBox ByComponentXYLock;
private System.Windows.Forms.Label MidpointActiveYLabel;
private System.Windows.Forms.Label LimitActiveYLabel;
private System.Windows.Forms.Label OffsetActiveYLabel;
private System.Windows.Forms.Label InputOffsetActiveYLabel;
private System.Windows.Forms.Label OutputOffsetActiveYLabel;
private System.Windows.Forms.Label AccelerationActiveLabelY;
private System.Windows.Forms.ComboBox accelTypeDropY;
private System.Windows.Forms.TextBox midpointBoxY;
private System.Windows.Forms.TextBox limitBoxY;
private System.Windows.Forms.TextBox offsetBoxY;
private System.Windows.Forms.TextBox inputOffsetBoxY;
private System.Windows.Forms.TextBox outputOffsetBoxY;
private System.Windows.Forms.TextBox accelerationBoxY;
private System.Windows.Forms.Label MidpointActiveXLabel;
private System.Windows.Forms.Label LimitActiveXLabel;
private System.Windows.Forms.Label OffsetActiveXLabel;
private System.Windows.Forms.Label InputOffsetActiveXLabel;
private System.Windows.Forms.Label OutputOffsetActiveXLabel;
private System.Windows.Forms.Label InCapActiveYLabelClassic;
private System.Windows.Forms.Label InCapActiveXLabelClassic;
private System.Windows.Forms.Label AccelerationActiveLabelX;
@ -2303,8 +2272,10 @@ namespace grapher
private System.Windows.Forms.TextBox inCapBoxYClassic;
private System.Windows.Forms.TextBox VertHorzRatioBox;
private System.Windows.Forms.Button writeButton;
private System.Windows.Forms.Label offsetLabelX;
private System.Windows.Forms.TextBox offsetBoxX;
private System.Windows.Forms.Label inputOffsetLabelX;
private System.Windows.Forms.Label outputOffsetLabelX;
private System.Windows.Forms.TextBox inputOffsetBoxX;
private System.Windows.Forms.TextBox outputOffsetBoxX;
private System.Windows.Forms.Label constantThreeLabelX;
private System.Windows.Forms.TextBox midpointBoxX;
private System.Windows.Forms.Label limitLabelX;
@ -2431,14 +2402,6 @@ namespace grapher
private System.Windows.Forms.TextBox outCapBoxXPower;
private System.Windows.Forms.TextBox inCapBoxYPower;
private System.Windows.Forms.TextBox inCapBoxXPower;
private System.Windows.Forms.CheckBox powerStartsFromOneBoxY;
private System.Windows.Forms.CheckBox powerStartsFromZeroBoxY;
private System.Windows.Forms.CheckBox powerStartsFromOneBoxX;
private System.Windows.Forms.CheckBox powerStartsFromZeroBoxX;
private System.Windows.Forms.Label powerStartFromLabelY;
private System.Windows.Forms.Label powerStartFromLabelX;
private System.Windows.Forms.Label powerStartFromActiveLabelX;
private System.Windows.Forms.Label powerStartFromActiveLabelY;
}
}

View file

@ -82,8 +82,10 @@ namespace grapher
inCapBoxYPower,
outCapBoxXPower,
outCapBoxYPower,
offsetBoxX,
offsetBoxY,
inputOffsetBoxX,
inputOffsetBoxY,
outputOffsetBoxX,
outputOffsetBoxY,
accelerationBoxX,
accelerationBoxY,
decayRateBoxX,
@ -114,10 +116,6 @@ namespace grapher
ByComponentCheckBox,
gainSwitchX,
gainSwitchY,
powerStartsFromZeroBoxX,
powerStartsFromOneBoxX,
powerStartsFromZeroBoxY,
powerStartsFromOneBoxY,
XLutActiveValuesBox,
YLutActiveValuesBox,
XLutPointsBox,
@ -138,8 +136,10 @@ namespace grapher
outCapLabelYPower,
CapTypeLabelXPower,
CapTypeLabelYPower,
offsetLabelX,
offsetLabelY,
inputOffsetLabelX,
inputOffsetLabelY,
outputOffsetLabelX,
outputOffsetLabelY,
constantOneLabelX,
constantOneLabelY,
decayRateLabelX,
@ -156,8 +156,6 @@ namespace grapher
powerLabelY,
expLabelX,
expLabelY,
powerStartFromLabelX,
powerStartFromLabelY,
LUTTextLabelX,
LUTTextLabelY,
constantThreeLabelX,
@ -179,8 +177,10 @@ namespace grapher
OutCapActiveYLabelPower,
CapTypeActiveXLabelPower,
CapTypeActiveYLabelPower,
OffsetActiveXLabel,
OffsetActiveYLabel,
InputOffsetActiveXLabel,
InputOffsetActiveYLabel,
OutputOffsetActiveXLabel,
OutputOffsetActiveYLabel,
AccelerationActiveLabelX,
AccelerationActiveLabelY,
DecayRateActiveXLabel,
@ -197,8 +197,6 @@ namespace grapher
PowerClassicActiveYLabel,
ExpActiveXLabel,
ExpActiveYLabel,
powerStartFromActiveLabelX,
powerStartFromActiveLabelY,
MidpointActiveXLabel,
MidpointActiveYLabel,
AccelTypeActiveLabelX,

View file

@ -16,11 +16,11 @@ namespace grapher.Layouts
DecayRateLayout = new OptionLayout(false, string.Empty);
GrowthRateLayout = new OptionLayout(false, string.Empty);
SmoothLayout = new OptionLayout(false, string.Empty);
OffsetLayout = new OptionLayout(true, Offset);
InputOffsetLayout = new OptionLayout(true, InputOffset);
LimitLayout = new OptionLayout(false, string.Empty);
PowerClassicLayout = new OptionLayout(true, PowerClassic);
ExponentLayout = new OptionLayout(false, string.Empty);
PowerStartsFromLayout = new OptionLayout(false, string.Empty);
OutputOffsetLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(false, string.Empty);
LutTextLayout = new OptionLayout(false, string.Empty);
LutPanelLayout = new OptionLayout(false, string.Empty);

View file

@ -17,11 +17,11 @@ namespace grapher.Layouts
DecayRateLayout = new OptionLayout(true, DecayRate);
GrowthRateLayout = new OptionLayout(true, GrowthRate);
SmoothLayout = new OptionLayout(true, Smooth);
OffsetLayout = new OptionLayout(true, Offset);
InputOffsetLayout = new OptionLayout(true, InputOffset);
LimitLayout = new OptionLayout(true, Limit);
PowerClassicLayout = new OptionLayout(true, PowerClassic);
ExponentLayout = new OptionLayout(true, Exponent);
PowerStartsFromLayout = new OptionLayout(false, string.Empty);
OutputOffsetLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(true, Midpoint);
LutTextLayout = new OptionLayout(false, string.Empty);
LutPanelLayout = new OptionLayout(false, string.Empty);

View file

@ -17,11 +17,11 @@ namespace grapher.Layouts
DecayRateLayout = new OptionLayout(false, string.Empty);
GrowthRateLayout = new OptionLayout(false, string.Empty);
SmoothLayout = new OptionLayout(true, Smooth);
OffsetLayout = new OptionLayout(true, Offset);
InputOffsetLayout = new OptionLayout(true, InputOffset);
LimitLayout = new OptionLayout(false, Limit);
PowerClassicLayout = new OptionLayout(false, string.Empty);
ExponentLayout = new OptionLayout(false, string.Empty);
PowerStartsFromLayout = new OptionLayout(false, string.Empty);
OutputOffsetLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(false, string.Empty);
LutTextLayout = new OptionLayout(false, string.Empty);
LutPanelLayout = new OptionLayout(false, string.Empty);

View file

@ -25,10 +25,10 @@ namespace grapher.Layouts
DecayRateLayout = new OptionLayout(false, string.Empty);
GrowthRateLayout = new OptionLayout(false, string.Empty);
SmoothLayout = new OptionLayout(false, string.Empty);
OffsetLayout = new OptionLayout(false, Offset);
InputOffsetLayout = new OptionLayout(false, string.Empty);
LimitLayout = new OptionLayout(false, string.Empty);
PowerClassicLayout = new OptionLayout(false, string.Empty);
PowerStartsFromLayout = new OptionLayout(false, string.Empty);
OutputOffsetLayout = new OptionLayout(false, string.Empty);
ExponentLayout = new OptionLayout(false, Exponent);
MidpointLayout = new OptionLayout(false, string.Empty);
LutTextLayout = new OptionLayout(true, string.Empty);

View file

@ -9,12 +9,12 @@ namespace grapher.Layouts
public const string DecayRate = "Decay Rate";
public const string Scale = "Scale";
public const string Exponent = "Exponent";
public const string StartsFrom = "Start from";
public const string OutputOffset = "Output Offset";
public const string PowerClassic = "Power";
public const string Limit = "Limit";
public const string Midpoint = "Midpoint";
public const string Motivity = "Motivity";
public const string Offset = "Offset";
public const string InputOffset = "Input Offset";
public const string CapType = "Cap Type";
public const string Weight = "Weight";
public const string Smooth = "Smooth";
@ -27,11 +27,11 @@ namespace grapher.Layouts
SmoothLayout = new OptionLayout(false, string.Empty);
ClassicCapLayout = new OptionLayout(false, string.Empty);
PowerCapLayout = new OptionLayout(false, string.Empty);
OffsetLayout = new OptionLayout(false, string.Empty);
InputOffsetLayout = new OptionLayout(false, string.Empty);
LimitLayout = new OptionLayout(false, string.Empty);
PowerClassicLayout = new OptionLayout(false, string.Empty);
ExponentLayout = new OptionLayout(false, string.Empty);
PowerStartsFromLayout = new OptionLayout(false, string.Empty);
OutputOffsetLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(false, string.Empty);
LutTextLayout = new OptionLayout(false, string.Empty);
LutPanelLayout = new OptionLayout(false, string.Empty);
@ -59,7 +59,7 @@ namespace grapher.Layouts
protected OptionLayout PowerCapLayout { get; set; }
protected OptionLayout OffsetLayout { get; set; }
protected OptionLayout InputOffsetLayout { get; set; }
protected OptionLayout LimitLayout { get; set; }
@ -67,7 +67,7 @@ namespace grapher.Layouts
protected OptionLayout ExponentLayout { get; set; }
protected OptionLayout PowerStartsFromLayout { get; set; }
protected OptionLayout OutputOffsetLayout { get; set; }
protected OptionLayout MidpointLayout { get; set; }
@ -91,11 +91,11 @@ namespace grapher.Layouts
IOption decayRateOption,
IOption growthRateOption,
IOption smoothOption,
IOption offsetOption,
IOption inputOffsetOption,
IOption limitOption,
IOption powerClassicOption,
IOption expOption,
IOption startsFromOption,
IOption outputOffsetOption,
IOption midpointOption,
IOption lutTextOption,
IOption lutPanelOption,
@ -112,11 +112,11 @@ namespace grapher.Layouts
(DecayRateLayout, decayRateOption),
(GrowthRateLayout, growthRateOption),
(SmoothLayout, smoothOption),
(OffsetLayout, offsetOption),
(InputOffsetLayout, inputOffsetOption),
(LimitLayout, limitOption),
(PowerClassicLayout, powerClassicOption),
(ExponentLayout, expOption),
(PowerStartsFromLayout, startsFromOption),
(OutputOffsetLayout, outputOffsetOption),
(MidpointLayout, midpointOption),
(LutTextLayout, lutTextOption),
(LutPanelLayout, lutPanelOption),
@ -147,11 +147,11 @@ namespace grapher.Layouts
IOption decayRateOption,
IOption growthRateOption,
IOption smoothOption,
IOption offsetOption,
IOption inputOffsetOption,
IOption limitOption,
IOption powerClassicOption,
IOption expOption,
IOption startsFromOption,
IOption outputOffsetOption,
IOption midpointOption,
IOption lutTextOption,
IOption lutPanelOption,
@ -163,11 +163,11 @@ namespace grapher.Layouts
decayRateOption,
growthRateOption,
smoothOption,
offsetOption,
inputOffsetOption,
limitOption,
powerClassicOption,
expOption,
startsFromOption,
outputOffsetOption,
midpointOption,
lutTextOption,
lutPanelOption,

View file

@ -18,10 +18,10 @@ namespace grapher.Layouts
DecayRateLayout = new OptionLayout(false, string.Empty);
GrowthRateLayout = new OptionLayout(false, string.Empty);
SmoothLayout = new OptionLayout(false, string.Empty);
OffsetLayout = new OptionLayout(true, Offset);
InputOffsetLayout = new OptionLayout(true, InputOffset);
LimitLayout = new OptionLayout(false, string.Empty);
PowerClassicLayout = new OptionLayout(false, string.Empty);
PowerStartsFromLayout = new OptionLayout(false, string.Empty);
OutputOffsetLayout = new OptionLayout(false, string.Empty);
ExponentLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(false, string.Empty);
LutTextLayout = new OptionLayout(false, string.Empty);

View file

@ -22,11 +22,11 @@ namespace grapher.Layouts
DecayRateLayout = new OptionLayout(false, string.Empty);
GrowthRateLayout = new OptionLayout(true, GrowthRate);
SmoothLayout = new OptionLayout(false, string.Empty);
OffsetLayout = new OptionLayout(false, string.Empty);
InputOffsetLayout = new OptionLayout(false, string.Empty);
LimitLayout = new OptionLayout(true, Motivity);
PowerClassicLayout = new OptionLayout(false, string.Empty);
ExponentLayout = new OptionLayout(false, string.Empty);
PowerStartsFromLayout = new OptionLayout(false, string.Empty);
OutputOffsetLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(true, Midpoint);
LutTextLayout = new OptionLayout(false, string.Empty);
LutPanelLayout = new OptionLayout(false, string.Empty);

View file

@ -17,11 +17,11 @@ namespace grapher.Layouts
DecayRateLayout = new OptionLayout(true, DecayRate);
GrowthRateLayout = new OptionLayout(false, string.Empty);
SmoothLayout = new OptionLayout(false, string.Empty);
OffsetLayout = new OptionLayout(true, Offset);
InputOffsetLayout = new OptionLayout(true, InputOffset);
LimitLayout = new OptionLayout(true, Limit);
PowerClassicLayout = new OptionLayout(false, string.Empty);
ExponentLayout = new OptionLayout(false, string.Empty);
PowerStartsFromLayout = new OptionLayout(false, string.Empty);
OutputOffsetLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(false, string.Empty);
LutTextLayout = new OptionLayout(false, string.Empty);
LutPanelLayout = new OptionLayout(false, string.Empty);

View file

@ -17,11 +17,11 @@ namespace grapher.Layouts
DecayRateLayout = new OptionLayout(false, string.Empty);
GrowthRateLayout = new OptionLayout(false, string.Empty);
SmoothLayout = new OptionLayout(false, string.Empty);
OffsetLayout = new OptionLayout(false, string.Empty);
InputOffsetLayout = new OptionLayout(false, string.Empty);
LimitLayout = new OptionLayout(false, string.Empty);
PowerClassicLayout = new OptionLayout(false, string.Empty);
ExponentLayout = new OptionLayout(false, string.Empty);
PowerStartsFromLayout = new OptionLayout(false, string.Empty);
OutputOffsetLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(false, string.Empty);
LutTextLayout = new OptionLayout(false, string.Empty);
LutPanelLayout = new OptionLayout(false, string.Empty);

View file

@ -15,11 +15,11 @@
DecayRateLayout = new OptionLayout(false, string.Empty);
GrowthRateLayout = new OptionLayout(false, string.Empty);
SmoothLayout = new OptionLayout(false, string.Empty);
OffsetLayout = new OptionLayout(false, string.Empty);
InputOffsetLayout = new OptionLayout(false, string.Empty);
LimitLayout = new OptionLayout(false, string.Empty);
PowerClassicLayout = new OptionLayout(false, string.Empty);
ExponentLayout = new OptionLayout(true, Exponent);
PowerStartsFromLayout = new OptionLayout(true, StartsFrom);
OutputOffsetLayout = new OptionLayout(true, OutputOffset);
MidpointLayout = new OptionLayout(false, string.Empty);
LutTextLayout = new OptionLayout(false, string.Empty);
LutPanelLayout = new OptionLayout(false, string.Empty);

View file

@ -22,11 +22,11 @@ namespace grapher.Layouts
DecayRateLayout = new OptionLayout(false, string.Empty);
GrowthRateLayout = new OptionLayout(false, string.Empty);
SmoothLayout = new OptionLayout(false, string.Empty);
OffsetLayout = new OptionLayout(false, Offset);
InputOffsetLayout = new OptionLayout(false, string.Empty);
LimitLayout = new OptionLayout(false, string.Empty);
PowerClassicLayout = new OptionLayout(false, string.Empty);
ExponentLayout = new OptionLayout(false, Exponent);
PowerStartsFromLayout = new OptionLayout(false, string.Empty);
OutputOffsetLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(false, string.Empty);
LutTextLayout = new OptionLayout(true, LUTLayoutText);
LutPanelLayout = new OptionLayout(false, string.Empty);

View file

@ -54,8 +54,10 @@ namespace grapher.Models
TextBox inCapBoxYPower,
TextBox outCapBoxXPower,
TextBox outCapBoxYPower,
TextBox offsetBoxX,
TextBox offsetBoxY,
TextBox inputOffsetBoxX,
TextBox inputOffsetBoxY,
TextBox outputOffsetBoxX,
TextBox outputOffsetBoxY,
TextBox accelerationBoxX,
TextBox accelerationBoxY,
TextBox decayRateBoxX,
@ -86,10 +88,6 @@ namespace grapher.Models
CheckBox byComponentCheckBox,
CheckBox gainSwitchX,
CheckBox gainSwitchY,
CheckBox powerStartsFromZeroBoxX,
CheckBox powerStartsFromOneBoxX,
CheckBox powerStartsFromZeroBoxY,
CheckBox powerStartsFromOneBoxY,
RichTextBox xLutActiveValuesBox,
RichTextBox yLutActiveValuesBox,
RichTextBox xLutPointsBox,
@ -110,8 +108,10 @@ namespace grapher.Models
Label outCapLabelYPower,
Label capTypeLabelXPower,
Label capTypeLabelYPower,
Label offsetLabelX,
Label offsetLabelY,
Label inputOffsetLabelX,
Label inputOffsetLabelY,
Label outputOffsetLabelX,
Label outputOffsetLabelY,
Label constantOneLabelX,
Label constantOneLabelY,
Label decayRateLabelX,
@ -128,8 +128,6 @@ namespace grapher.Models
Label powerClassicLabelY,
Label expLabelX,
Label expLabelY,
Label powerStartsFromLabelX,
Label powerStartsFromLabelY,
Label lutTextLabelX,
Label lutTextLabelY,
Label constantThreeLabelX,
@ -151,8 +149,10 @@ namespace grapher.Models
Label outCapActiveYLabelPower,
Label capTypeActiveXLabelPower,
Label capTypeActiveYLabelPower,
Label offsetActiveLabelX,
Label offsetActiveLabelY,
Label inputOffsetActiveLabelX,
Label inputOffsetActiveLabelY,
Label outputOffsetActiveLabelX,
Label outputOffsetActiveLabelY,
Label accelerationActiveLabelX,
Label accelerationActiveLabelY,
Label decayRateActiveLabelX,
@ -169,8 +169,6 @@ namespace grapher.Models
Label powerClassicActiveLabelY,
Label expActiveLabelX,
Label expActiveLabelY,
Label powerStartsFromActiveLabelX,
Label powerStartsFromActiveLabelY,
Label midpointActiveLabelX,
Label midpointActiveLabelY,
Label accelTypeActiveLabelX,
@ -249,22 +247,40 @@ namespace grapher.Models
var directionalityLeft = directionalityPanel.Left;
var offsetX = new Option(
offsetBoxX,
var inputOffsetX = new Option(
inputOffsetBoxX,
form,
0,
offsetLabelX,
inputOffsetLabelX,
0,
new ActiveValueLabel(offsetActiveLabelX, activeValueTitleX),
new ActiveValueLabel(inputOffsetActiveLabelX, activeValueTitleX),
"Offset");
var offsetY = new Option(
offsetBoxY,
var inputOffsetY = new Option(
inputOffsetBoxY,
form,
0,
offsetLabelY,
inputOffsetLabelY,
optionSetYLeft,
new ActiveValueLabel(offsetActiveLabelY, activeValueTitleY),
new ActiveValueLabel(inputOffsetActiveLabelY, activeValueTitleY),
"Offset");
var outputOffsetX = new Option(
outputOffsetBoxX,
form,
0,
outputOffsetLabelX,
0,
new ActiveValueLabel(outputOffsetActiveLabelX, activeValueTitleX),
"Offset");
var outputOffsetY = new Option(
outputOffsetBoxY,
form,
0,
outputOffsetLabelY,
optionSetYLeft,
new ActiveValueLabel(outputOffsetActiveLabelY, activeValueTitleY),
"Offset");
var accelerationX = new Option(
@ -495,20 +511,6 @@ namespace grapher.Models
outCapYPower,
scaleY);
var powerStartsFromX = new SwitchOption(
powerStartsFromLabelX,
powerStartsFromZeroBoxX,
powerStartsFromOneBoxX,
new ActiveValueLabel(powerStartsFromActiveLabelX, activeValueTitleX),
0);
var powerStartsFromY = new SwitchOption(
powerStartsFromLabelY,
powerStartsFromZeroBoxY,
powerStartsFromOneBoxY,
new ActiveValueLabel(powerStartsFromActiveLabelY, activeValueTitleY),
optionSetYLeft);
var lpNorm = new Option(
new Field(lpNormBox, form, 2),
lpNormLabel,
@ -554,11 +556,11 @@ namespace grapher.Models
gainSwitchOptionX,
classicCapOptionsX,
powerCapOptionsX,
powerStartsFromX,
outputOffsetX,
decayRateX,
growthRateX,
smoothX,
offsetX,
inputOffsetX,
limitX,
powerClassicX,
exponentX,
@ -577,11 +579,11 @@ namespace grapher.Models
gainSwitchOptionY,
classicCapOptionsY,
powerCapOptionsY,
powerStartsFromY,
outputOffsetY,
decayRateY,
growthRateY,
smoothY,
offsetY,
inputOffsetY,
limitY,
powerClassicY,
exponentY,

View file

@ -29,11 +29,11 @@ namespace grapher
CheckBoxOption gainSwitch,
CapOptions classicCap,
CapOptions powerCap,
SwitchOption powerStartsFrom,
Option outputOffset,
Option decayRate,
Option growthRate,
Option smooth,
Option offset,
Option inputOffset,
Option limit,
Option powerClassic,
Option exponent,
@ -67,11 +67,11 @@ namespace grapher
Smooth = smooth;
ClassicCap = classicCap;
PowerCap = powerCap;
Offset = offset;
InputOffset = inputOffset;
Limit = limit;
PowerClassic = powerClassic;
Exponent = exponent;
PowerStartsFrom = powerStartsFrom;
OutputOffset = outputOffset;
Midpoint = midpoint;
WriteButton = writeButton;
AccelTypeActiveValue = accelTypeActiveValue;
@ -114,9 +114,9 @@ namespace grapher
public CapOptions PowerCap { get; }
public SwitchOption PowerStartsFrom { get; }
public Option InputOffset { get; }
public Option Offset { get; }
public Option OutputOffset { get; }
public Option Limit { get; }
@ -227,8 +227,8 @@ namespace grapher
Smooth.Hide();
ClassicCap.Hide();
PowerCap.Hide();
PowerStartsFrom.Hide();
Offset.Hide();
OutputOffset.Hide();
InputOffset.Hide();
Limit.Hide();
PowerClassic.Hide();
Exponent.Hide();
@ -265,8 +265,8 @@ namespace grapher
args.cap.x,
args.cap.y,
args.capMode);
PowerStartsFrom.SetActiveValue(!args.powerStartFromOne);
Offset.SetActiveValue(args.offset);
OutputOffset.SetActiveValue(args.outputOffset);
InputOffset.SetActiveValue(args.inputOffset);
DecayRate.SetActiveValue(args.decayRate);
GrowthRate.SetActiveValue(args.growthRate);
Smooth.SetActiveValue(args.smooth);
@ -328,7 +328,6 @@ namespace grapher
args.cap.y = PowerCap.Out.Field.Data;
args.capMode = PowerCap.CapTypeOptions.GetSelectedCapMode();
}
if (PowerStartsFrom.Visible) args.powerStartFromOne = PowerStartsFrom.Second.Checked;
if (Limit.Visible)
{
if (args.mode == AccelMode.motivity)
@ -342,7 +341,8 @@ namespace grapher
}
if (PowerClassic.Visible) args.exponentClassic = PowerClassic.Field.Data;
if (Exponent.Visible) args.exponentPower = Exponent.Field.Data;
if (Offset.Visible) args.offset = Offset.Field.Data;
if (InputOffset.Visible) args.inputOffset = InputOffset.Field.Data;
if (OutputOffset.Visible) args.outputOffset = OutputOffset.Field.Data;
if (Midpoint.Visible) args.midpoint = Midpoint.Field.Data;
if (LutPanel.Visible)
{
@ -369,8 +369,8 @@ namespace grapher
Smooth.AlignActiveValues();
ClassicCap.AlignActiveValues();
PowerCap.AlignActiveValues();
PowerStartsFrom.AlignActiveValues();
Offset.AlignActiveValues();
OutputOffset.AlignActiveValues();
InputOffset.AlignActiveValues();
Limit.AlignActiveValues();
PowerClassic.AlignActiveValues();
Exponent.AlignActiveValues();
@ -407,11 +407,11 @@ namespace grapher
DecayRate,
GrowthRate,
Smooth,
Offset,
InputOffset,
Limit,
PowerClassic,
Exponent,
PowerStartsFrom,
OutputOffset,
Midpoint,
LutText,
LutPanel,

View file

@ -64,7 +64,8 @@ public value struct AccelArgs
[MarshalAs(UnmanagedType::U1)]
bool gain;
double offset;
double inputOffset;
double outputOffset;
double acceleration;
double decayRate;
double growthRate;
@ -75,7 +76,6 @@ public value struct AccelArgs
double limit;
double midpoint;
double smooth;
bool powerStartFromOne;
[JsonProperty("Cap / Jump")]
Vec2<double> cap;